You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用pppd连接u-blox SARA-R422M8S模块后立即断开(LCP终止)求助

u-blox SARA-R422M8S-00B模块PPP连接建立后立即断开问题

问题背景

通过Python脚本向串口/dev/ttySC0的u-blox SARA-R422M8S-00B模块发送AT命令,所有命令均在200ms内收到OK响应(无响应时最多重发10次)。发送ATD*99***1#后收到CONNECT 150000000,但执行pppd命令后,ppp0接口刚建立连接就立即断开。

执行的AT命令序列

gprs_cmds = [
'+++',
'&K0',
'Z',
'',
'+CFUN=0',
'+CPSMS=0',
'+UMNOPROF=100',
'+CFUN=16',
'+UMNOPROF?',
'+CFUN=0',
'+URAT=9',
'+URAT?',
'+CFUN=16',
'+URAT?',
'+CFUN=0',
'+CGDCONT=1,"IP","{}","0.0.0.0",0,0'.format(ISP['apn']),
'+UAUTHREQ=1,2,"{}","{}"'.format(ISP['username'], ISP['password']),
'+CFUN=15',
'+CGATT=1',
'+CGACT=1,1',
'+CGDCONT?',
'+CGATT?',
'+CGACT?',
'+CGPADDR',
'+CGREG?',
'+CSQ',
'D{}'.format(ISP['phone_number']),
]

执行的pppd命令

sudo pppd debug nodetach maxfail 0 dump noauth nocrtscts user {} password {} {} {} modem asyncmap 0 default-mru mtu 1500 lcp-echo-failure 3 lcp-echo-interval 10 ipcp-accept-local ipcp-accept-remote noipdefault ipcp-restart 10 ipcp-max-configure 30 ipcp-max-failure 10 defaultroute replacedefaultroute noipv6 usepeerdns.format(ISP['username'], ISP['password'], serial_port, baud_rate)

pppd日志信息

May 17 10:10:36 raspberrypi pppd[4018]: CHAP authentication succeeded
May 17 10:10:36 raspberrypi pppd[4018]: CHAP authentication succeeded
May 17 10:10:36 raspberrypi pppd[4018]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
May 17 10:10:36 raspberrypi pppd[4018]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
May 17 10:10:36 raspberrypi pppd[4018]: rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
May 17 10:10:36 raspberrypi pppd[4018]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
May 17 10:10:37 raspberrypi pppd[4018]: rcvd [IPCP ConfReq id=0x0]
May 17 10:10:37 raspberrypi pppd[4018]: sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]
May 17 10:10:37 raspberrypi pppd[4018]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
May 17 10:10:37 raspberrypi pppd[4018]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
May 17 10:10:38 raspberrypi pppd[4018]: rcvd [IPCP ConfReq id=0x1]
May 17 10:10:38 raspberrypi pppd[4018]: sent [IPCP ConfAck id=0x1]
May 17 10:10:38 raspberrypi pppd[4018]: rcvd [IPCP ConfNak id=0x2 <addr 10.114.191.102> <ms-dns1 10.4.0.240> <ms-dns2 10.4.0.230>]
May 17 10:10:38 raspberrypi pppd[4018]: sent [IPCP ConfReq id=0x3 <addr 10.114.191.102> <ms-dns1 10.4.0.240> <ms-dns2 10.4.0.230>]
May 17 10:10:38 raspberrypi pppd[4018]: rcvd [IPCP ConfAck id=0x3 <addr 10.114.191.102> <ms-dns1 10.4.0.240> <ms-dns2 10.4.0.230>]
May 17 10:10:38 raspberrypi pppd[4018]: Could not determine remote IP address: defaulting to 10.64.64.64
May 17 10:10:38 raspberrypi pppd[4018]: Script /etc/ppp/ip-pre-up started (pid 4035)
May 17 10:10:38 raspberrypi pppd[4018]: Script /etc/ppp/ip-pre-up finished (pid 4035), status = 0x0
May 17 10:10:38 raspberrypi pppd[4018]: replacing old default route to wlan0 [192.168.1.1]
May 17 10:10:38 raspberrypi pppd[4018]: del old default route ioctl(SIOCDELRT): No such process(3)
May 17 10:10:38 raspberrypi pppd[4018]: local  IP address 10.114.191.102
May 17 10:10:38 raspberrypi pppd[4018]: remote IP address 10.64.64.64
May 17 10:10:38 raspberrypi pppd[4018]: primary   DNS address 10.4.0.240
May 17 10:10:38 raspberrypi pppd[4018]: secondary DNS address 10.4.0.230
May 17 10:10:38 raspberrypi pppd[4018]: updetach is set. Now detaching.
May 17 10:10:38 raspberrypi pppd[4038]: Script /etc/ppp/ip-up started (pid 4039)
May 17 10:10:38 raspberrypi avahi-daemon[312]: Got SIGHUP, reloading.
May 17 10:10:38 raspberrypi avahi-daemon[312]: No service file found in /etc/avahi/services.
May 17 10:10:38 raspberrypi pppd[4038]: Script /etc/ppp/ip-up finished (pid 4039), status = 0x0
May 17 10:10:38 raspberrypi pppd[4038]: rcvd [LCP TermReq id=0x3]
May 17 10:10:38 raspberrypi pppd[4038]: LCP terminated by peer
May 17 10:10:38 raspberrypi pppd[4038]: Connect time 0.0 minutes.
May 17 10:10:38 raspberrypi pppd[4038]: Sent 0 bytes, received 0 bytes.
May 17 10:10:38 raspberrypi pppd[4038]: Script /etc/ppp/ip-down started (pid 4110)
May 17 10:10:38 raspberrypi pppd[4038]: sent [LCP TermAck id=0x3]
May 17 10:10:38 raspberrypi avahi-daemon[312]: Got SIGHUP, reloading.
May 17 10:10:38 raspberrypi avahi-daemon[312]: No service file found in /etc/avahi/services.
May 17 10:10:38 raspberrypi pppd[4038]: Script /etc/ppp/ip-down finished (pid 4110), status = 0x0
May 17 10:10:41 raspberrypi pppd[4038]: Connection terminated.
May 17 10:10:42 raspberrypi pppd[4038]: Modem hangup
May 17 10:10:42 raspberrypi pppd[4038]: Exit.

疑问

  • 是否有其他用户遇到过类似问题?
  • 是否遗漏了必要的AT命令?
  • pppd参数配置是否存在错误?
  • 是否是运营商网络侧的问题导致连接断开?

内容的提问来源于stack exchange,提问作者cqmf-0

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.21 16:07:35