github

Mobile PPP connections with ArchLinux' netctl

Yesterday I bought a SIM card from a communications service provider to be connected to the internet from everywhere. Luckily my Thinkpad T510 has an integrated WWAN module named Qualcomm Gobi 2000.

After the installation of the firmware you need to configure the connection to your provider. If you have installed ArchLinux you may want to use the network profile manager named netctl. It supports mobile PPP connections out of the box.

Configuration

You have to create a file named /etc/netctl/mobile and add the following content:

# Description of the connection, may be anything
Description='mobile connection'

# The device which is attached to your serial usb port
Interface=ttyUSB1

# The connection type
Connection=mobile_ppp

# Username for the connection, provider specific 
User='eplus'

# Password for the connection, provider specific
Password='gprs'

# The access point name (APN), provider specific
# you have to be careful with the quotes
AccessPointName='"internet.eplus.de","0.0.0.0"'

# The PIN code for your sim card, if required
Pin=0000

# Additional mode types, this should be None if you do not have a
# Huawei modem
Mode=None

Remark to config key ‘Interface’

As you can see in the example I have entered ttyUSB1 as my interface. For the Qalcomm Gobi 2000 modem you can always use this device. If you have another modem you might need to figure out the device which is connected to the usb serial port. These commands may help you:

dmesg | grep ttyUSB
[ 4879.251962] usb 2-1.4: Qualcomm USB modem converter now attached to ttyUSB0
[ 4879.252978] usb 2-1.4: Qualcomm USB modem converter now attached to ttyUSB1
[ 4879.253855] usb 2-1.4: Qualcomm USB modem converter now attached to ttyUSB2
ls -1 /sys/bus/usb-serial/devices
ttyUSB0
ttyUSB1
ttyUSB2

Remark to config key ‘AccessPointName’, ‘User’ and ‘Password’

‘AccessPointName’, ‘User’ and ‘Password’ are provider specific. You need to figure out these values for yourself. There are lists available on the WWW.

Starting/Stopping procedure

If everything is configured correctly you can start the connection with

netctl start mobile

If everything worked fine you can see something like this:

journalctl -xn
Mar 07 15:45:33 tiros chat[7684]: ^M
Mar 07 15:45:33 tiros chat[7684]: ATDT*99#^M^M
Mar 07 15:45:33 tiros chat[7684]: CONNECT
Mar 07 15:45:33 tiros chat[7684]: -- got it
Mar 07 15:45:33 tiros chat[7684]: send (^M)
Mar 07 15:45:33 tiros pppd[7675]: Serial connection established.
Mar 07 15:45:33 tiros pppd[7675]: Using interface ppp0
Mar 07 15:45:33 tiros pppd[7675]: Connect: ppp0 <--> /dev/ttyUSB1
Mar 07 15:45:34 tiros pppd[7675]: CHAP authentication succeeded
Mar 07 15:45:34 tiros pppd[7675]: CHAP authentication succeeded

There should also be a new network interface named ppp0 available.

References


This work is written by Jens Nazarenus and licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you find a bug or other flaws in this post, please drop me a mail.