History:
Issue 1.0 - First release (04.11.21) Issue 1.1 - Moved a section and minor additions (04.12.05) Issue 1.2 - Added TuxMobil link (04.12.06) Issue 1.3 - Various updates, including usbserial thanks for the emails Matthias Urlichs (05.07.11) Issue 1.4 - Events/0 problem solved with all credit to Tobias Ramforth (05.09.10) Issue 1.5 - Updated contact details (05.11.19)This report is listed at TuxMobil - Linux on laptops, notebooks, PDAs and mobile phones .
Disclaimer: Use of the information contained within this document is entirely at your own risk!
This is my short guide to setting up and using an Orange Mobile Office 3G Card with Debian "Sarge" (I used to use Libranet 2.8.1). I live and work in the UK, therefore some bits of this guide will be specific to the UK and Orange's service in this country.
Before I bought the 3G Card, I searched for technical information about the Orange 3G Card, and I was disappointed to discover that there was very little information.
Orange UK did not have any support pages for linux users, and I would guess that their support for their Windows users isn't that good.
I found one web page about getting the Orange 3G datacard to work with linux, at Calum's web-site http://gk.umtstrial.co.uk/~calum/u530.php and this gave me the confidence to try to get mine working.
Also I have a small confession, I did use M$ Windows and the horrid Orange software to run my 3G Card for the first couple of weeks. But it was useful, as it allowed me to find out about some of the AT commands that can be used. Note: I may also have activated the USIM/3G Card whilst using the Orange software by reading an SMS from the 3G card (Sorry, I don't know how to do this from linux).
My Orange Mobile Office Card 3G was bought retail from an Orange shop. The underside of the card indicates it is a Novatel Wireless Merlin U530 (Model: NRM-U530) and I am guessing the hardware revision is HW:01.08 040714 as this is printed on a white sticker.
This laptop has now been retired, owing to a structural failure i.e the hinges broke.
My ACER laptop was running the Debian linux Libranet 2.8.1 distro http://www.libranet.com . It was a minimal install of Libranet 2.8.1, which was then updated using aptitude to upgrade/dist-upgrade from a Debian Sarge/Testing DVD-R (bought from the Linux Emporium http://www.linuxemporium.co.uk ).
I was using the default debian kernel binary package:
Before getting the card, I did install the pcmcia package and I think I ran the Libranet Xadminmenu to enable pcmcia support.
Typically, I couldn't decide what laptop to get next. In the end, I opted for the ultra-light weight Fujitsu P7010D 1.1GHz 512M 60MB HD and a free finger-print scanner (the latter being of no use since there isn't a linux driver available). As the hardware is fairly new, and because the fan is noisy, cpu frequency stepping and power management are important, I figured that I should be using a 2.6.x kernel.
Unfortunately, I had until recently (10th Sep 2005) been frustrated that I was unable to get 2.6.x to run smoothly on my laptop. Linux would noticeably and briefly freeze every few minutes, the mouse pointer, video playback, etc were all affected.
Looking at the output from top , I could see that the events/0 process jumped to 33 %CPU usage and the Time+ was always very high (when I first start linux it was greater than 3:00 within the first minute of uptime!)
UPDATE My events/0 problem was due to loading the genrtc driver. I've now unselected 'genrtc' in the .config and recompiled the kernel. Many thanks to Tobias Ramforth for the answer.
I started using the Con Kolivas patches when I was trying to find a solution to the events/0 problem, and they were very effective in hiding many of the "freeze" symptoms. A responsive desktop still seems like a good idea, so I am going to continue applying the ck patches.
At the time of updating this guide, I was using the following kernel
I also have problems with lots of ppp0 rx errors when I use the 3G card and I think this may be due or contributed to by the ACPI code. My workaround, to reduce the rx errors, is to disable the ACPI with the kernel parameter acpi=off . I have two menu items in my grub's menu.lst file to either boot kernel 2.6.13-ck1 with or without ACPI.
The remainder of this guide (I hope) is equally valid for either a 2.4.x or 2.6.x kernel.
Confirm that the pcmcia drivers were started by looking for output in dmesg:
When I insert the card I get a double-beep and then the red LED on the 3G card lights and then flashes red. The tail of dmesg shows:
Note: My Mobile Orange 3G Card (aka Novatel Merlin U530, see The Kit section for a fuller description) is using the serial_cs driver. When compiling a kernel, this should include, usually as a module, the SERIAL_8250_CS driver.
As an aside, Vodafone UK rebrand the Option 3G card, which needs the usbserial/option driver, I don't cover this hardware in this guide. On a cautionary note, it is possible that Orange, may also rebrand a different make of card in the future or that Novatel may switch to a different serial interface without changing the model number or packaging.
Everybody runs up minicom to look at their modem, don't they? Actually there is one really important AT command that you'll want to know, but I'll leave that until later.
Run minicom -s as root, so that you can set the minicom configuration. Using the dmesg info from when the card was inserted, set the tty serial port e.g. /dev/ttyS2 (Note: the zero '0' is not entered, don't know why?)
A couple of AT commands, they can be entered in either upper or lowercase:
Now for the first of the useful AT commands:
The AT+CSQ command gives the signal strength. The responses are:
+CSQ: 99,99 No signal (red LED) +CSQ: 9,99 Maybe 1 bar out of 5?And now probably the most useful AT commands I can tell you about:
The AT$NWRAT? command shows whether the card has been set to use GPRS/3G, GPRS or 3G only.
In the responses, the first and second arguments (together) shows whether the card has been set to use GPRS/3G, GPRS or 3G only. The third argument shows the data services currently locked to, where a '0' when there is no signal (flashing red LED), a '6' when locked to a GPRS signal (flashing green LED) and a '3' when locked to a 3G signal (flashing blue LED):
$NWRAT: 0,2,6 Use either GPRS/3G $NWRAT: 1,2,6 Use only GPRS (green LED) $NWRAT: 2,2,3 Use only 3G (blue LED)The AT$NWRAT=n,n command is used to select whether to use GPRS/3G, GPRS or 3G only.
$NWRAT=0,2 Set to use either GPRS/3G $NWRAT=1,2 Set to use only GPRS (green LED) $NWRAT=2,2 Set to use only 3G (blue LED)Note: In marginal reception areas it seems to be more reliable if you choose the appropriate service (either GPRS or 3G only) rather than let the card switch back and forth. If you let the card switch back and forth, it has been my experience that the connection is more likely to be dropped.
To setup the PPP dialing, I used the pppconfig tool, which I think is the default ppp setup utility for Debian, and then I added extra AT commands to the chatscript and commented out lines in the ISP peers file.
/etc/ppp/peers/orange
/etc/chatscripts/orange
The AT commands that I added were (some of) the ones that the Orange software was issuing.
The +CPIN?, $NWRAT? and +CGATT? are not important as they only print information. The +CGEQREQ= apparently sets the limits of the data link and that string means the maximum anyway, so probably not necessary. The +CGDCONT and ATD*99***3# are the important strings, if you look at other web-sites these usually have '1's in place of the '3's in mine.
The Libranet distro comes with a simple GUI Dialer called LibranetPPP. On Debian, I'm now using gpppon , a gnome wrapper around pon and poff.
As root you can also control a PPP connection using the pon & poff commands. To startup a PPP connection:
pon orangeOr
pon orange && tail -f /var/log/messagesTo shutdown a PPP connection
poff orangeThe following is a sample of a PPP connection from /var/log/messages :
I've encountered a few problems while I was setting up and starting a PPP connnection.
When I was first trying to connect, I spent a very frustrating couple of hours trying to work out why I was getting a "Serial link is not 8-bit clean" error message from pppd. I had made a typo when entering the telephone number and I had only typed in one 9 instead of two. Aaargh! The pppd tries to get the dns ip addresses but after many attempts exits. If I run up minicom after such a failure then NO CARRIER is the first response back from the 3G Card. Question, is the chatscript missing the NO CARRIER response? By observation when it does occur, I've got the Card locked to using the 3G only and the signal is probably not strong enough. Is there a way to monitor the signal strength when online? Apparently, a later version of the Orange software for Windows can now monitor the signal strength. I haven't seen the newer software, but I've read messages that it is still awful. If the connection drops, I can't always get the PPP to connect again. When I investigate with minicom, sometimes I have to enter AT&F (which should probably be in my chatscript anyway?). On other occasions, I've found that the card needs to be switched between 3G and GPRS (or the other way around) before it will pick up a signal. To save from unplugging the card all the time. For kernel 2.4.x: I've been using the pcmcia init.d script. As root, I've been entering /etc/init.d/pcmcia stop and this seems to switch off the 3G card because the LED on the 3G card goes off. Switch the 3G card back on using /etc/init.d/pcmcia start . For kernel 2.6.x: I'm using sudo cardctl eject and sudo cardctl insert to switch the card off and on. Some emails would hang part way through sending and the connection would timeout. I was finding that sometimes I couldn't send emails. If I tried with a small test email that would often send okay. Adding mtu 1452 to /etc/ppp/peers/orange seemed to solve the problem.
I wrote this document with jed and then translated it to html using the txt2tags command:
txt2tags -n --toc -i debian-orange-3g.t2t -o debian-orange-3g.html -t htmlTO DO
The PPPStatus program Calculating the total bytes used. I made some progress with a small Python script to parse the PPPStatus log files. It currently prints each connection made in date order, the totals bytes transferred so far this month and the remaining bytes available. I am still a beginner with Python, so I haven't put it up here yet.
If you wish to comment on this guide, please send any comments to debora3g at xemaps point com
--The End--