Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I know that usb packets have a very specific format, but I would like to write those packets my self, I know that usb_control_msg is kind of an interface to control packets, but this function is already responsible from sending the setup_token, in/out token, and probably checks ACKS. How could I construct these packets myself and then sending them?
Seems like that what you want is to write your own usb host driver. I suggest you to try analyse existing usb host drivers (ehci/xhci) and then try to write your own driver, but be aware of this that this is not easy task to do. Notice also that it is not possible to exist more that one driver for given usb host controller (ehci/xhci). If you really want to do those things you need to know perfectly both: USB protocol and ehci/xhci specification which may take a lot of time. Also strong experience in writing Linux drivers is required. As I said it is not easy task.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 months ago.
Improve this question
I wonder if it is possible to write a program which would limit the battery charge of a laptop. I know some manufacturers like Asus, Lenovo etc. have such build-in software, but I am curious if anyone had tried creating a universal software for that and if you would share some starting points. Not sure if that is even possible since I am unable to find such software. Thanks!
There is an almost generic tool for Linux: TLP. You find it's homepage (including a link to the source code) on https://linrunner.de/tlp/. It works as power saving utility and also can adjust the battery charge levels, BUT that feature is only for ThinkPads.
To my knowledge there is no universal interface to set the charge levels of laptop batteries, so a generic utility would have to know all that vendor specific settings probably.
A short research showed, that Linux supports more than Lenovo inside some kernel drivers, so maybe that code could help you to also write software for a different OS. My advice would be to research the possibilities for Linux to then think about a generic utility for another operating system.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Problem
I need a tool like Wireshark to capture outgoing and incoming packets. I searched the Wireshark documentation, but I didn't find any resources related to my question. There is probably some way to do it, but I don't know how to search for this efficiently.
For now, I am using Windows 10 for Education to sniff the packet formats that the monitor supports and expects from desktop applications.
Objective
My objective is to configure my monitor over HDMI (monitor supports it on Windows) when using Linux. Then, I will write a tool to do this and, barring legal obstacles, I will share it.
The Network vs HDMI
The reason that your computer can communicate with a remote server 1000km away is that your computer's network interface encapsulates data with control information. This enables the data to be transmitted over your broadcast domain (layer 2), the internet (layer 3), and a connection between the two devices (layer 4). Depending on the traffic you are sending, more layers/encapsulation may be involved here. Server fault has an answer that goes into more detail on OSI layers.
HDMI is more similar to a point-to-point connection here. There is no expectation that data needs to be sent to remote hosts such that routing/congestion information needs to be included. Wireshark is used to analyze network protocols, but won't be of much use to look at this raw data stream.
HDMI control libraries
You probably want to focus on sending a signal on CEC, HDMI's control wire. There are libraries such as libCEC, which has Linux support and can control this. If you wanted to programmatically control the link, you can, but you will likely need to buy a CEC adapter.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am doing a project of automation in which I want to check if an object is OK or NOT by using a USB webcam.
So I am using a proximity sensor to detect if object is in front of the webcam. If it is there, I want to send a signal to the webcam to capture an image via Arduino Uno. How do I do that?
After capturing the image, data will be saved and processed in the Arduino. How do I do the webcam & Arduino interfacing?
Typically, you would use the proximity sensor to continuously read values and in case there is a change, the Arduino can send a signal over the serial port.
On the computer side, you can read from the serial port and trigger the webcam using a script.
In Python, it is possible using the PySerial module and it is easy to link Python scripts to a webcam to take pictures. Read an example here.
(You should do some more research on this. There are already a lot of solutions out there to trigger using sensors. See this one for high speed photography: http://www.glacialwanderer.com/hobbyrobotics/?p=11)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to know how a device node is created when a hardware is connected to the system.
Information that I know:
When a piece of hardware is connected to the system, the device name is compared with the driver name, if it matches, then probe is called.
Info I wish to know:
At which point is the device node created and who is creating it? (In other words, I want to know where mknod is happening?)
This one thing is bugging my mind from so many months. Please tell me programatically where is this happening.
On most (but not all!) Linux systems this is handled by Udev.
It is notified of the new hardware through a netlink socket. It then creates the device node, based on its configuration.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
As the question already suggests,
I'm trying to figure out, if it's possible to force another Application/process to use a specific output device.
Not every Application has a dropdown menu to select which audio device should be used and therefore always uses the standard device.
But when running multiple applications this isn't always the desired solution.
Plus, even if the application has a device-selection, it's almost always buried deep within the menus.
I was thinking of something like faking the change of the standard-device (but only to one application)
Looking forward for you answers :)
Greetings
Audio Hijack Pro already does this and it works great. Rogue Amoeba are the experts at Mac OS X audio.