Help identifying a USB device
Hi,
I'm in the middle of making a PIC18 USB project that takes the microchip CDC library and an lirc config file to work as a USB based IR transmitter for RC5 remotes. When I attached the PIC18 running the CDC firmware the Linux kernel happily creates me a serial device which I can communicate over at /dev/ttyACM0, thanks to the cdc-acm.ko module. If I was to plugin a second such device it would be at /dev/ttyACM1 and so on.
My question is, how can I work out from /dev/ttyACM1 what the physical usb device is and read the produce id, version id and descriptor? If I look in dmesg I only get a new ttyACM is now available, it doesn't tell me the vendor id, product id and description.
I'm currently writing to /dev/ttyACM0 using python and pyserial, but i want to not hard code /dev/ttyACM0, and have it look at all serial devices and say which ones are acutally usb and then have a description which matches the one of my PIC. I can the usb info from lsusb, but this doesn't help me match up to a serial device.
This is possibly more of a kernel architecture question than programming but hopefully not to inappropriate.
Thanks
Simon
|