My LTE USB modem works correctly when hot-plugged after the system is fully booted.
But if the modem is already connected during reboot or cold boot, it is not detected properly — it goes into Qualcomm QHSUSB__BULK / EDL mode instead of switching to RNDIS/ECM/QMI.
Hardware:
Raspberry Pi Zero 2 W
LTE USB modem (Qualcomm-based)
OS:
chirpstack gateway os 4.8.3(custom build by enabling usb drivers)
What I already tried:
/etc/rc.local
sleep 10
logger "Restarting USB host to re-enumerate LTE modem..."
rmmod dwc2
sleep 2
modprobe dwc2
sleep 5
/usr/sbin/usbmode -s
/sbin/hotplug-call usb
But the modem still remains in bulk mode after reboot.
Hotplug detection = OK
If I unplug + plug the modem → it immediately registers and works
Boot detection = FAIL
If modem is connected before powering ON → not detected correctly