establishing lte connection with ppp "Protocol 0x80fd (Compression Control Protocol) was rejected!"

Today I had the bright idea to try and configure the LTE modem on my new-ish work laptop (Thinkpad T16).

It has been ~10-15 years since i had to fight against deal with ppp back when DSL lines were common. I have nothing but the worst memories of those times, and ppp once again doesn't fail to deliver the same experience.

The modem is a Quectel EM05-G, which works with the u3g driver.
Thanks to the fact that ppp and AT commands are almost as ancient as sticks that burn on one side, documentation about both (ppp and AT, not the sticks) are just as ancient. The ppp(8) manpage doesn't even mention any mobile connections, but I found some article from 11 years ago that gave me a working sequence of AT commands to establish a connection: (the default u3g config won't work)

My resulting ppp.conf (relevant parts) looks as follows:
Code:
default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION

 # Ensure that "device" references the correct serial port
 # for your modem. (cuau0 = COM1, cuau1 = COM2)
 #
 set device /dev/cuau0

 set speed 115200
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ 
           \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
 set timeout 180            # 3 minute idle timer (the default)
# enable dns                # request DNS info (for resolv.conf)

sipgate:
 set device /dev/cuaU0
 set timeout 0
 set authname sipgate
 set dial "ABORT BUSY TIMEOUT 3 \ 
        \"\" \
        AT OK-AT-OK \
        AT+CMEE=2 OK-AT-OK \
        AT+CSQ OK \
        AT+CGDCONT=1,\\\"IP\\\",\\\"sipgate\\\" OK \
        ATD*99# CONNECT"
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR

The provider (sipgate) only 'requires' the APN name and username to be set (='sipgate'). If required by the device/software, a dial-in number of *99# should be used.

