I'm trying to open a Serial communication between a Raspberry Pi 3 (model B, running on Raspbian) and a device (a traffic counter to be precise).

I've a USB to Serial cable, using the rs232 standard. (so I'm not using the GPIO)

My goal is to be able to open a serial communication between this device and my rpi3 using python and the pyserial library.

(on windows everything works fine, I open a COMx port and I can then communicate with the device)

My problem: When I plug my Serial to USB cable, the rpi3 don't even create a ttyUSB0 device. What is going on ? How could I open a serial communication in python ?

dmesg -w

[ 3482.730866] usb 1-1.4: new full-speed USB device number 9 using dwc_otg
[ 3482.891077] usb 1-1.4: New USB device found, idVendor=0403, idProduct=9bf0
[ 3482.891093] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3482.891102] usb 1-1.4: Product: TrafficCounter USB Adapter
[ 3482.891110] usb 1-1.4: Manufacturer: TrafficCounter
[ 3482.891118] usb 1-1.4: SerialNumber: FTVNFDLZ

If I run a

glob.glob('/dev/tty[A-Za-z]*')
I obtain:
['/dev/ttyS0', '/dev/ttyAMA0', '/dev/ttyprintk']

And I can see my device with lsusb:

lsusb

Bus 001 Device 009: ID 0403:9bf0 Future Technology Devices International, Ltd 

/dev/ttyS0 and /dev/ttyAMA0 are inbuilt UARTS /dev/ttyprintk MAY be yours.

NOT all USB devices/drivers are "tty".

Unplug the device, list /dev then plug in and see what has changed.

You need to load the ftdi-sio module manually with modprobe and specifying vendor and product id, or follow the guidelines in their manual at

https://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_101_Customising_FTDI_VID_PID_In_Linux(FT_000081).pdf

Afterwards, you'll have a /dev/ttyUSBn.

Thank's for your answers, unfortunately that did not resolve my problem.

I guess that ftdi_sio module do not support anymore the "vendor" and "product" attribute. So

modprobe ftdi_sio vendor=0x0403 product = 0x9bf0

Didn't work for me.

What worked:

I'v added my vendorid and productid in /sys/bus/usb-serial/drivers/ftdi_sio/new_id

sudo nano /sys/bus/usb-serial/drivers/ftdi_sio/new_id

and then i just add:

0403 9bf0

How to automate this process --> here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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