Setup a WAN PPP connection with USB 3G Dongle on banana PI (Debian)

This instalation is done with Huawei E169 (3G dongle) using a SIMM card from NOS ( portuguese ISP ).

 

Install required packages

apt-get install netbase ifupdown ppp

In my bananapi the: netbase and ifupdown packages was allready installed

Insert the 3g dongle in the usb host.

lsusb

Bus 002 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem

ls -lisa /dev/ttyUSB*

1959651 0 crw-rw---- 1 root dialout 188, 0 Apr 12 20:20 /dev/ttyUSB0
1959652 0 crw-rw---- 1 root dialout 188, 1 Apr 12 04:37 /dev/ttyUSB1
1959654 0 crw-rw---- 1 root dialout 188, 2 Apr 12 04:37 /dev/ttyUSB2

If the the usb 3g dongle was not recognised a 3g modem device we need to install the usb-modeswitch

apt-get install usb-modeswitch

 

Create the file /etc/ppp/peers/gprs with this content:

user ""
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T intenet"
/dev/ttyUSB0
noipdefault
defaultroute
replacedefaultroute
hide-password
#lcp-echo-interval 30
#lcp-echo-failure 4
noauth
persist
#mtu 1492
#maxfail 0
#holdoff 20
usepeerdns
#Optional, make it always appear as ppp2:
#unit 2

 

As we dont need user or autenticantion we can skip the changes on files:

  • /etc/ppp/chap-secrets
  • /etc/ppp/pap-secrets

edit the file /etc/network/interfaces and add the following:

auto gprs
iface gprs inet ppp
provider gprs