Trying to connect produces the following log: (as quote so the block will be collapsed)
Code:
Jul  6 10:17:07 hal9000 ppp[30942]: Phase: Using interface: tun0
Jul  6 10:17:07 hal9000 ppp[30942]: Phase: deflink: Created in closed state
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: ident user-ppp VERSION
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: set device /dev/cuau0
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: set speed 115200
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: set dial ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5            "" AT OK-AT-OK ATE1Q0 OK \dATDT\T TIMEOUT 40 CONNECT
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: set timeout 180
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set device /dev/cuaU0
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set timeout 0
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set authname sipgate
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: disable deflate pred1
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set dial ABORT BUSY TIMEOUT 3         ""         AT OK-AT-OK         AT+CMEE=2 OK-AT-OK         AT+CSQ OK         AT+CGDCONT=1,\"IP\",\"sipgate\" OK         ATD*99# CONNECT
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: add default HISADDR
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: PPP Started (foreground mode).
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: bundle: Establish
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: deflink: closed -> opening
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: deflink: Connected!
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: deflink: opening -> dial
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: deflink: Dial attempt 1 of 1
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: AT^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): OK
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: AT^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: OK^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: AT+CMEE=2^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): OK
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: AT+CMEE=2^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: OK^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: AT+CSQ^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): OK
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: AT+CSQ^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: +CSQ: 99,99^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: ^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: OK^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: AT+CGDCONT=1,"IP","sipgate"^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): OK
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: AT+CGDCONT=1,"IP","sipgate"^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: OK^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: ATD*99#^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): CONNECT
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: ATD*99#^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: CONNECT 150000000^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: deflink: dial -> carrier
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: Phase: deflink: /dev/cuaU0: CD detected
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: Phase: deflink: carrier -> login
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: Phase: deflink: login -> lcp
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: LCP: FSM: Using "deflink" as a transport
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: LCP: deflink: State change Initial --> Closed
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: LCP: deflink: State change Closed --> Stopped
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: LayerStart
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: SendConfigReq(1) state = Stopped
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACFCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  PROTOCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACCMAP[6] 0x00000000
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MRU[4] 1500
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MAGICNUM[6] 0xb3f3b8bb
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: State change Stopped --> Req-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: RecvConfigReq(36) state = Req-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACCMAP[6] 0x00000000
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  AUTHPROTO[5] 0xc223 (CHAP 0x05)
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MAGICNUM[6] 0xd1680cf3
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  PROTOCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACFCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: SendConfigAck(36) state = Req-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACCMAP[6] 0x00000000
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  AUTHPROTO[5] 0xc223 (CHAP 0x05)
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MAGICNUM[6] 0xd1680cf3
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  PROTOCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACFCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: State change Req-Sent --> Ack-Sent
Jul  6 10:17:07 hal9000 ppp[30942]: Phase: Using interface: tun0
Jul  6 10:17:07 hal9000 ppp[30942]: Phase: deflink: Created in closed state
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: ident user-ppp VERSION
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: set device /dev/cuau0
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: set speed 115200
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: set dial ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5            "" AT OK-AT-OK ATE1Q0 OK \dATDT\T TIMEOUT 40 CONNECT
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: default: set timeout 180
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set device /dev/cuaU0
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set timeout 0
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set authname sipgate
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: disable deflate pred1
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set dial ABORT BUSY TIMEOUT 3         ""         AT OK-AT-OK         AT+CMEE=2 OK-AT-OK         AT+CSQ OK         AT+CGDCONT=1,\"IP\",\"sipgate\" OK         ATD*99# CONNECT
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Command: sipgate: add default HISADDR
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: PPP Started (foreground mode).
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: bundle: Establish
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: deflink: closed -> opening
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: deflink: Connected!
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: deflink: opening -> dial
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: deflink: Dial attempt 1 of 1
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: AT^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): OK
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: AT^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: OK^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: AT+CMEE=2^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): OK
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: AT+CMEE=2^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: OK^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: AT+CSQ^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): OK
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: AT+CSQ^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: +CSQ: 99,99^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: ^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: OK^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: AT+CGDCONT=1,"IP","sipgate"^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): OK
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: AT+CGDCONT=1,"IP","sipgate"^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: OK^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Send: ATD*99#^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Expect(3): CONNECT
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: ATD*99#^M^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Chat: Received: CONNECT 150000000^M
Jul  6 10:17:07 hal9000 ppp[30942]: tun0: Phase: deflink: dial -> carrier
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: Phase: deflink: /dev/cuaU0: CD detected
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: Phase: deflink: carrier -> login
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: Phase: deflink: login -> lcp
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: LCP: FSM: Using "deflink" as a transport
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: LCP: deflink: State change Initial --> Closed
Jul  6 10:17:08 hal9000 ppp[30942]: tun0: LCP: deflink: State change Closed --> Stopped
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: LayerStart
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: SendConfigReq(1) state = Stopped
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACFCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  PROTOCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACCMAP[6] 0x00000000
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MRU[4] 1500
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MAGICNUM[6] 0xb3f3b8bb
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: State change Stopped --> Req-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: RecvConfigReq(36) state = Req-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACCMAP[6] 0x00000000
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  AUTHPROTO[5] 0xc223 (CHAP 0x05)
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MAGICNUM[6] 0xd1680cf3
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  PROTOCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACFCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: SendConfigAck(36) state = Req-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACCMAP[6] 0x00000000
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  AUTHPROTO[5] 0xc223 (CHAP 0x05)
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MAGICNUM[6] 0xd1680cf3
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  PROTOCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACFCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: State change Req-Sent --> Ack-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: RecvConfigAck(1) state = Ack-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACFCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  PROTOCOMP[2]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  ACCMAP[6] 0x00000000
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MRU[4] 1500
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MAGICNUM[6] 0xb3f3b8bb
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: State change Ack-Sent --> Opened
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: LayerUp
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: SendIdent(0) state = Opened
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  MAGICNUM b3f3b8bb
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP:  TEXT user-ppp 3.4.2
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: Phase: bundle: Authenticate
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: Phase: deflink: his = CHAP 0x05, mine = none
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: RecvDiscardReq(37) state = Opened
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: Phase: Chap Input: CHALLENGE (16 bytes from UMTS_CHAP_SRVR)
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: Phase: Chap Output: RESPONSE (sipgate)
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: Phase: Chap Input: SUCCESS
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: IPCP: Using trigger address 0.0.0.0
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: CCP: FSM: Using "deflink" as a transport
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: CCP: deflink: State change Initial --> Closed
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: CCP: deflink: LayerStart.
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: CCP: MPPE: Not usable without CHAP81
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: CCP: deflink: SendConfigReq(1) state = Closed
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: CCP:   [EMPTY]
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: CCP: deflink: State change Closed --> Req-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: Phase: deflink: lcp -> open
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: Phase: bundle: Network
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: IPCP: FSM: Using "deflink" as a transport
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: IPCP: deflink: State change Initial --> Closed
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: IPCP: deflink: LayerStart.
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: IPCP: deflink: SendConfigReq(1) state = Closed
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: IPCP:  IPADDR[6] 0.0.0.0
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: IPCP: deflink: State change Closed --> Req-Sent
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: RecvProtocolRej(38) state = Opened
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: -- Protocol 0x80fd (Compression Control Protocol) was rejected!
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: CCP: deflink: State change Req-Sent --> Stopped
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: Carrier lost
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: CCP: deflink: State change Stopped --> Closed
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: CCP: deflink: State change Closed --> Initial
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: LCP: deflink: LayerDown
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: LCP: deflink: State change Opened --> Starting
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: open -> lcp
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Warning: ff02::/: Change route failed: errno: Network is unreachable
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: IPCP: deflink: State change Req-Sent --> Starting
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: IPCP: deflink: LayerFinish.
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: IPCP: Connect time: 1 secs: 0 octets in, 0 octets out
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: IPCP: 0 packets in, 0 packets out
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: IPCP:  total 0 bytes/sec, peak 0 bytes/sec on Thu Jul  6 10:17:09 2023
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: IPCP: deflink: State change Starting --> Initial
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: bundle: Terminate
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: LCP: deflink: LayerFinish
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: LCP: deflink: State change Starting --> Initial
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: Disconnected!
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: lcp -> logout
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: Disconnected!
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: logout -> hangup
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: Connect time: 3 secs: 218 octets in, 228 octets out
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: 5 packets in, 7 packets out
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase:  total 148 bytes/sec, peak 111 bytes/sec on Thu Jul  6 10:17:10 2023
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: deflink: hangup -> closed
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: bundle: Dead
Jul  6 10:17:10 hal9000 ppp[30942]: tun0: Phase: PPP Terminated (normal).

