Modem USB gets disconnected

Hi all,

I have my modem Quectel EM-05 plugged on M2 slot and camera on usb port.

I often have problem of Quectel module get disconnected from system. Here are some logs of sudo dmesg | grep USB

[    0.993473] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.993548] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.994018] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    0.994335] usbserial: USB Serial support registered for generic
[    0.994433] usbserial: USB Serial support registered for ch341-uart
[    0.994528] usbserial: USB Serial support registered for cp210x
[    0.994623] usbserial: USB Serial support registered for FTDI USB Serial Device
[    0.994725] usbserial: USB Serial support registered for GSM modem (1-port)
[    0.994822] usbserial: USB Serial support registered for pl2303
[    0.995935] USB Video Class driver (1.1.1)
[    0.998736] usbhid: USB HID core driver
[    3.619119] amlogic-new-usb2-v2 ffe09000.usb2phy: USB2 phy probe:phy_mem:0xffe09000, iomap phy_base:0xffffff80086fe000
[    3.629498] amlogic-new-usb3-v2 ffe09080.usb3phy: USB3 phy probe:phy_mem:0xffe09080, iomap phy_base:0xffffff800882f080
[   11.878430] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[   11.901423] hub 1-0:1.0: USB hub found
[   11.914817] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[   11.931084] hub 2-0:1.0: USB hub found
[   12.240035] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[   12.402862] hub 1-1:1.0: USB hub found
[   12.691998] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[  106.352033] usb 1-1.3: new high-speed USB device number 4 using xhci-hcd
[  106.483511] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[  106.484169] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[  106.484869] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[  106.485527] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
[  108.690763] usb 1-1.3: USB disconnect, device number 4
[  108.691241] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[  108.694934] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[  108.695414] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[  108.699692] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[  135.024013] usb 1-1.3: new high-speed USB device number 5 using xhci-hcd
[  135.157318] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[  135.158587] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[  135.159784] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[  135.165436] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
[  136.338760] usb 1-1.3: USB disconnect, device number 5
[  136.339207] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[  136.342894] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[  136.343380] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[  136.347775] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[  160.880012] usb 1-1.3: new high-speed USB device number 6 using xhci-hcd
[  161.011630] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[  161.014974] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[  161.015806] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[  161.019035] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
[  162.450775] usb 1-1.3: USB disconnect, device number 6
[  162.451226] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[  162.451682] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[  162.452454] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[  162.453296] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3

The modem appears in system as 4 ports ttyUSB0, ttyUSB1, ttyUSB2 and ttyUSB3.

It did appear on system but eventually disappear.

Can someone give me some pointers on this ? Is this because of my power consumption because of both camera and modem connected on hub ?

Thank you very much

dmesg keeps on giving these messages:

