0

I want to do some serial programming using Python Serial, and all examples I've seen online for USB set the port parameter to "/dev/ttyUSB*" . But on my system, there is no "/dev/ttyUSB*" inspite of there being two USB ports. Has this been renamed to something else recently? My /dev consists a lot of tty device files , how do I identify which corresponds to my usb port?

Sidenote: When I insert a usb stick, dmesg shows its using /dev/sdb. Will using this also work?

1
  • What do you see in the output of dmesg after you attach your serial programmer to a USB port? – Andy Dalton Sep 24 '15 at 17:46
3

ttyUSBx devices are not simple USB ports, but rather USB UART devices which emulate a serial port via USB. They are often based on Prolific (PL2303) or FTDI chip. You'll have to obtain such a device and connect it to your computer for a /dev/ttyUSBx entry to appear, in the same way as plugging in a USB flash drive creates a /dev/sdx device.

2
  • Thanks. I connected an FPGA board via USB to my computer. dmesg doesn't say it's connected to any entry under /dev. How do I find out which character device a usb device has attached to? – sanjeev mk Sep 25 '15 at 14:01
  • How a development board is presented on the computer depends on the board model. You should check the reference manual or datasheet which came with your board. If you don't have any, you should google your dev. board model. – Dmitry Grigoryev Sep 25 '15 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.