I have a working setup with a modded Huwaei E3276 4G modem (running in 3G/umts mode over NCM) connected to the USB port on my Netgear WNDR3800. My question here is not about the 3G stuff but rather really isolated to the USB connection, as I saw I surprising behaviour today, when the device didn't connect after a reboot.
As written in other posts spontaneous USB disconnects may happen after shorter or longer uptimes with various 3G modems, and it happens to me too sometimes but not so often. This post is not about that particular issue.
For completeness, here's the log from the latest disconnect (no related log events preceding the usb events):
Fri Jun 12 11:27:48 2020 kern.info kernel: [79113.865537] usb 1-1: USB disconnect, device number 2
Fri Jun 12 11:27:48 2020 kern.info kernel: [79113.870909] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Fri Jun 12 11:27:48 2020 kern.info kernel: [79113.879026] option 1-1:1.0: device disconnected
Fri Jun 12 11:27:48 2020 kern.info kernel: [79113.883881] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
Fri Jun 12 11:27:48 2020 kern.info kernel: [79113.891994] option 1-1:1.1: device disconnected
Fri Jun 12 11:27:48 2020 daemon.notice netifd: Network device 'wwan0' link is down
Fri Jun 12 11:27:48 2020 daemon.notice netifd: Interface 'wwan_4' is disabled
So, we now have a USB device that has disconnected and the related devices ttyUSB0 and ttyUSB1 have gone away.
So, now doing a reboot:
# reboot
but when the system came up the USB device still did not get activated. The usb drivers etc got loaded fine according to the kernel log:
[ 5.653583] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 5.720413] usbcore: registered new interface driver usbfs
[ 5.725995] usbcore: registered new interface driver hub
[ 5.731413] usbcore: registered new device driver usb
[ 5.740557] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 5.748278] ehci-platform: EHCI generic platform driver
[ 5.753642] ehci-platform ehci-platform: EHCI Host Controller
[ 5.759405] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 5.767428] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 5.789845] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 5.796898] hub 1-0:1.0: USB hub found
[ 5.800970] hub 1-0:1.0: 2 ports detected
[ 5.807215] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 5.814503] ohci-platform: OHCI generic platform driver
[ 5.819856] ohci-platform ohci-platform: Generic Platform OHCI controller
[ 5.826649] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[ 5.834646] ohci-platform ohci-platform: irq 14, io mem 0x1c000000
[ 5.904654] hub 2-0:1.0: USB hub found
[ 5.908662] hub 2-0:1.0: 2 ports detected
[ 5.913454] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
...
[ 13.655841] usbcore: registered new interface driver cdc_wdm
...
[ 13.741706] usbcore: registered new interface driver usb-storage
[ 13.768325] usbcore: registered new interface driver usbserial
[ 13.774281] usbcore: registered new interface driver usbserial_generic
[ 13.780904] usbserial: USB Serial support registered for generic
...
[ 13.826717] usbcore: registered new interface driver cdc_ether
[ 13.839765] usbcore: registered new interface driver cdc_ncm
[ 13.866415] usbcore: registered new interface driver huawei_cdc_ncm
[ 13.910674] PPP generic driver version 2.4.2
[ 13.917487] NET: Registered protocol family 24
[ 13.924899] usbcore: registered new interface driver qmi_wwan
[ 13.933400] usbcore: registered new interface driver rndis_host
[ 13.969488] usbcore: registered new interface driver option
[ 13.975193] usbserial: USB Serial support registered for GSM modem (1-port)
but still no ttyUSB devices under /dev.
Unplugging and replugging the USB modem made the USB connection kick in:
[ 116.549832] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 116.711862] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 116.726678] scsi host0: usb-storage 1-1:1.0
[ 117.026956] usb 1-1: USB disconnect, device number 2
[ 117.429837] usb 1-1: new high-speed USB device number 3 using ehci-platform
[ 117.583731] option 1-1:1.0: GSM modem (1-port) converter detected
[ 117.590170] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 117.597524] option 1-1:1.1: GSM modem (1-port) converter detected
[ 117.603934] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 117.681269] huawei_cdc_ncm 1-1:1.2: MAC-Address: 0c:5b:8f:27:9a:64
[ 117.687453] huawei_cdc_ncm 1-1:1.2: setting rx_max = 16384
[ 117.737656] huawei_cdc_ncm 1-1:1.2: setting tx_max = 16384
[ 117.745073] huawei_cdc_ncm 1-1:1.2: NDP will be placed at end of frame for this device.
[ 117.753410] huawei_cdc_ncm 1-1:1.2: cdc-wdm0: USB WDM device
[ 117.760090] huawei_cdc_ncm 1-1:1.2 wwan0: register 'huawei_cdc_ncm' at usb-ehci-platform-1, Huawei CDC NCM device, 0c:5b:8f:27:9a:64
[ 117.772326] usb-storage 1-1:1.3: USB Mass Storage device detected
[ 117.859656] scsi host1: usb-storage 1-1:1.3
[ 117.864624] usb-storage 1-1:1.4: USB Mass Storage device detected
[ 117.893348] scsi host2: usb-storage 1-1:1.4
[ 118.873588] scsi 1:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 118.921003] scsi 2:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
[ 118.935094] sd 2:0:0:0: [sda] Attached SCSI removable disk
and ttyUSB devices are back under /dev.
Why did the disconnected state persist over the reboot?
(On the next reboot it connected up fine.)