Getting the original Option GPRS datacard to work.
Written by Paul Hardwick
Unofficial Linux GlobeTrotter HOWTO
25/1/2006 Author: P.Hardwick email@example.com
Table of Contents
Note: The information in this Howto is for the original Option GlobeTrotter card. The bug fix described in 22.214.171.124 is for the GlobeTrotter only.
This document is based on my personal experience and describes how to get Option’s GlobeTrotter GPRS/GSM PCMCIA modem (GT for short) working in various operating systems including Linux. If you are attempting this yourself, at the very least this document should provide some pointers and save you time. For background information and official documentation you should of course visit the Option Wireless Technology website: www.option.com.
For clarity all commands typed at a command terminal are indicated like this.
Some_command with parameters
Modem AT commands are indicated like this in text or this:
Much of the AT command information is standard to all GSM and GPRS modems and so may be of general use.
I would like this document to grow based on experience so very much welcome comments and suggestions. I believe the GT and Linux have a long future together.
If you are interested in UMTS (3G) and Linux then checkout my 3G Howto: Vodafone 3G Howto
I have assumed that you have a SIM from your GSM network operator that has been enabled for GPRS. You will also need to know the APN (access point name) for your particular network. The APN you need is the one your network operator provides for Internet or VPN access and not the one for WAP phones (unless you want to use WAP of course). It is best to use your mobile phone to disable the SIM PIN if it has been enabled.
Once powered up, the GT provides a single standard modem interface and this is the mode of use I describe here. There is another mode called multiplexed but this is proprietary and would require specific device drivers. For basic voice calls and data-connections the multiplexer is not needed.
If you want to use a GPRS modem PC-card under Linux or other operating system I would recommend the GT for a number of reasons:
1. The GT has been designed to interface as a standard modem; this makes it a lot easier to integrate than some other GPRS cards. In general you can use the operating system standard serial/modem drivers with little or no modification.
2. It’s AT command set is standards compliant. This means traditional communication applications can interact with it and it is well documented.
3. It’s known to work well wherever GPRS is found. I’ve used this card in Europe and the USA without problem.
4. The GT can operate in either 5 or 3.3V mode. This means there is a high probability that the card will work whatever the age of the laptop.
There are now two versions of the GloebTrotter hardware. The original GT that inspired this howto and the 2nd generation card.
You can identify which version you have by looking at the serial number. The first generation card has a serial number beginning with WP. The second generation card has a serial number beginning with WK.
There are only two differences between them.
1. WP – You can use any connection speed between the Linux and the GT from 9600 to 115200 bps. WK you must use 115200 bps
2. WK – is easier to setup, it is recognised correctly by most systems the first time you plug it in. The WP version can require extra configuration (the original reason for this HOWTO).
Vodafone 3G Datacard (UMTS/GPRS/GSM): Vodafone 3G HowTo
Option GlobeTrotter Fusion (WiFi 802.11g, UMTS/GPRS/GSM) Option Fusion HowTo
PCMCIA support is provided by the OS or through the third party card services module. In general, kernel versions 2.4.x.x have support built in (if compiled). Some older 2.2.x.x distributions also have PCMCIA support (e.g. Redhat 7.0). Most of the visible work is done by a daemon called cardmgr.
Before you test the GT you should ensure that the PCMCIA interface is actually available to Linux. If you have not used it before then you should refer to your distribution’s documentation. As a quick check you could try searching for the man page entry for cardctl or try the command directly (as root). If it is there, the command
should give you feedback on the PCMCIA sockets fitted to your machine:
testlinux:~ # cardctl status
If you are really stuck then good information is found here - http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-HOWTO.html . You will also find the latest versions of the card services there but check with your Linux provider first as they should have a ready built rpm either on the distribution disk or at an ftp site.
Helpful laptop hints can be found at http://www.linux-laptop.net/ Just like another OS we know, sometimes the problem is just resource allocation and you may have to configure cardmgr to work for your model of laptop.
NOTE: Some versions of SuSE Linux provide a way for switching between kernel PCMCIA support and using an external module. This switch option is found in the Yast2 Sysconfig editor. You would not normally need to do this.
If all now seems okay; at this point you should insert the GT into a socket and see what happens
What happens next will depend on your Linux distribution, the version of card services used and the firmware version of the GT. Unfortunately, it is not easy to determine the firmware fitted to the card without interrogating it first – a Catch 22 problem if ever there was one. If you have access to a Windows machine you can use the diagnostic tools provided by Option. Alternatively, read the different scenarios below and see if the results match your situation. If possible try a different PCMCIA card to satisfy yourself that PCMCIA card services are in fact installed correctly.
It is not possible to be exhaustive but here are the few scenarios I have tried:
These versions of the firmware should cause no problem for standard Linux configurations. If you are having basic problems seeing the card then concentrate on the PCMCIA card services.
You normally hear two high pitched beeps. The cardmgr daemon has detected the card insertion event, read the cards CIS to identify it as a modem, bound the serial_cs module to the GT and then the serial_cs module has assigned one serial device to it.
The command dmesg will show something like this near the last line displayed:
ttyS01 at port 0x02f8 (irq = 3) is a 16550A
NOTE: The actual device (ttyS01) will vary dependent on what other hardware has been installed, this is also true for the port and irq values.
Check the contents of the PCMCIA stab file:
testlinux:~ # more /var/lib/pcmcia/stab
Socket 0: Option XXXXXXXXXXXXX
0 serial serial_cs 0 ttyS1 4 65
Socket 1: empty
You should see a modem card reported – the actual name of the card might be different (Option supply customised cards to many customers).
NOTE: The location of the stab file varies between distributions. Refer to the man page of cardmgr if you cannot find it.
You should also find a logical link has been updated. /dev/modem will now be linked to (in this case) /dev/ttyS1
testlinux:~ # ls -l /dev/modem
lrwxrwxrwx 1 root root 10 Nov 13 15:07 /dev/modem -> /dev/ttyS1
If all this checks out then you are ready to use the GT.
I have had reports that these distributions correctly identify the card.
You will normally hear one high-pitched beep followed by a low-pitched beep. On the console, output from dmesg or checking the system log file show that cardmgr (card services cs) reports:
You may get two high beeps but the card is not configured correctly. If you use dmesg or the command
You will see that Linux thinks two serial ports have been found on the same card. The /dev/modem logical link will also be updated to point to the “second port”. This is not good; the second port is a ghost. With the GT in the socket, Linux booting will slow down, may hang when it starts X or even cause a blue screen exception!
Both of the above problems are solved by the following simple solution:
You have to force cardmgr to use a substitute card configuration. The solution I outline here involves substituting the 3.4.0 card information structure (CIS) with one from an earlier firmware. This is easy to do:
1. Download a replacement CIS and store the file in directory /etc/pcmcia/cis
2. Edit /etc/pcmcia/config and add the following text at the bottom of the file:
card "Option Wireless Technology GSM/GPRS GlobeTrotter"
#Use Manufacturing ID to match all GlobeTrotter variants
manfid 0x0013, 0x0000
3. Stop and re-start cardmgr:
4. When you insert the GT all should be working.
A more challenging J alternative is to upgrade the Kernel or card services, refer to your distribution’s documents on how this should be done.
Whatever scheme I have used to create a data link I always find that to get PPP working with the GT it is necessary to switch off VJ compression using the novj option. This is not a performance issue since the ppp link only exists between the laptop and the GT.
This command should create a data link on the Vodafone UK GPRS network
pppd call vodafone
if the following two files exist:
Rename these files for you own connection. The APN internet found in the chat script line "AT+CGDCONT=1,\042IP\042,\042internet\042" will of course need changing to your operator’s APN.
To break the connection you can use:
These days it is more popular to use wvdial to control ppp
With the two files detailed below, connect to the Vodafone network using the command:
To connect to the another APN use the command
The following files are offered as a solution, again using the Vodafone UK network as an example (change the APNs in /etc/wvdial.conf to match your networks APN).
# File: /etc/ppp/peers/wvdial
To terminate the ppp session you type CTRL-C in the terminal used to start wvdial.
A GSM data call is initiated using wvdial or chat as if the GT was a normal landline modem using the telephone number of the remote computer or ISP. The data link created will be at 9.6 or 14.4 kbps (dependent on the network operator) and will either be a transparent or non-transparent connection depending on the setting of the AT+CBST command. Remember that any PPP link created will be between your computer and the remote ISP. (For a GPRS connection the PPP link only exists between the laptop and the card).
Some people have asked if it is possible to connect to the GT from another modem. This is possible as long as the GT and the network know that it is a data-call being made. You need to request from your operator (SIM provider) an additional telephone number for the SIM that is reserved exclusively for data. When this number is used to call the GT all the correct GSM network settings will be made that set up the data circuits. The GT will then receive the data call notification RING (see Identifying incoming call types). The GT can then answer the call with
The data connection will be at 9.6 or 14.4 kbs. The speed of the connection will depend on the network operator. It is up to you what happens next, you could for example arrange for PPPD to monitor for incoming calls. Refer to PPPD documentation for details.
NOTE: If you call the GT with a modem using the standard telephone number you will receive the call as expected but the call will be dropped.
Voice calls are made using ATD; The semi-colon at the end of the number indicates to the GT that a voice call rather than data call is requested. To answer incoming calls use the ATA command. Hang-up the call using ATH.
The GT is able to send and receive SMS messages and there are various applications that offer a user interface. I am told that Smsd v1.12.2 works well.
After power up or after entering the PIN, the SIM card requires a short time (15-20 seconds) to initialise the SMS sub-system. More detail on SMS can be found in the supporting AT command documents available at the Option web site.
SMSs are stored on the SIM, Your application will have to manage the limited amount of memory available by ensuring old messages are deleted. If the message store is full you will be unable to send or receive messages. The maximum message-length is 160 characters.
There are two methods of processing SMS, either in text mode or in PDU mode. Text mode is the simplest as messages are written and read from the SIM in plain text. PDU mode encodes the text as a sequence of hexadecimal – this allows messages to contain sequences of characters that may cause problems for processing in text mode.
For a tutorial on PDU mode refer to http://www.dreamfabric.com/sms/
The description below is for text mode messaging but the principle is the same for PDU mode. The description assumes you are using a terminal program such as mgetty.
Text mode messages uses the 7-bit extended GSM Alphabet.
Use the storage command to select the correct memory area
Enable text mode
Start a new message:
AT+CMGS=”phone number of recipient”
The GT response is “>”
The plain text message is typed in entered with a terminating CTRL-Z.
If the message is sent without error then after a few seconds you receive:
where n is the SIM message store number.
For SMS receiving, you normally wait for the unsolicited response
+CMTI: "SM", n
This indicates a new SMS has been placed in the SM storage as message ‘n’.
You can read the message by issuing:
to select the SM storage location and then to read the message:
can be "REC UNREAD", "REC READ", "STO UNSENT", "STO SENT", where REC means received (= incoming), STO means stored (= outgoing).
On the next line, you will see the text of the message. Since the CMGR command (just like the others ) finishes with “OK", you have to be careful processing a message that has this character sequence in it. This is one of the limitations of the Text Mode.
After getting the SMS, you need to delete it from the SIM in order not to fill the limited storage space. You can delete any message by issuing
where "n" is the store number .
Select the correct message store:
List all unread messages:
List all unsent messages:
AT+CMGL=" STO UNSENT”
This section describes some of the more useful AT commands that can be sent to the GT. There are many more AT commands available in documents found at the Option website.
The GT requires a SIM to be fitted in order to access a GSM network. Some people use SIMs with PIN code protection. Some operators mandate the use of PIN codes as this is a protection in the event of SIM theft.
Before proceeding; the SIM state should be checked:
+CPIN: READY - this means that no pin is required and you can continue
If a pin is needed then:
- replace 1234 with the 4 digit PIN for the SIM.
If a PIN has been defined, the GlobeTrotter will not register until a correct PIN is entered.
Entering an incorrect PIN three times locks the SIM until PUK has been entered.
SMS and Data connections are only possible if the GlobeTrotter is registered on a network.
Some possible answers:
+CREG: 0,0 - The GT is not registered or scanning for a GSM network
The AT+COPS? command can also be used to return the registration state and operator name or code.
Note: When roaming, the GT it will normally register on the first network it finds matching with the SIM. This does not always mean that GPRS will work! You may have to force the GT on to a particular network. Before travelling to a new country confirm with your SIM provider which networks support GPRS and what (if any) special settings are required.
To list the available networks just type the command
and wait 20-30 seconds. Then you'll get back
Network status can be:
Net ID is a worldwide unique ID combining the country code plus the network provider.
The response may contain more than one network record; each record is surrounded by parenthesises.
You cannot issue this query while the card is searching for an available network (CREG: 0,2 is reported in response to AT+CREG).
The GT will register on the first available network that the SIM allows. This is usually the network of the SIM provider (if you are at home), or a network that has roaming contract with the SIM-supplier network (if you are abroad). If you are roaming and you want to register to a network manually then type:
1 means "manual registration", 2 means you want to specify the network in
network ID format, finally the ID in quotes.
After several seconds you get
OK or ERROR
Errors can occur because for example you tried to register to a forbidden network. You cannot force registration on to a network that does not have a roaming agreement with the SIM provider. You cannot roam on to another network in your own country since they are the same country code (e.g. you have D1 SIM card in Germany and you want to use D2. Since they are competitors, it won't work).
If manual registration is forced, the GlobeTrotter stays in this mode and will not scan again until
Manual interrogation of the signal strength (rssi) is achieved by the following command:
The result code is only valid if the GT is in the registered state.
The results returned are in the format:
+CSQ: X,Y where X is the signal strength and Y indicates quality. In practice, I have found that if the signal strength is below 10 then GPRS connections are unreliable. Values around 15 are good, 25 is excellent.
Use the command
ASYNC [,[,,]] asynchronous transparent
You will have to make frequency band changes if you operate in and out of the USA. Depending on factory configuration the GT will be supplied to you either set for European (900/1800 MHz) or USA (900/1900 MHz) operation.
To switch bands:
Where = 4 for European (900/1800 MHz) and = 5 USA (900/1900 MHz).