From what I'm guessing from that, everything seems to be OK up until this point:
Code:
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: RecvProtocolRej(38) state = Opened
Jul  6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: -- Protocol 0x80fd (Compression Control Protocol) was rejected!

So I tried adding disable vj deflate pred1 as those are the compression protocols that may be involved according to ppp(8), when disabling all three, there is no more 'Protocol was rejected' message, but the connection also isn't established. Leaving any of those 3 protocols enabled always leads to the 'CCP was rejected' message.

As there is also an error about MPPE (which I don't need?), I also added disable mppe, which muffles the messages about MPPE, but connection still fails with "Compression Control Protocol was rejected" (if one or more of the protocols are enabled).



I'm on thte brink of throwing that modem out, use some plastic lte router and refuse to touch ppp ever again, so any help with this will be highly appreciated.
 
Leaving any of those 3 protocols enabled always leads to the 'CCP was rejected'
If I recall correctly this is fine, it's just part of the negotiation. Client and server are just trying to negotiate some common ground. Shouldn't lead to a disconnect.
 
  • Thanks
Reactions: sko
But ppp always exits and tears down tun0, so I never get a usable connection/interface out of this...

I also tried a manual connection as shown in the manpage (with adjusted/added options for my isp of course..), but the most I get after initiating the connection via atd*99#, is a stalled connection with "PPp" state. In this case tun0 is still there, but without any address:
Code:
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        groups: tun
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        Opened by PID 89527

(ifaddress was set with the same command stated in the ppp.conf)

According to the manpage the last step to get to the "PPP" prompt is the two peers agreeing on IP numbers - so this never happens and the "set ifaddr" I entered seems to be ignored.


heres the full manual ppp session:
Code:
Working in interactive mode
tun0: Command: default: ident user-ppp VERSION
tun0: Command: default: set device /dev/cuaU0
tun0: Command: default: set speed 921600
Using interface: tun0
tun0: Phase: PPP Started (interactive mode).
ppp ON hal9000> set device /dev/cuaU0
tun0: Command: /dev/pts/3: set device /dev/cuaU0
ppp ON hal9000> set authname sipgate
tun0: Command: /dev/pts/3: set authname sipgate
ppp ON hal9000> set authkey
tun0: Command: /dev/pts/3: set authkey
ppp ON hal9000> set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0    
tun0: Command: /dev/pts/3: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0    
ppp ON hal9000> set log local phase ipcp
tun0: Command: /dev/pts/3: set log local phase ipcp
ppp ON hal9000> term
Phase: bundle: Establish
Phase: deflink: closed -> opening
Phase: deflink: Connected!
deflink: Entering terminal mode on /dev/cuaU0
Type `~?' for help
Phase: deflink: opening -> carrier
Phase: deflink: /dev/cuaU0 doesn't support CD
Phase: deflink: carrier -> ready
at
OK
atd*99#
CONNECT 150000000
~p
Phase: deflink: ready -> carrier

Packet mode.
Phase: deflink: carrier -> lcp
ppp ON hal9000> Phase: bundle: Authenticate
Phase: deflink: his = CHAP 0x05, mine = none
Ppp ON hal9000> Phase: Chap Input: CHALLENGE (16 bytes from UMTS_CHAP_SRVR)
Phase: Chap Output: RESPONSE (sipgate)
Phase: Chap Input: SUCCESS
Phase: deflink: lcp -> open
Phase: bundle: Network
IPCP: FSM: Using "deflink" as a transport
IPCP: deflink: State change Initial --> Closed
IPCP: deflink: LayerStart.
IPCP: deflink: SendConfigReq(1) state = Closed
IPCP:  IPADDR[6] 127.0.0.1
IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
IPCP: deflink: State change Closed --> Req-Sent
PPp ON hal9000> IPCP: deflink: SendConfigReq(1) state = Req-Sent
IPCP:  IPADDR[6] 127.0.0.1
IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
IPCP: deflink: SendConfigReq(1) state = Req-Sent
IPCP:  IPADDR[6] 127.0.0.1
IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
IPCP: deflink: SendConfigReq(1) state = Req-Sent
IPCP:  IPADDR[6] 127.0.0.1
IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
IPCP: deflink: SendConfigReq(1) state = Req-Sent
IPCP:  IPADDR[6] 127.0.0.1
IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
IPCP: deflink: LayerFinish.
IPCP: Connect time: 16 secs: 0 octets in, 0 octets out
IPCP: 0 packets in, 0 packets out
IPCP:  total 0 bytes/sec, peak 0 bytes/sec on Thu Jul  6 13:15:51 2023
IPCP: deflink: State change Req-Sent --> Stopped

and some additional info:
Code:
PPp ON hal9000> show lcp
deflink: LCP [Opened]
 his side: MRU 1500, ACCMAP 00000000, PROTOCOMP on, ACFCOMP on,
           MAGIC d20ba92f, MRRU 0, SHORTSEQ off, REJECT 0000
 my  side: MRU 1500, ACCMAP 00000000, PROTOCOMP on, ACFCOMP on,
           MAGIC adf4dd50, MRRU 0, SHORTSEQ on, REJECT 0000

 Defaults: MRU = any (max 2048), MTU = any (max 2048), ACCMAP = 00000000
           LQR period = 30s, Open Mode = active (delay 1s)
           FSM retry = 3s, max 5 Config REQs, 5 Term REQs
    Ident: user-ppp VERSION

 Negotiation:
           ACFCOMP =   enabled & accepted
           CHAP =      disabled & accepted
           CHAP80 =    disabled & accepted
           LANMan =    disabled & denied
           CHAP81 =    disabled & accepted
           LQR =       disabled & accepted
           LCP ECHO =  disabled
           PAP =       disabled & accepted
           PROTOCOMP = enabled & accepted
PPp ON hal9000> show ipcp
IPCP [Stopped]

Defaults:
 FSM retry = 3s, max 5 Config REQs, 5 Term REQs
 My Address:      10.0.0.1
 VJ compression:  enabled & accepted (16 slots with slot compression)
 His Address:     10.0.0.2
 DNS:             none, disabled & denied
 Resolver DNS:    10.50.50.3
 NetBIOS NS:      0.0.0.0, 0.0.0.0

Connect time: 0:00:16 - down at Thu Jul  6 13:16:07 2023
0 octets in, 0 octets out
0 packets in, 0 packets out
  overall        0 bytes/sec
  average        0 bytes/sec in,      0 bytes/sec out (over the last 5 secs)
  peak           0 bytes/sec on Thu Jul  6 13:15:51 2023
PPp on hal9000> show link
Name: deflink
 State:              open
 Peer name:          None requested
 Discriminator:      Null Class

Defaults:
 Phone List:       
 Dial tries:         1, delay 3s/30s
 Reconnect tries:    0, delay 3s
 Callback requested: none
 Dial Script:      
 Login Script:     
 Logout Script:    
 Hangup Script:

(the 'Resolver DNS' is the one configured in resolv.conf and I don't want ppp to touch it, hence I didn't set 'enable dns')

According to the manpage, setting 'authname' and 'authkey' enables CHAP, yet its status is "disabled & accepted".
Configuring "enable chap" leads to an immediate disconnect with "Too many LCP REQs sent - abandoning negotiation"
 
set timeout 0
This don't look right.

Maybe you can find some differences here:
 
On Sierra MC7700 I have to change the port to cuaU0.3.
That is another good hint I left in that post.
Sometimes the DATA channel can be wonky to find.

I am assuming you have 3 or 4 /dev/cua* entries for the device?
example
cuaU0.0
cuaU0.1
cuaU0.2

Have you tried other channels in your /etc/ppp.conf?

Hint: the AT Command channel may not be the data channel.
Usually you can monitor the data channel with the AT Command prompt. Sometimes there are additional management channels too.
 
I don't see anything in the specs about it being a USB cellular modem but every one I have dealt with has been USB.

How about you do a usbconfig and determine usb port in use.

If not found in usbconfig it may need additional work to get working..
 
Once you find the USB port and confirm it is USB modem then do a search
ls /dev/cuaU*

At this point you will need to do some reasoning depending on devices.

Generally the modem will have 3-5 'channels'. These could be considered sub-ports of the master port.

They should be apparent from a quick search. (cuaU0.0,cuaU0.1,cuaU0.2 or maybe cuaU1.0,cuaU1.1,cuaU1.2)

So then what I suggest is using cu or your favorite terminal and start probing the channels.
cu -s 115200 -l /dev/cua0.3 Hit enter button multiple times and AT.

Warning if you attempt to connect to an active data channel with a terminal it can lockup the whole rig.

But you should probe the channels. Find the AT Console.

From there you have to make sure the modem is working with a protocol FreeBSD understands.
(Usually some AT commands to see options modem running called USB Composition)

Get this done then you can work with the OS tools. (ppp or mpd5 port for multithreading speed)

You can just plug in channels to ppp.conf until you get lucky (if the protocol in current use works with FreeBSD).

Personally I like to pull up the AT console and diag first. Check SIM status and signal strength.

Get to know your modem. It is a very complicated little device. Find your modems manual and extended AT command set.
 
From the link above:
1.4. AT Command Interface
EM05 AT command interface includes two USB ports (USB MODEM port and USB AT port). The two USB
ports support AT command communication and data transfer.

So pretty simple arrangment compared to Sierra.
Only two usb ports to try.
cu -s 115200 -l /dev/cuaU0.1
If that don't pull up an AT console then try the other channel:
cu -s 115200 -l /dev/cuaU0.0

Try the higher number port for AT command prompt first.
Once you find the AT Command prompt you should use the other port for ppp/mpd5
 
There is a good bit of information in the Linux setup guide.
Not totally relevant but good facts.
Basically PPP works out of box.
Please notice the test section on PPP script from above pdf.

4.1. Test AT Function
After the module is connected and the USB driver is loaded successfully, several device files will be
created in the directory /dev.

The AT port is usually /dev/ttyUSB2, which is the second ttyUSB port created by the USB serial option
driver.
So on FreeBSD it will be cuaU0.1 most likely for the AT Command Prompt.. PPP will use cuaU0.0
 
To close my thoughts here I wanted to call attention to the different modes or USB Compositions as documented in the Linux Guide.

So PPP is default but you also have MBIM and QMI which are both unsupported on FreeBSD.
But there is also RNDIS mode which we do support and would present the connection as a USB one.
So throw out PPP and use ifconfig with that method. ue0 would be the connection.
Not sure RNDIS would be quicker but it removes the single threaded PPP from the equation.
It might be possible on that module and if you wanna benchmark for max speed you want to consider it.
To use it you have to use AT commands to connect and pass credentials then it is always-on versus ppp dial-up session.

To say we are going to miss this guy is an understatement. HPS was FreeBSD.
It was ported to FreeBSD by Hans Petter Selasky <hps@FreeBSD.org>.


RNDIS Addendum:
See security note at bottom. Many modems enable a webserver with RNDIS mode for configuration.
Make sure yours doesn't flapp if on.
 
  • Thanks
Reactions: sko
Wow, first of all - thank you so much for your help Phishfry !!

I'll try and work through your posts/suggestions from top to bottom:

This don't look right.
(regarding the 'set timeout 0')

I also tried various other timeouts, although 'timeout' according to the mapage is the idle time after which the connection is dropped and '0' disables the timer (=what I want). As I never get a fully working connection, that timer does nothing right now...


No that is a dead end.
HISADDR is about default routes.


What about trying this?


Definatly a DHCP connection?

As I never receive any IP adress I can't set a default route, so the 'add default HISADDR' is never executed. I also did a tcpdump on the 'tun0' interface while the connection is at "PPp" state, but that interface is completely silent, so no DHCP either...

That is another good hint I left in that post.
Sometimes the DATA channel can be wonky to find.

I am assuming you have 3 or 4 /dev/cua* entries for the device?
example
cuaU0.0
cuaU0.1
cuaU0.2

Have you tried other channels in your /etc/ppp.conf?

Hint: the AT Command channel may not be the data channel.
Usually you can monitor the data channel with the AT Command prompt. Sometimes there are additional management channels t

Code:
# ls /dev | grep cua
cuaU0
cuaU0.init
cuaU0.lock

Trying any of 0.0....0.5 results in:
Code:
ppp ON hal9000> set device /dev/cuaU0.2
ppp ON hal9000> term
Phase: bundle: Establish
Phase: deflink: closed -> opening
Warning: deflink: /dev/cuaU0.2: Bad file descriptor
Phase: deflink: opening -> closed
Failed to open /dev/cuaU0.2
Phase: bundle: Dead

Yup there it is. ^^^^^ Wrong device I think. You need to find the right port or what i am calling channel.

Plus USB ports use the Big U in name.
cuaU0.0
cuaU0.1

Serial is cuau0.0

the "cuau0" entry was set by default in the "default" section and (I assume) is overriden by the "cuaU0" entry in the 'sipgate' section. I changed that entry to "cuaU0" anyways (and for cosmetics), but that didn't had any effect. Also in all my manual sessions I used "cuaU0"

I don't see anything in the specs about it being a USB cellular modem but every one I have dealt with has been USB.

How about you do a usbconfig and determine usb port in use.

If not found in usbconfig it may need additional work to get working..

Once you find the USB port and confirm it is USB modem then do a search
ls /dev/cuaU*

At this point you will need to do some reasoning depending on devices.

Generally the modem will have 3-5 'channels'. These could be considered sub-ports of the master port.

They should be apparent from a quick search. (cuaU0.0,cuaU0.1,cuaU0.2 or maybe cuaU1.0,cuaU1.1,cuaU1.2)

So then what I suggest is using cu or your favorite terminal and start probing the channels.
cu -s 115200 -l /dev/cua0.3 Hit enter button multiple times and AT.

Warning if you attempt to connect to an active data channel with a terminal it can lockup the whole rig.

But you should probe the channels. Find the AT Console.

From there you have to make sure the modem is working with a protocol FreeBSD understands.
(Usually some AT commands to see options modem running called USB Composition)

Get this done then you can work with the OS tools. (ppp or mpd5 port for multithreading speed)

You can just plug in channels to ppp.conf until you get lucky (if the protocol in current use works with FreeBSD).

Personally I like to pull up the AT console and diag first. Check SIM status and signal strength.

Get to know your modem. It is a very complicated little device. Find your modems manual and extended AT command set.

It is definitely a usb modem:
Code:
# usbconfig | grep Quec
ugen1.3: <Quectel Quectel EM05-G> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

There seem to be different variants (e.g. -E, -G) for different contries/regdomains of that "EM05" and other Quectel chipsets, so I had to add the '-G' variant to the 'u3g' and 'usbdevs' drivers as described in several tutorials (e.g. the one I linked to in the first post):
Code:
# git diff
diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c
index d577508fff37..0fa64cbca5db 100644
--- a/sys/dev/usb/serial/u3g.c
+++ b/sys/dev/usb/serial/u3g.c
@@ -514,6 +514,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
        U3G_DEV(QUANTA, Q111, 0),
        U3G_DEV(QUECTEL, EC25, 0),
        U3G_DEV(QUECTEL, EM05, 0),
+       U3G_DEV(QUECTEL, EM05_G, 0),
        U3G_DEV(QUECTEL, EM12_G, 0),
        U3G_DEV(QUECTEL, EP06_E, 0),
        U3G_DEV(SIERRA, AC402, 0),
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 81abe91d93b4..3d8007f2aafa 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -3983,6 +3983,7 @@ product QUANTA RW6815R            0xf003  HP iPAQ rw6815 RNDIS
 /* Quectel products */
 product QUECTEL EC25           0x0125  LTE modem
 product QUECTEL EM05           0x0127  LTE modem
+product QUECTEL EM05_G         0x030a  LTE modem
 product QUECTEL EP06_E         0x0306  LTE modem
 product QUECTEL EM12_G          0x0512  LTE modem

Also, there are no 'cuaU0.N' devices and any attempt to connect to one fails:
Code:
709 root@hal9000:~ # cu -s 115200 -l /dev/cuaU0.0
/dev/cuaU0.0: No such file or directory
link down
710 root@hal9000:~ # cu -s 115200 -l /dev/cuaU0.1
/dev/cuaU0.1: No such file or directory
link down
711 root@hal9000:~ # cu -s 115200 -l /dev/cuaU0.2
/dev/cuaU0.2: No such file or directory
link down
[...]
Only connecting to /dev/cuaU0 works and I can issue AT commands and get replies (same as in the manual ppp sessions).


But there is also RNDIS mode which we do support and would present the connection as a USB one.
So throw out PPP and use ifconfig with that method. ue0 would be the connection.
Not sure RNDIS would be quicker but it removes the single threaded PPP from the equation.
It might be possible on that module and if you wanna benchmark for max speed you want to consider it.
To use it you have to use AT commands to connect and pass credentials then it is always-on versus ppp dial-up session.
To say we are going to miss this guy is an understatement. HPS was FreeBSD.
It was ported to FreeBSD by Hans Petter Selasky <hps@FreeBSD.org>.


RNDIS Addendum:
See security note at bottom. Many modems enable a webserver with RNDIS mode for configuration.
Make sure yours doesn't flapp if on.

RNDIS sounds very promising. I'll definitely give that a try!

I was also very sad to hear about HPS. He really is one of those unsung heroes - his code and contributions are so widely used, I doubt even 1% of people who use and rely on something he wrote even heard about him.


I'll dig into the RNDIS topic for a bit and report back.
HUGE thanks again Phishfry
 
I am not 100 percent sure the USB network interface is RNDIS. It could be CDC_ETHER too which we have support for too.
Both are USB interfaces. Once you switch it with the AT command a new interface ue0 will appear. The driver will load automatically.

See AT command guide from above:
4.3.14. AT+QCFG="usbnet" Networking over USB Protocol Configuration
 
Is that the PID of your module? If so you need to add it to usbdevs too and recompile.

Thats the "plain" EM05 chipset, I have the EM05-G variant /w PID 030a. At least for other EMxx chipsets I found the explanaiton, that those -E/-G variants only refer to different regdomains and their respective frequencies for LTE.

I am not 100 percent sure the USB network interface is RNDIS. It could be CDC_ETHER too which we have support for too.
Both are USB interfaces. Once you switch it with the AT command a new interface ue0 will appear. The driver will load automatically.

See AT command guide from above:

I couldn't find any reference to rndis in the Quectel documents (e.g. the AT command reference). I also couldn't switch to any other mode with sysutils/usb_modeswitch.

But cdce / usbnet looks like it may work:
Code:
# cu -s 115200 -l /dev/cuaU0
Connected
AT
OK
AT+QCFG="usbnet"
+QCFG: "usbnet",2

OK
AT+QCFG="usbnet",2
OK

dmesg:
Code:
ue0: <USB Ethernet> on cdce0
ue0: Ethernet address: a2:58:16:ef:ff:ed

after sending 'NDISUP=1,1,"sipgate"' to the control device (/dev/cuaU0) I even get an IP on the ue0 interface:
Code:
# dhclient ue0
DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 4
DHCPOFFER from 192.168.225.1
unknown dhcp option value 0x78
DHCPREQUEST on ue0 to 255.255.255.255 port 67
DHCPACK from 192.168.225.1
unknown dhcp option value 0x78
bound to 192.168.225.25 -- renewal in 21600 seconds.

Now I only need the default route, because 192.168.225.1 doesn't seem to be the router out of that rfc1819 subnet...

edit: according to the lease 192.168.225.1 should be the default route, but that host doesn't route anything. Except for the DHCP replies, I don't have any incoming packets on ue0...
Code:
# grep routers /var/db/dhclient.leases.ue0
  option routers 192.168.225.1;

Could this be just some intermediate connection for some tunnel I need to establish?
TBH I never had to deal with any cellular connections, but the few times I had to troubleshoot such uplinks, I always fell over such weird, often layered tunnels/point-to-point connections that usually all end in some private address space that's completely useless for a proper router uplink... (hence I usually had to add *another* layer of e.g. gif/gre tunnel to provide that host with a routable IP...)
 

/dev/cuaU0
Something just don't seem right without channels.
I quoted the manual that stated you will see ttys1 and ttys2 on Linux.
You should see identical on FreeBSD albeit different port numbers. (cuaU0.0,cuaU0.1)

If you don't get anywhere recheck you VID and PID stuff. Something may be slightly off there.
I did not find that PID in the manual either which is strange.
I had assumed you had 0125x which is supported by FreeBSD and from the Linux Guide includes;
EC20 R2.0/EC20 R2.1/EC25/EG25-G/EM05:
VID: 0x2c7c PID: 0x0125
But it sounds like you may have this PID?
EG06/EP06/EM06:
VID: 0x2c7c PID: 0x0306
From page 11 of pdf


Please show usbconfig -u? -a? dump_device_desc
Fill in the question marks with ugen output
u=unit a=address
 
Maybe the device don't use channel/sub-ports like all modems I have encountered.
Maybe it is a literal second serial/USB port address.

Do you see cuaU0 and cuaU1 ??
 
Code:
# usbconfig -u1 -a2 dump_device_desc
ugen1.2: <Quectel Quectel EM05-G> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00ef  <Miscellaneous device>
  bDeviceSubClass = 0x0002 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x2c7c 
  idProduct = 0x030a 
  bcdDevice = 0x0318 
  iManufacturer = 0x0001  <Quectel>
  iProduct = 0x0002  <Quectel EM05-G>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

This PID has been added to u3g.c and usbdevs (see diff in earlier post) and after that it appeared as /dev/cuaU0

there never was any other device than cuaU0 and no sub-devices (0.N), only cuaU0.init and cuaU0.lock
 
I don't see the module PID here either.
3.2.1. Add VID and PID
In order to recognize the module, the module’s VID and PID information as below need to be added to the
file [KERNEL]/drivers/usb/serial/option.c.

static const struct usb_device_id option_ids[] = {
#if 1 //Added by Quectel

{ USB_DEVICE(0x2C7C, 0x0125) }, /* Quectel EC20 R2.0/EC20 R2.1/EC25/EG25-G/EM05 */
{ USB_DEVICE(0x2C7C, 0x0121) }, /* Quectel EC21/EG21-G */
{ USB_DEVICE(0x2C7C, 0x0191) }, /* Quectel EG91 */
{ USB_DEVICE(0x2C7C, 0x0195) }, /* Quectel EG95 */
{ USB_DEVICE(0x2C7C, 0x0306) }, /* Quectel EG06/EP06/EM06 */
{ USB_DEVICE(0x2C7C, 0x0512) }, /* Quectel EG12/EM12/EG18 */
{ USB_DEVICE(0x2C7C, 0x0296) }, /* Quectel BG96 */
{ USB_DEVICE(0x2C7C, 0x0700) }, /* Quectel BG95/BG77/BG600L-M3/BC69 */
{ USB_DEVICE(0x2C7C, 0x0435) }, /* Quectel AG35 */
{ USB_DEVICE(0x2C7C, 0x0415) }, /* Quectel AG15 */
{ USB_DEVICE(0x2C7C, 0x0452) }, /* Quectel AG520R */
{ USB_DEVICE(0x2C7C, 0x0455) }, /* Quectel AG550R */
{ USB_DEVICE(0x2C7C, 0x0620) }, /* Quectel EG20 */
{ USB_DEVICE(0x2C7C, 0x0800) }, /* Quectel RG500Q/RM500Q/RG510Q/RM510Q */
#endif
 
DHCPOFFER from 192.168.225.1.
Well regardless you got past that so this looks weird as you alluded to.
A private IP range versus public.

So because you are using AT commands to connect you know the solution has to be with extended AT commands.

You are connected to somebodies gear. Now time to figure out who/what/where/when/why.

Start at the SIM querying. Everything checkout there OK? What about tower? Does it show what you are connected to?
There are codes for tower numbers you might have to cross ref. Is it connecting to the tower you expect?
 
Here are some sections to help you out. Some of this (AT+COPS) looks very much like Sierra modem setup.
So from the Quectel AT Guide this is the quick scan of existing network connection settings:
6.9 AT+QNWINFO Query Network Information
6.10 AT+QSPN Display the Name of Registered Network

But start at Section 5.9 and check SIM.
AT+QINISTAT Query Initialization Status of (U)SIM Card

Then the meat and potatoes is Section 6 'Network Service Commands'
Check settings of 6.1 thru 6.5 for diagnosis after quick scan if needed.

I have also seen problems with modems going into LP mode. Low Power.
What reminded me was this setting that you might want to verify.
Sleep Mode. It works bad sometimes too.

10.5. AT+QSCLK Enable/Disable Entering into Sleep Mode
 
I'm still thinking this is about what it says on the tin: i.e. a failed protocol negotiation, specifically CCP, but it's not clear what's missing|wrong.

From what I'm guessing from that, everything seems to be OK up until this point:
Code:
Jul 6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: RecvProtocolRej(38) state = Opened
Jul 6 10:17:09 hal9000 ppp[30942]: tun0: LCP: deflink: -- Protocol 0x80fd (Compression Control Protocol) was rejected!

Yep, though there could be a precursor earlier.

So I tried adding disable vj deflate pred1 as those are the compression protocols that may be involved according to ppp(8), when disabling all three, there is no more 'Protocol was rejected' message, but the connection also isn't established. Leaving any of those 3 protocols enabled always leads to the 'CCP was rejected' message.

Since you've changed some things along the way, some maybe back again, please list your current ppp.conf?

I found a conf from July '98 (25y ago!) with both dialout and dialin sections, but am yet to find matching logs, but first let's see current conf.
 
Back
Top