Using HSDPA modem: Difference between revisions
(category networking. use notes template) |
(Reorganizing the page. Removed obsolete information) |
||
Line 1: | Line 1: | ||
{{Draft}} | |||
[[Category:Networking]] | [[Category:Networking]] | ||
== Requirements == | == Requirements == | ||
This doc is tested on alpine-2.1.3. | |||
You will need a [http://en.wikipedia.org/wiki/High-Speed_Downlink_Packet_Access HSDPA] USB-modem.<BR> | |||
Use 'dmesg | less' to figure out which /dev/ttyUSB? it uses ''(you will need to edit below config to reflect this)''. | |||
== Install packages == | == Install packages == | ||
Install required packages | Install required packages | ||
{{cmd|apk add ppp}} | |||
== | == Load modules == | ||
Now | Now let's load the driver ''(using the values you just found out)'' and prepare it to get automatically loaded at next reboot. | ||
{{cmd|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)'' | ||
<pre>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' | |||
</pre> | |||
== | === /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)'' | |||
<pre>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 | |||
</pre> | |||
=== /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)'' | |||
<pre>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 | |||
</pre> | |||
{{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}} | |||
{{Warning|Route and DNS is not working. Something is still missing in above config}} | |||
= Start/Stop= | = Start/Stop= | ||
== Start connection == | == Start connection == | ||
{{cmd|pon E220}} | |||
== Stop connection == | == Stop connection == | ||
{{cmd|poff E220}} | |||
= | |||
= If something goes wrong... = | |||
Check if process is running | Check if process is running | ||
{{cmd|pidof pppd}} | |||
Logfile | Logfile might give you a clue on what went wrong | ||
{{cmd|egrep "pppd{{!}}chat" /var/log/messages}} | |||
Check nic information | Check nic information | ||
{{cmd|ifconfig ppp0}} | |||
pppd | pppd has a statusinformation function that could come in handy | ||
{{cmd|pppstats}} |
Revision as of 11:26, 9 January 2011
This material is work-in-progress ... Do not follow instructions here until this notice is removed. |
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
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