We are trying to implement scheduled calls with the Modem Quectel EC25. For achieving this, we send AT commands to the modem via the ttyUSB2 serial interfaces (4 interfaces from ttyUSB0-3 are available in general). To send these commands we use the python serial library.
lsusb shows the following usb devices:
lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 040: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Unfortunately, after only a few successful outgoing calls, we get an error from our application (specifically from the serial library):
DEBUG - Error returned: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
DEBUG - Error returned: write failed: [Errno 5] Input/output error
After this error appears, we observed that the /dev/ttyUSB2
interface was missing, but now a /dev/ttyUSB4
interface appeared.
ls -al /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Jun 1 17:50 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Jun 1 17:50 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 3 Jun 1 17:50 /dev/ttyUSB3
crw-rw---- 1 root dialout 188, 4 Jun 1 17:50 /dev/ttyUSB4
There isn’t any other application which accesses this serial device.
In the dmesg log you canalso see that the USB device disconnects for some reason, and then connects again, with an error “-71”.
dmesg
[Thu Jun 1 16:06:14 2023] usb 1-1.3: USB disconnect, device number 6
[Thu Jun 1 16:06:14 2023] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[Thu Jun 1 16:06:14 2023] option 1-1.3:1.0: device disconnected
[Thu Jun 1 16:06:14 2023] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[Thu Jun 1 16:06:14 2023] option 1-1.3:1.1: device disconnected
[Thu Jun 1 16:06:14 2023] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[Thu Jun 1 16:06:14 2023] option 1-1.3:1.2: device disconnected
[Thu Jun 1 16:06:14 2023] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[Thu Jun 1 16:06:14 2023] option 1-1.3:1.3: device disconnected
[Thu Jun 1 16:06:14 2023] qmi_wwan 1-1.3:1.4 wwan0: unregister ‘qmi_wwan’ usb-0000:01:00.0-1.3, WWAN/QMI device
[Thu Jun 1 16:06:14 2023] usb 1-1.3: new high-speed USB device number 7 using xhci_hcd
[Thu Jun 1 16:06:14 2023] usb 1-1.3: new high-speed USB device number 8 using xhci_hcd
[Thu Jun 1 16:06:14 2023] usb 1-1-port3: attempt power cycle
[Thu Jun 1 16:06:15 2023] usb 1-1.3: new high-speed USB device number 9 using xhci_hcd
[Thu Jun 1 16:06:15 2023] usb 1-1.3: string descriptor 0 read error: -71
[Thu Jun 1 16:06:15 2023] usb 1-1.3: New USB device found, idVendor=2c7c, idProduct=0125, bcdDevice= 3.18
[Thu Jun 1 16:06:15 2023] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Thu Jun 1 16:06:15 2023] option 1-1.3:1.0: GSM modem (1-port) converter detected
[Thu Jun 1 16:06:15 2023] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[Thu Jun 1 16:06:15 2023] option 1-1.3:1.1: GSM modem (1-port) converter detected
[Thu Jun 1 16:06:15 2023] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[Thu Jun 1 16:06:15 2023] option 1-1.3:1.2: GSM modem (1-port) converter detected
[Thu Jun 1 16:06:15 2023] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
[Thu Jun 1 16:06:15 2023] option 1-1.3:1.3: GSM modem (1-port) converter detected
[Thu Jun 1 16:06:15 2023] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB4
[Thu Jun 1 16:06:15 2023] qmi_wwan: probe of 1-1.3:1.4 failed with error -71
Sending AT commands over the USB4 interface works the same as sending them on the USB2 interface. Do you have any idea what could cause this USB disconnect or how we could debug it?
Let me know if I can provide any further information for you and appreciate any help .