GPRS
From CLUG Wiki
Contents |
Technologies
GPRS is the always-on data connection for 2G cell phone networks. It tops out at 80kbps, but for all intents and purposes 56k is the best you will get.
EDGE is an enhancement to GPRS - the last stop for 2G networks. It tops out at 473.6kbps.
3G is a totally separate network, but has higher download rates (although EDGE has significantly higher upload than 3G).
HSDPA is an enhancement to 3G, with downloads of up to 1.8Mbps. Uploads are around 400kbps.
Access Point
The international standard Access Point name is internet. This should work on all networks except Virgin mobile, which uses the vdata APN.
However, most networks use NATed private IP ranges on this apn. They do have separate public IP address APNs though.
Networks
Vodacom
NAT-ed Internet access. Good GPRS coverage. EDGE coverage in the Cape Provinces. Building 3G network.
For un-NATed acces, use the internetvpn apn. (you have to phone their Data Helpdesk to get this enabled).
Enabling data on SIM card
Dial *111# or use http://www.vodacom4me.co.za/
Display prepaid balance
*100#
MTN
NAT-ed Internet access. Good GPRS coverage. Good EDGE coverage around cities. Building 3G network (currently provides less 3G coverage than Vodacom, but better EDGE coverage).
For un-NATed access, you need a corporate account with your own APN. There used to be a public VPN apn, but it wasn't billed, so it got abused and was discontinued.
Note: The endpoint of the ppp connection is 10.0.0.1 so don't use this on a machine connected to a 10.0.0.0/24 network.
Enabling data on SIM Card
Dial *123*11# or use http://www.mtn.co.za/
Display prepaid balance
*141#
Cell C
?
Virgin
Cheapest prepaid cellphone Internet access. OK coverage. EDGE in cities.
- Note
- The APN is
vdata.
- Note
- The IPCP handshake seems to be broken, and pppd doesn't get given DNS servers. Try setting these servers manually: 196.31.116.241, 196.207.40.165
Display prepaid balance
Prepay
*101#
Postpay
*121#
Using GPRS in Linux
Data Card
Older (GPRS/EDGE) data cards usually present themselves as a serial port.
Newer cards (3G/HSDPA) present themselves as USB ports, with usb-serial converters attached. This allows for higher data rates, as well as secondary (control and monitoring) ports.
You can find a nice GPL Python-GTK GUI for data cards here: https://forge.vodafonebetavine.net/projects/vodafonemobilec/
The GSM AT standard dialing sequence is:
AT+CPIN=1234 # SIM PIN Number (optional) AT+CUSD=1,"*141#",15 # Get prepaid balance (optional) AT+CGDCONT=1,"IP","internet" # Set APN #1 to "internet" ATD*99***1# # Connect to APN #1
Option Globetrotter
This is a GPRS PCMCIA device. It is presented as a stardard serial port (serial_cs driver).
To set the access point:
AT+CGDCONT=1,"IP","internet"
To set the PIN number (if necessary):
AT+CPIN=1234
Example ppp peer-file:
hide-password noauth modem connect "/usr/sbin/chat -v -f /etc/chatscripts/globetrotter" debug /dev/ttyS1 115200 defaultroute noipdefault user any password any remotename globetrotter ipparam globetrotter usepeerdns novj lcp-echo-interval 0
Example chatscript: (no pin)
ABORT BUSY ABORT 'NO CARRIER' ABORT ERROR REPORT CONNECT TIMEOUT 10 "" "ATZ &F" OK 'AT+CGDCONT=1,"IP","internet"' TIMEOUT 60 OK "ATD*99***1#" CONNECT \d\c
Option Globetrotter 3G / 3G Quad
Like the globetrotter above, but provides 4 USB Serial ports.
Use /dev/ttyUSB0, and you can up the baudrate from 115200 to 460800
Falcom Samba 75
This is a GPRS/EDGE USB device. It is presented as a standard USB ACM modem (cdc-acm driver). The SAMBA 75 works well with Linux kernel 2.6.x. It will not work with the 2.4.x kernel as there are bugs in the 2.4.x cdc-acm module implementation.
PPP config is identical to #Option Globetrotter. (except that the serial port will be /dev/ttyACM0 and the data speed can be increased to 460800)
Advinne AMC HSDPA Modem
This is a HSDPA/3G/EDGE/GPRS USB device. It is presented as a standard USB ACM modem (cdc-acm driver).
PPP config is identical to #Option Globetrotter. (except that the serial port will be /dev/ttyACM0 and the data speed can be increased to 3686400)
If your system have trouble picking the modem up, you might try adding the file /etc/udev/rules.d/AMC.rules
###
# udev rule for Advinne AMC D301 HSDPA modem with onboard memory
# This file changes the bConfigurationValue so that the ttyACM ports are detected by the kernel
#
# info@advinne.com
#
###
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fd1", ATTRS{idProduct}=="1000", ATTRS{bConfigurationValue}=="1",RUN+="/bin/bash -c 'echo 3 > /sys/bus/usb/devices/%b/bConfigurationValue'"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fd1", ATTRS{idProduct}=="1010", ATTRS{bConfigurationValue}=="1",RUN+="/bin/bash -c 'echo 2 > /sys/bus/usb/devices/%b/bConfigurationValue'"
Then reload the rules with udevcontrol reload_rules as root.
Novatel Merlin U740 HSDPA Datacard
This cardbus device is branded Vodaphone, and has a quad-band GPRS/EDGE, and a 2100Mhz UMTS radio, with HSDPA capability for theoretical maximum 1.8 MBps.
modprobe ohci_hcd
It will bring up two NEC usb bus devices.
modprobe usbserial vendor=0x1410 product=0x1400
Now you should have two usbserial devices registered, /dev/ttyUSB0 and /dev/ttyUSB1
PPP config is identical to #Option Globetrotter. (except that the serial port will be /dev/ttyUSB0)
I'm interested in accessing the status port (/dev/ttyUSB1) while PPP is running on the modem port, in order to query
the signal strength etc, but the port is unresponsive. More information on this effort on the Novatel Status Port page.
Huawei E220
This is a Vodacom branded dongle. It has a builtin pseudo CDROM that has the windows driver software and docs on it. Costs R2500 Oct 2007 to buy outright.
The Ubuntu kernels (Feisty at least) seem to pick it up incorrectly the first time as an option card, (I think), so you have to tell it it's serial. Dapper does not recognise it.
sudo modprobe -r option ; sleep 2 ; sudo modprobe usbserial vendor=0x12d1 product=0x1003
You need to tell the dongle the PIN (as above) once, but it seems to remember it after that.
Cell Phone
Cell phones come in 2 basic types:
- Nokia style
- You set the modem APN in the phone under the settings menu. Then you dial
*99**# - SE style
- You can have a variety of APNs set up as Internet connections. Then you dial
*99***1#for the 1st connection, etc. - Motorola style
- You can have a variety of APNs setup under the Internet Profiles menu. Then you dial either
*99#, or*99***1#for the 1st connection, etc.
Bluetooth
IRDA
- Load your IRDA modules
-
modprobe ircomm-tty - Put your phone in IRDA modem mode and in range of the PC.
- Connect to
/dev/ircomm0
USB Cable
- Connect to
/dev/ttyUSB0
