I want to create a small program, where I read from a serial port in C. Up to this point it works fine and does exactly what I want it to do.
But how can I get the port (/dev/something) from the device name?
Using lsusb
, I for example got this entry for my keyboard:
Bus 020 Device 007: ID 24ae:2000 24ae RAPOO 2.4G Wireless Device
On the right hand side I get something like "RAPOO Device", which is the vendor or name of the device. Can I get the port, where that device is currently connected to with any C function on Linux?
Edit: Check this example Improper output using libusb for a possible solution!