Install Raspbian Jessie
Download Raspbian Jessie and copy the image to your SD card, see Raspberry PI README for detailed installation instruction.
Install needed packages
apt-get install ppp usb-modeswitch usb-modeswitch-data
|
Add customized usb_modeswitch configuration
Create a file with name "12d1:1f01" in /etc/usb_modeswitch.d with following content
# Huawei E353 (3.se)
TargetVendor= 0x12d1
TargetProduct= 0x1f01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NoDriverLoading=1
|
Reboot the Raspberry Pi
Verifing that the Modem Mode is active now
Run commmand
last lines of output should now show it attached to ttyUSBX
[ 153.452085] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 153.452879] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 153.458673] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
|
Add new interface "gprs"
Add the following 3 lines to file /etc/network/interfaces
auto gprs
iface gprs inet ppp
provider gprs
|
Add new provider "gprs"
Create new file 'grps' in /etc/ppp/peers with following content
user "emnify"
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T em"
/dev/ttyUSB0
noipdefault
defaultroute
replacedefaultroute
hide-password
noauth
persist
usepeerdns
|
Bringing up the new interface manually (it will come up automatically on next boot)
Monitoring the PPP connection
Mar 26 17:42:35 raspberrypi pppd[1783]: Serial connection established.
Mar 26 17:42:35 raspberrypi pppd[1783]: Using interface ppp0
Mar 26 17:42:35 raspberrypi pppd[1783]: Connect: ppp0 <--> /dev/ttyUSB0
Mar 26 17:42:37 raspberrypi pppd[1783]: Remote message: Greetings!!
Mar 26 17:42:37 raspberrypi pppd[1783]: PAP authentication succeeded
Mar 26 17:42:37 raspberrypi pppd[1783]: Could not determine remote IP address: defaulting to 10.64.64.64
Mar 26 17:42:37 raspberrypi pppd[1783]: replacing old default route to eth0 [192.168.10.1]
Mar 26 17:42:37 raspberrypi pppd[1783]: local IP address 10.199.0.67
Mar 26 17:42:37 raspberrypi pppd[1783]: remote IP address 10.64.64.64
Mar 26 17:42:37 raspberrypi pppd[1783]: primary DNS address 8.8.8.8
Mar 26 17:42:37 raspberrypi pppd[1783]: secondary DNS address 8.8.4.4
|
Source at GitHub
Commenti
0 commenti
Accedi per aggiungere un commento.