Using HSDPA modem: Difference between revisions

From Alpine Linux
m (→‎Configure modem: Automatically modprobe at next reboot)
Line 98: Line 98:
'''Note:''' The above highlighted word(s) ''''''pin'''''' is the PIN of your card (typically a four digit code)<BR>
'''Note:''' The above highlighted word(s) ''''''pin'''''' is the PIN of your card (typically a four digit code)<BR>
'''Note:''' The above highlighted word(s) ''''''internet'''''' is the Access Point Name (APN) of the service you use (for instance mine is "web.omnitel.it"). If you don't know the Internet APN, ask your service provider.<BR>
'''Note:''' The above highlighted word(s) ''''''internet'''''' is the Access Point Name (APN) of the service you use (for instance mine is "web.omnitel.it"). If you don't know the Internet APN, ask your service provider.<BR>
''<SPAN STYLE='color:red;'>'''FIXME:''' Seems I don't get any dns-server added to /etc/resolv.conf. (Right now I don't know how to fix this)</SPAN>''
''<SPAN STYLE='color:red;'>'''FIXME:''' Seems I don't get any dns-server added to /etc/resolv.conf. (Right now the only way I see it is to manually edit 'resolv.conf')</SPAN>''


= Start/Stop=
= Start/Stop=

Revision as of 07:58, 12 September 2008

General notes

Note: Don't plug in the modem yet! (Wait until document suggest you to plug it in)
Notes are based on gentoo wiki

Requirements

At least Alpine-1.7.22 would work (but maybe some older releases too)

  • libusb-dev
  • ppp
  • usbutils

Check kernel configuration

Note: Checking kernel config is proably not needed. I just add this note in case you need it in the future.
These checks should result in '=m' values (except CONFIG_USB_SERIAL_GENERIC that should report '=y')

modprobe configs
zcat /proc/config.gz | grep "CONFIG_USB_SERIAL_GENERIC="
zcat /proc/config.gz | grep "CONFIG_USB_SERIAL_OPTION="
zcat /proc/config.gz | grep "CONFIG_PPP="
zcat /proc/config.gz | grep "CONFIG_PPP_ASYNC="


Install modem

Install packages

Install required packages

apk_add ppp
apk_add libusb-dev
apk_add usbutils

Prepare

Now you should 'plugging in the modem'

We need information about the modem

lsusb -v | grep id

The output of previous action could look something like this:
Note: You should take notes on the numbers presented in the output (you would need them soon)

idVendor   0x12d1 Huwei Technologies Co., Ltd.
idProduct  0x1003 E220 HSDPA Modem

Configure modem

Now let's load the driver (using the values you just found out).

modprobe usbserial vendor=0x12d1 product=0x1003

Prepare this for next reboot

echo "options usbserial vendor=0x12d1 product=0x1003" >> /etc/modprobe.d/options

Configure programs

Seems we need to create a missing folder

mkdir -p /etc/ppp/peers

Create configfiles

/etc/ppp/peers/E220

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

/etc/ppp/chat-E220-pin

ABORT BUSY
ABORT ERROR
ABORT 'NO CARRIER'
REPORT CONNECT
TIMEOUT 10
"" "ATZ"
OK "AT+CPIN=pin"
OK AT+CGDCONT=1,"ip","internet"
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

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

Note: The above highlighted word(s) 'pin' is the PIN of your card (typically a four digit code)
Note: The above highlighted word(s) 'internet' is the Access Point Name (APN) of the service you use (for instance mine is "web.omnitel.it"). If you don't know the Internet APN, ask your service provider.
FIXME: Seems I don't get any dns-server added to /etc/resolv.conf. (Right now the only way I see it is to manually edit 'resolv.conf')

Start/Stop

Start connection

pon E220

Stop connection

poff E220

Checks

Check if process is running

ps | grep pppd

Logfile would also give you information on what happened

grep pppd /var/log/messages

Check nic information

ifconfig ppp0

pppd seems to have some pppstats function

pppstats