Using HSDPA modem: Difference between revisions

From Alpine Linux
(Reorganizing the page. Removed obsolete information)
(Route and DNS notes)
Line 73: Line 73:
{{Note|Replace above word '''{APN}''' with the "Access Point Name" of the service you use ''(for instance mine is "web.omnitel.it")''. If you don't know the Internet APN, ask your service provider}}
{{Note|Replace above word '''{APN}''' with the "Access Point Name" of the service you use ''(for instance mine is "web.omnitel.it")''. If you don't know the Internet APN, ask your service provider}}


{{Warning|Route and DNS is not working. Something is still missing in above config}}
== Routes ==
Create a default gw route to your 'ppp0' device.
{{cmd|ip route add default dev ppp0}}
 
== DNS ==
Figure out what DNS-servers your provider has.
{{cmd|egrep -i 'pppd.*dns' /var/log/messages}}
This might give you some useful information.<BR>
Search for a IP-address that might be your providers DNS-server and add this IP-address into '/etc/resolv.conf'.
{{cmd|echo "nameserver {DNS-server-IP-address}" > /etc/resolv.conf}}


= Start/Stop=
= Start/Stop=

Revision as of 04:07, 10 January 2011

This material is work-in-progress ...

Do not follow instructions here until this notice is removed.
(Last edited by Mhavela on 10 Jan 2011.)

Requirements

This doc is tested on alpine-2.1.3.

You will need a HSDPA USB-modem.
Use 'dmesg | less' to figure out which /dev/ttyUSB? it uses (you will need to edit below config to reflect this).

Install packages

Install required packages

apk add ppp

Load modules

Now let's load the driver (using the values you just found out) and prepare it to get automatically loaded at next reboot.

modprobe ppp echo "ppp" >> /etc/modules

Configfiles

/etc/ppp/peers/E220

(The filename 'E220' can be changed to whatever is appropreate for you, but you will need to remember it when running pon/poff command)

debug
/dev/ttyUSB0
460800
crtscts
modem
noauth
usepeerdns
defaultroute
noipdefault
noccp
nobsdcomp
novj
connect '/usr/sbin/chat -v -f /etc/ppp/chat-E220-pin || /usr/sbin/chat -f /etc/ppp/chat-E220-nopin'

/etc/ppp/chat-E220-pin

(The filename 'chat-E220-pin' can be changed to whatever is appropreate for you, but you will need modify above configfile to reflect your decition)

ABORT "BUSY"
ABORT "ERROR"
ABORT "NO CARRIER"
REPORT "CONNECT"
TIMEOUT "10"
"" "ATZ"
OK "AT+CPIN={PIN}"
OK AT+CGDCONT=1,"ip","{APN}"
OK "ATE1V1&D2&C1S0=0+IFC=2,2"
OK "AT+IPR=115200"
OK "ATE1"
TIMEOUT "60"
"" "ATD*99***1#"
CONNECT \c

/etc/ppp/chat-E220-nopin

(The filename 'chat-E220-nopin' can be changed to whatever is appropreate for you, but you will need modify above configfile to reflect your decition)

ABORT "BUSY"
ABORT "ERROR"
ABORT "NO CARRIER"
REPORT "CONNECT"
TIMEOUT "10"
"" "ATZ"
OK AT+CGDCONT=1,"ip","{APN}"
OK "ATE1V1&D2&C1S0=0+IFC=2,2"
OK "AT+IPR=115200"
OK "ATE1"
TIMEOUT "60"
"" "ATD*99***1#"
CONNECT \c
Note: Replace above word {PIN} with the "PIN" of your card (typically a 4 digit code)
Note: Replace above word {APN} with the "Access Point Name" of the service you use (for instance mine is "web.omnitel.it"). If you don't know the Internet APN, ask your service provider

Routes

Create a default gw route to your 'ppp0' device.

ip route add default dev ppp0

DNS

Figure out what DNS-servers your provider has.

egrep -i 'pppd.*dns' /var/log/messages

This might give you some useful information.
Search for a IP-address that might be your providers DNS-server and add this IP-address into '/etc/resolv.conf'.

echo "nameserver {DNS-server-IP-address}" > /etc/resolv.conf

Start/Stop

Start connection

pon E220

Stop connection

poff E220

If something goes wrong...

Check if process is running

pidof pppd

Logfile might give you a clue on what went wrong

egrep "pppd|chat" /var/log/messages

Check nic information

ifconfig ppp0

pppd has a statusinformation function that could come in handy

pppstats