Bjørn Mork <bjorn@xxxxxxx> writes: > Ideally the modem firmware should have handled this gracefully, but I > don't expect that to really happen... FWIW, Sierra Wireless have obviously implemented mutual exclusion between PPP and ethernet emulation in their firmware. ttyUSB2 is a serial port supporting ppp and cdc-wdm0 is a QMI device on the same USB modem: bjorn@nemi:~$ ls -ld /sys/bus/usb/devices/2-4:*/{net/*,usb/*,tty*} drwxr-xr-x 4 root root 0 May 22 08:48 /sys/bus/usb/devices/2-4:1.0/ttyUSB0 drwxr-xr-x 4 root root 0 May 22 08:48 /sys/bus/usb/devices/2-4:1.2/ttyUSB1 drwxr-xr-x 4 root root 0 May 22 08:48 /sys/bus/usb/devices/2-4:1.3/ttyUSB2 drwxr-xr-x 5 root root 0 May 22 08:48 /sys/bus/usb/devices/2-4:1.8/net/wwan0 drwxr-xr-x 3 root root 0 May 22 08:48 /sys/bus/usb/devices/2-4:1.8/usb/cdc-wdm0 Attempting PPP while connected via QMI/wwan: nemi:/home/bjorn# pppd noauth debug nodetach connect "chat -V '' ATDT*99# ABORT 'NO CARRIER' CONNECT" /dev/ttyUSB2 ATDT*99# NO CARRIERScript chat -V '' ATDT*99# ABORT 'NO CARRIER' CONNECT finished (pid 26609), status = 0x4 Connect script failed Disconnecting QMI: bjorn@nemi:/usr/local/src/git/libqmi-glib$ PATH=cli:$PATH utils/qmi-network /dev/cdc-wdm0 stop Loading previous state... Previous CID: 1 Previous PDH: 39639200 Stopping network with 'qmicli -d /dev/cdc-wdm0 --wds-stop-network=39639200 --client-cid=1'... Network stopped successfully Clearing state... PPP now works: nemi:/home/bjorn# pppd noauth debug nodetach connect "chat -V '' ATDT*99# ABORT 'NO CARRIER' CONNECT" /dev/ttyUSB2 ATDT*99# CONNECTScript chat -V '' ATDT*99# ABORT 'NO CARRIER' CONNECT finished (pid 26628), status = 0x0 Serial connection established. using channel 1 Using interface ppp0 Connect: ppp0 <--> /dev/ttyUSB2 sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xaf01574f> <pcomp> <accomp>] rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xd8fbaea5> <pcomp> <accomp>] No auth is possible sent [LCP ConfRej id=0x0 <auth chap MD5>] rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xaf01574f> <pcomp> <accomp>] rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xd8fbaea5> <pcomp> <accomp>] sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xd8fbaea5> <pcomp> <accomp>] sent [LCP EchoReq id=0x0 magic=0xaf01574f] sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>] sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0>] rcvd [LCP DiscReq id=0x2 magic=0xd8fbaea5] rcvd [LCP EchoRep id=0x0 magic=0xd8fbaea5 af 01 57 4f] rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f] Protocol-Reject for 'Compression Control Protocol' (0x80fd) received rcvd [IPCP ConfReq id=0x0] sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>] rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>] sent [IPCP ConfReq id=0x2 <addr 0.0.0.0>] rcvd [IPCP ConfReq id=0x1] sent [IPCP ConfAck id=0x1] rcvd [IPCP ConfNak id=0x2 <addr 10.105.75.185>] sent [IPCP ConfReq id=0x3 <addr 10.105.75.185>] rcvd [IPCP ConfAck id=0x3 <addr 10.105.75.185>] Could not determine remote IP address: defaulting to 10.64.64.64 local IP address 10.105.75.185 remote IP address 10.64.64.64 Script /etc/ppp/ip-up started (pid 26637) Script /etc/ppp/ip-up finished (pid 26637), status = 0x0 Attempting to start a network connection via QMI while the PPP session is up fails: bjorn@nemi:/usr/local/src/git/libqmi-glib$ PATH=cli:$PATH utils/qmi-network /dev/cdc-wdm0 start Starting network with 'qmicli -d /dev/cdc-wdm0 --wds-start-network --client-no-release-cid'... error: couldn't start network: QMI protocol error (14): 'call-failed' call end reason: 1 verbose call end reason: 204, 2 Saving state... (CID: 2) error: network start failed, no packet data handle Clearing state... Bring down the PPP session, and QMI works again: ^CTerminating on signal 2 Connect time 5.1 minutes. Sent 0 bytes, received 0 bytes. Script /etc/ppp/ip-down started (pid 26709) sent [LCP TermReq id=0x2 "User request"] rcvd [LCP TermAck id=0x2] Connection terminated. Script /etc/ppp/ip-down finished (pid 26709), status = 0x0 bjorn@nemi:/usr/local/src/git/libqmi-glib$ PATH=cli:$PATH utils/qmi-network /dev/cdc-wdm0 start Starting network with 'qmicli -d /dev/cdc-wdm0 --wds-start-network --client-no-release-cid'... Saving state... (CID: 3) Saving state... (PDH: 39639200) Network started successfully This is how things *should* work, but modem firmware quality is one of the few remaining differences between the manufacturers... Bjørn -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html