jacklinquan / usbserial4a

Python package for Android USB host serial port.
MIT License
62 stars 17 forks source link

Can't read data from 'nRF52 USB Product' #10

Closed zenbooster closed 2 years ago

zenbooster commented 3 years ago

Device: nRF52840 usb dongle for 'Wireless EMG / ECG sensor MYOblue v1.0 ' https://elemyo.com/producty/myoblue1_0

On ubuntu, after connecting device:

2021-09-09T15:29:29.000739+03:00 ub64devel kernel: [1268473.349823] usb 2-2.2: new full-speed USB device number 13 using uhci_hcd
2021-09-09T15:29:29.316327+03:00 ub64devel kernel: [1268473.668319] usb 2-2.2: New USB device found, idVendor=1915, idProduct=521a
2021-09-09T15:29:29.316393+03:00 ub64devel kernel: [1268473.668322] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2021-09-09T15:29:29.316448+03:00 ub64devel kernel: [1268473.668323] usb 2-2.2: Product: nRF52 USB Product
2021-09-09T15:29:29.316452+03:00 ub64devel kernel: [1268473.668324] usb 2-2.2: Manufacturer: Nordic Semiconductor
2021-09-09T15:29:29.316453+03:00 ub64devel kernel: [1268473.668324] usb 2-2.2: SerialNumber: D3F8D3107786
2021-09-09T15:29:29.336228+03:00 ub64devel kernel: [1268473.686772] cdc_acm 2-2.2:1.0: ttyACM0: USB ACM device
2021-09-09T15:29:29.405972+03:00 ub64devel mtp-probe: checking bus 2, device 13: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2"
2021-09-09T15:29:29.522515+03:00 ub64devel mtp-probe: bus: 2, device: 13 was not an MTP device
2021-09-09T15:29:29.669242+03:00 ub64devel upowerd[2786]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.1
2021-09-09T15:29:29.669848+03:00 ub64devel snapd[49375]: hotplug.go:199: hotplug device add event ignored, enable experimental.hotplug
2021-09-09T15:29:29.671844+03:00 ub64devel upowerd[2786]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0
2021-09-09T15:29:29.685246+03:00 ub64devel upowerd[2786]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2

I can read the data: sudo cat /dev/ttyACM0

But with usbserial4a on Armor X8 i can't read, but connect successfully.

jacklinquan commented 3 years ago

Device: nRF52840 usb dongle for 'Wireless EMG / ECG sensor MYOblue v1.0 ' https://elemyo.com/producty/myoblue1_0

On ubuntu, after connecting device:

2021-09-09T15:29:29.000739+03:00 ub64devel kernel: [1268473.349823] usb 2-2.2: new full-speed USB device number 13 using uhci_hcd
2021-09-09T15:29:29.316327+03:00 ub64devel kernel: [1268473.668319] usb 2-2.2: New USB device found, idVendor=1915, idProduct=521a
2021-09-09T15:29:29.316393+03:00 ub64devel kernel: [1268473.668322] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2021-09-09T15:29:29.316448+03:00 ub64devel kernel: [1268473.668323] usb 2-2.2: Product: nRF52 USB Product
2021-09-09T15:29:29.316452+03:00 ub64devel kernel: [1268473.668324] usb 2-2.2: Manufacturer: Nordic Semiconductor
2021-09-09T15:29:29.316453+03:00 ub64devel kernel: [1268473.668324] usb 2-2.2: SerialNumber: D3F8D3107786
2021-09-09T15:29:29.336228+03:00 ub64devel kernel: [1268473.686772] cdc_acm 2-2.2:1.0: ttyACM0: USB ACM device
2021-09-09T15:29:29.405972+03:00 ub64devel mtp-probe: checking bus 2, device 13: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2"
2021-09-09T15:29:29.522515+03:00 ub64devel mtp-probe: bus: 2, device: 13 was not an MTP device
2021-09-09T15:29:29.669242+03:00 ub64devel upowerd[2786]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.1
2021-09-09T15:29:29.669848+03:00 ub64devel snapd[49375]: hotplug.go:199: hotplug device add event ignored, enable experimental.hotplug
2021-09-09T15:29:29.671844+03:00 ub64devel upowerd[2786]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0
2021-09-09T15:29:29.685246+03:00 ub64devel upowerd[2786]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2

I can read the data: sudo cat /dev/ttyACM0

But with usbserial4a on Armor X8 i can't read, but connect successfully.

Hi @zenbooster , Thank you for reporting this issue. For now the CDC ACM driver of usbserial4a is only tested with MCP2200 from Microchip, because I only have this device at hand for testing CDC ACM driver. I will keep this issue open. When I get more devices like nRF52 USB Product, I will test and debug them. And contribution is always welcome to make usbserial4a better and more robust.

jacklinquan commented 2 years ago

Hi @zenbooster , Some other users of usbserial4a reported issues when they try to communicate with BBC micro:bit. I got a BBC micro:bit V1(nRF51) at hand and reproduced the issue. It connected but could not read or write. I revised the code of the CDC ACM driver and this problem is gone. Now the new version of usbserial4a is 0.4.0. You may try it and see if the new version solves your problem with nRF52840 usb dongle.