Raspberry Pi3 + Raspbian - Python serial driver problem cp210x

Asked

Viewed 54 times

2

Hello, I would like if possible, help/tips on the following problem: I am connecting my device using cp210x driver to my raspberryPi3 using Raspbian system, through USB-Serial communication, but when I try:

[dmesg]

I get this information about the driver:

"[ 282.796114] cp210x 1-1.4:1.0: cp210x converter Detected

[ 282.796396] cp210x 1-1.4:1.0: failed to get vendor val 0x370b size 1: -32

[ 282.796407] cp210x 1-1.4:1.0: querying part number failed"

Generic code example: Generic code for example:

import serial with serial.Serial('/dev/ttyUSB0',9600,timeout=1) as ser: ser.write(b'&00R') ser.write(b'&15R') x = ser.read() s = ser.read(10) line = ser.readline() print (line)

print (line) = b''

If I try lsmod, I get: "1 cp210x"

If I try lsusb, I can see: "Bus 001 Device 007: ID 10c4:ea60 Cygnal Integrated Products, Inc. Cp210x UART Bridge / myAVR mySmartUSB light"

If I try to unite, I get: 4.19.25-v7+

If I try stty -F /dev/ttyUSB0 -a, I can see that the baudrate is 9600

If I try lsb_release -r, I get 9.6

I know that my device is working normally, because if I connect it through the same USB-serial communication to my windows computer and try to use software together with the device, it works normally, but now I really need to use the communication with Pi to receive the data in it too.

Thank you for your time.

  • Don’t Ask questions that are not in English, Please.

  • Translate the question, you’re on Sopt.

  • I didn’t get it, I translated it. Thank you

  • A common problem that happened to me when using this converter was that I had to add the user to the group dialout of a ls -la /dev/ttyUSB* and if it equals crw-rw---T 1 root dialout 188, /dev/ttyUSB0 add your user to the group sudo usermod -a -G $USER dialout

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.