0

我有一个带有这个GSM 帽子的 Raspberry PI,我想用它连接到移动网络。我尝试了几种gprs文件组合来实现这一点,但它们都不起作用。

我试图通过 wiki 上提供的说明进行操作。这导致了一个错误:

Script /usr/sbin/chat -v -f /etc/chatscripts/gprs finished (pid 1569), status = 0x3

当我使用此命令开始连接时:pppd call gprs &

如果我检查/var/log/syslog文件,我会得到这个:

pppd[991]: pppd 2.4.7 started by pi, uid 0
chat[994]: abort on (BUSY)
chat[994]: abort on (VOICE)
chat[994]: abort on (NO CARRIER)
chat[994]: abort on (NO DIALTONE)
chat[994]: abort on (NO DIAL TONE)
chat[994]: abort on (NO ANSWER)
chat[994]: abort on (DELAYED)
chat[994]: abort on (ERROR)
chat[994]: abort on (+CGATT: 0)
chat[994]: send (AT^M)
chat[994]: timeout set to 12 seconds
chat[994]: expect (OK)
chat[994]: alarm
chat[994]: Failed
pppd[991]: Script /usr/sbin/chat -v -f /etc/chatscripts/gprs finished (pid 993), status = 0x3
pppd[991]: Connect script failed

/etc/ppp/peers/gprs文件:

#!/bin/bash
user "myusername@realm"
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs"
#/dev/modem
/dev/ttyS0      
# Speed of the serial line.
115200
nocrtscts
debug
ipcp-accept-local
ipcp-accept-remote
# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
defaultroute
# Makes pppd "dial again" when the connection is lost.
persist
# Do not ask the remote to authenticate.
noauth

我还更改了/etc/chatscripts/gprs文件中的引脚:

# +CPIN provides the SIM card PIN
OK              "AT+CPIN=1234"
4

1 回答 1

0

你试过把服务提供者的APN放在gprs文件的第三行吗?购买 SIM 卡时会提供详细信息。

它应该是这样的:

connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T APN"

您可以在以下链接中找到示例:

https://www.rhydolabz.com/wiki/?p=16325

于 2021-12-17T07:32:23.933 回答