作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经设置了一个 ITEAD sim900 GSM 模块来与树莓派接口(interface)。我相信当我得到这些结果时,我已经通过 wvdial 建立了与 AT&T 的 gprs 连接。
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: AT+CGDCONT=1,"IP","Broadband"
AT+CGDCONT=1,"IP","Broadband"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Aug 14 05:49:20 2014
--> Pid of pppd: 2794
最佳答案
最后我得到了( raspberrypi + ppp + gprs/gsm-modem )工作。
开始前的一些注意事项:
AT+IPR=115200
将 SIM900 波特率设置为 115200 $ screen /dev/ttyAMA0 115200
类型 AT<enter>
它会回显:OK
.点击ctrl+a k y
退出。 ttyAMA0
115200
lock
crtscts
modem
passive
novj
defaultroute
replacedefaultroute
noipdefault
usepeerdns
noauth
hide-password
persist
holdoff 10
maxfail 0
debug
/etc/ppp/peers
目录:
$ mkdir /etc/ppp/peers
$ cd /etc/ppp/peers
file /etc/ppp/options-mobile
user "your_usr"
password "your_pass"
connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat"
file /etc/ppp/options-mobile
connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat"
/etc/ppp/chatscripts
目录:
$ mkdir /etc/ppp/chatscripts
ABORT 'BUSY'
ABORT 'NO CARRIER'
ABORT 'VOICE'
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT 'DELAYED'
REPORT CONNECT
TIMEOUT 6
'' 'ATQ0'
'OK-AT-OK' 'ATZ'
TIMEOUT 3
'OK' @/etc/ppp/chatscripts/pin
'OK\d-AT-OK' 'ATI'
'OK' 'ATZ'
'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'
'OK' @/etc/ppp/chatscripts/mode
'OK-AT-OK' @/etc/ppp/chatscripts/apn
'OK' 'ATDT*99***1#'
TIMEOUT 30
CONNECT ''
AT+CGDCONT=1,"IP","<apn-name>"
AT+CPIN=1234
AT
AT\^SYSCFG=14,2,3fffffff,0,1
AT\^SYSCFG=2,2,3fffffff,0,1
AT\^SYSCFG=13,1,3fffffff,0,0
AT\^SYSCFG=2,1,3fffffff,0,0
- The SYSCFG line in the mode.* files is device-dependent, and likely Huawei-specific, So You may use the
mode.NONE
file if your modem is SIM900. *
AT
$ ln -s /etc/ppp/chatscripts/my-operator-apn /etc/ppp/chatscripts/apn
$ ln -s /etc/ppp/chatscripts/mode.NONE /etc/ppp/chatscripts/mode
$ ln -s /etc/ppp/chatscripts/pin.NONE /etc/ppp/chatscripts/pin
mobile-auth
$ mv provider provider.example
$ ln -s /etc/ppp/peers/mobile-noauth /etc/ppp/peers/provider
$ tail -f /var/log/syslog | grep -Ei 'pppd|chat'
pon
命令查看结果:
$ pon
关于serial-port - 树莓派 sim900 默认上网,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25301229/
我是一名优秀的程序员,十分优秀!