赞
踩
Initialize the pin to avoid automatic switch
sudo nano pi_gpio_init.sh
echo "4" > /sys/class/gpio/export
sleep 0.1
echo "out" > /sys/class/gpio/gpio4/direction
echo "0" > /sys/class/gpio/gpio4/value
sh pi_gpio_init.sh
Add PID
The PID of SIM7070 is 9206, and the PID of SIM7080 is 9205. Generally, the linux system does not have this PID. You need to add the following:
- sudo su
- sudo modprobe option
- sudo sh -c 'echo "1e0e 9206" > /sys/bus/usb-serial/drivers/option1/new_id'
-
After successfully adding PID, a series of ttyUSB appears
PPP dial
sudo su
sudo apt-get install ppp
cd /etc/ppp
sudo nano sim7080-chat.dat
#/etc/ppp/sim7080-chat.dat
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'ERROR'
ABORT 'NO ANSWER'
ABORT 'BUSY' TIMEOUT 120
'' AT
OK ATE1
OK AT+CGDCONT=1,"IPV4V6","ibox.tim.it"
OK ATD*99#
CONNECT ''
cd /etc/ppp/peers
sudo nano sim7080option
#/etc/ppp/peers/ sim7080option
# This is pppd script for China Mobile, used SIMCOM Module
/dev/ttyUSB2
#/dev/pts/11
115200
nocrtscts
noauth
connect '/usr/sbin/chat -v -s -f /etc/ppp/sim7080-chat.dat'
disconnect '/usr/sbin/chat -e -v "" +++ath'
debug
ipcp-accept-local
ipcp-accept-remote
usepeerdns
defaultroute
lcp-echo-failure 3
lcp-echo-interval 2
#asyncmap ffffffff
#idle 48
pppd call sim7080option &
ifconfig
When the ppp0 network port appears, it means successful ppp dialing is successful.
ping -I ppp0 www.baidu.com
ECM dial
After connecting SIM7080 and Raspberry Pi via USB, enter minicom
sudo minicom -D /dev/ttyUSB2
Enter the following commands in the minicom interface
ATE1
AT+CUSBSELNV=1 //Configure VID=0x1E0E, and PID=0x9205 OK
AT+SECMEN=1 //Enable ECM auto connecting. OK
AT+CREBOOT //Reboot the module OK
Test network
ping -I eth1 www.baidu.com
refer manual
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。