[  708.208023] usb 1-1.3: new high-speed USB device number 16 using xhci-hcd
[  708.339384] option 1-1.3:1.0: GSM modem (1-port) converter detected
[  708.341746] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[  708.342164] option 1-1.3:1.1: GSM modem (1-port) converter detected
[  708.342972] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[  708.343422] option 1-1.3:1.2: GSM modem (1-port) converter detected
[  708.348085] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[  708.348537] option 1-1.3:1.3: GSM modem (1-port) converter detected
[  708.349284] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
[  709.266760] usb 1-1.3: USB disconnect, device number 16
[  709.267223] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[  709.267261] option 1-1.3:1.0: device disconnected
[  709.271199] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[  709.271245] option 1-1.3:1.1: device disconnected
[  709.271684] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[  709.271716] option 1-1.3:1.2: device disconnected
[  709.274131] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[  709.274180] option 1-1.3:1.3: device disconnected
[  734.832008] usb 1-1.3: new high-speed USB device number 17 using xhci-hcd
[  734.963252] option 1-1.3:1.0: GSM modem (1-port) converter detected
[  734.964127] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[  734.964609] option 1-1.3:1.1: GSM modem (1-port) converter detected
[  734.965468] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[  734.965920] option 1-1.3:1.2: GSM modem (1-port) converter detected
[  734.966831] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[  734.967283] option 1-1.3:1.3: GSM modem (1-port) converter detected
[  734.967974] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
[  737.426813] usb 1-1.3: USB disconnect, device number 17
[  737.427288] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[  737.427336] option 1-1.3:1.0: device disconnected
[  737.427829] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[  737.427871] option 1-1.3:1.1: device disconnected
[  737.428507] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[  737.428558] option 1-1.3:1.2: device disconnected
[  737.429069] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[  737.429115] option 1-1.3:1.3: device disconnected
[  750.704008] usb 1-1.3: new high-speed USB device number 18 using xhci-hcd
[  750.835376] option 1-1.3:1.0: GSM modem (1-port) converter detected
[  750.835732] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[  750.836224] option 1-1.3:1.1: GSM modem (1-port) converter detected
[  750.839481] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[  750.839973] option 1-1.3:1.2: GSM modem (1-port) converter detected
[  750.842999] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[  750.843490] option 1-1.3:1.3: GSM modem (1-port) converter detected
[  750.843856] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
[  752.274758] usb 1-1.3: USB disconnect, device number 18
[  752.275219] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[  752.275257] option 1-1.3:1.0: device disconnected
[  752.278269] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[  752.278321] option 1-1.3:1.1: device disconnected
[  752.278838] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[  752.278882] option 1-1.3:1.2: device disconnected
[  752.281770] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[  752.281827] option 1-1.3:1.3: device disconnected

And then:

[  781.248076] usb 1-1.3: Device not responding to setup address.
[  781.456060] usb 1-1.3: Device not responding to setup address.
[  781.664011] usb 1-1.3: device not accepting address 20, error -71

What camera do you use and what power supply do you use ?

hello, try another 12V 2A power supply and cable to it, do not forget to switch the mode in your operating system from usb3.0 to pci-e

I use a custom camera that plugs on 4 pins of USB (pin 2, 3, 4, 5) on 40-pin header a adapter from 220V to 5V 4A

Hi @Vladimir.v.v

What are the effects fo changing usb3.0 to pci-e ?

Thanks

There are recommendations on this if you use parallel pci-e periphery.

Needs to be replaced with 12V 2A!

There are recommendations on this if you use parallel pci-e periphery.

Thank you. Is the recommendation documented somewhere on docs of VIM 3 ?

Needs to be replaced with 12V 2A!
Can I ask you why ?

Thanks

yes, you can be sure I did not make it up
:slightly_smiling_face:

I don’t mean that you make it up. I’m sorry if I make you think so. I just want to know in which document it is written because I must miss it.

Thanks :slight_smile:

1 Like

Yes, I understand you very well, I just needed time to find, since I have some personal matters :grin:

https://docs.khadas.com/vim3/HowToSetupPcieUsbPort.html

1 Like

the 5v of the GPIOs USB can only provide a max of 1000 mA
please ensure your camera isn’t crossing the limit, causing the USB hub to shut down…

Is there a way to check if the hub is shutdown ?

In dmesg I don’t see any message related to it.

I tried with an adapter of 12V 2A but the problem is still there. The modem keeps connecting and then disconnecting in loop.

try to disconnect and then connect the expansion board, perhaps you haven’t connected it correctly yet

Are you using VIM3 ?,

If you see 4 USB ports shutting down abruptly, you can be damn sure the Hub is shutting down, as the VIM3 has 5 USB ports, 1x OTG 3x USB 2.0 (1 physically available, 1 in the GPIO and one in the PCIe slot…) 1x USB 2.0 and 3.0 interlaced…

all 4 USB 2.0s are part of the Hub…

@Electr1
Only the modem disappeared, the others are still available.

Can the problem be related to autosuspend in usbcore that is set to 5 by default ?

Thanks

That is the first thing I tried. And the problem doesn’t link to that :frowning:

Is there a regular interval of disconnection?, try to record the time it stays on, till when it turns off…
can you state your device and the correct firmware ?

@ptphucbk Hello, Can you try with this commad and faceback to me .

  1. lsusb

And did you remove the camera and try again ?