Score:0

Serial device stops working when upgrade to 20.04

ธง ru

I have a USB device with a serial interface. It worked great on 18.04 (and on Windows) but when I upgrade to 20.04 something is interfering with communications.

When I plug in the device, it shows up as /dev/ttyACM1 or /dev/ttyACM0, which is what I expect.

When I look at /var/log/syslog I see this :

Jun 10 11:58:39 andy-HP-ZBook-15u-G3 wpa_supplicant[864]: wlp2s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-58 noise=9999 txrate=200000
Jun 10 11:58:39 andy-HP-ZBook-15u-G3 kernel: [  309.817011] usb 1-2: new full-speed USB device number 7 using xhci_hcd
Jun 10 11:58:40 andy-HP-ZBook-15u-G3 kernel: [  309.967174] usb 1-2: New USB device found, idVendor=2988, idProduct=0302, bcdDevice= 2.00
Jun 10 11:58:40 andy-HP-ZBook-15u-G3 kernel: [  309.967178] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 10 11:58:40 andy-HP-ZBook-15u-G3 kernel: [  309.967180] usb 1-2: Product: 3DSystems Virtual Serial Port
Jun 10 11:58:40 andy-HP-ZBook-15u-G3 kernel: [  309.967181] usb 1-2: Manufacturer: 3D Systems
Jun 10 11:58:40 andy-HP-ZBook-15u-G3 kernel: [  309.967183] usb 1-2: SerialNumber: 00000000050C
Jun 10 11:58:40 andy-HP-ZBook-15u-G3 kernel: [  309.968766] cdc_acm 1-2:1.0: ttyACM0: USB ACM device

That seems ok to me.

But when I try to communicate to the device, it doesn't work. The device's communication protocol is command/response structure, so I haven't determined yet if my commands aren't reaching the device, or if the responses aren't reaching my code. (or both), but I know that if I send a command, I get no response.

Update : I've connected my hardware to a debugger and discovered that outgoing data is getting through. When I send a command from my app to the hardware, the hardware does receive the command. The problem is that when my hardware replies, my app does not receive any data.

(It's also possible that if spurious commands are being sent, it could put the device into an unexpected state.)

Things I've tried :

  • Permissions : I've set the device's permissions to 777 just to be sure
  • ModemManager : I've removed this package
  • mtp_probe : I couldn't figure out how to disable this, so I temporarily removed the binary.

Any hints as to what's changed in serial device support from 18.04 to 20.04 would be greatly appreciated. Thank you.

Sebastian avatar
in flag
คุณอาจต้องอยู่ในกลุ่ม tty และโทรออกเพื่อให้ใช้งานได้ คุณได้ตรวจสอบว่า? นอกจากนี้ คุณอาจต้องเพิ่มกฎ udev เฉพาะเพื่อให้สามารถใช้พอร์ตได้
ru flag
ฉันแน่ใจว่าไม่ใช่ปัญหาการอนุญาต ฉันได้ลองเพิ่มกฎ udev แล้ว ฉันเพิ่งคัดลอกรายการสำหรับอุปกรณ์ซีเรียลและใช้หมายเลข VID/PID ของฉันเอง ถ้ามีอะไรมากกว่านั้นที่ฉันต้องทำ ฉันก็จะสนใจที่จะเรียนรู้ว่ามันคืออะไร

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา