I have a FTDI USB-Serial (UART) IC connected to my Raspberry Pi. When I type lsusb
I can see all my USB buses:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 050d:705c Belkin Components F5D7050 Wireless G Adapter v4000 [Zydas ZD1211B]
Bus 001 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
I am using python-serial
to communicate with the USB via Serial. For this I need the address:
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout = 0.1)
By trial and error I determined the address is /dev/ttyUSB0
. I went to directory /dev/
and took a guess. Where can I find a mapping of (in this case) Device 0005 to the actual address?
Getting the USB tree lusub -t
yields:
lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M
|__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
|__ Port 2: Dev 5, If 0, Class=vend., Driver=ftdi_sio, 12M
|__ Port 3: Dev 4, If 0, Class=vend., Driver=zd1211rw, 480M
but does not tell me the address.
hwinfo
orlshw
are valid. I get-bash: lshw: command not found
– PhillyNJ Mar 06 '14 at 17:16sudo apt-get install hwinfo
. – jlandercy Mar 06 '14 at 19:18