How to use a Virgin Dongle on Linux

Go to any retailer of mobile broadband services and ask if their dongle works on Linux. Linux is the operating system used on some ASUS EEE PC netbooks. The tiny netbook and a dongle (the thumb-sized, plug-in modem) is still a viable and useful way of getting your internet while travelling.

“Sorry”, they’ll say, “it only works on Windows or Mac”.

They are wrong. This is a long post about how to get a Virgin Wireless Broadband dongle to work on an Asus EEE PC running Linux. For some reason, Virgin seems to be the trickiest of the lot to get up and running.

It can be very frustrating – especially when you read half a dozen different ‘how to’s’  on various discussion forums. However, it can be done. This is how I did it in Australia. You might be able to adapt this to work in other countries.

There are three challenges that you need to overcome.

First Challenge

My first challenge was with the type of dongle itself – a Virgin-branded E160E. (NB most of the popular dongles are made by the same company HUAWEI). It worked perfectly on an XP machine, but remained stubbornly uncooperative on my EEE PC – a very early model 701SD. The Network Connection Wizard couldn’t even see it.

You see, the E160E, and many like it that plug directly into the USB port, is a composite device. That means it is both a modem AND a USB storage device. When you plug it in, the EEE PC recognises it as a storage device but not as a modem.

It is possible to send commands to it to switch the default mode from storage to modem, but it gets to be a real pain downloading files, decompressing them, modifying them, writing scripts, etc., especially when you only have a basic knowledge of this stuff.

In the end I cut my losses and bought a second-hand E220 dongle on eBay for around $20. The E220 is a modem only – it’s the one where you have to use a cable to connect it to a USB slot rather than plugging it straight in. If you buy one this way, make sure that it is UNLOCKED. When you plug it in, the EEE PC recognises it as a modem and you can start to create a suitable network connection.

Second Challenge

The second challenge is making sure the connection protocols are correct. This is the fiddliest stage, but not too bad. In summary, you need to tell the modem how to authenticate itself on the network. You do this by changing two lines in an existing file on the EEE PC, like this:

1. Call up the console (i.e. a terminal window) by pressing Ctrl + Alt + T together (i.e. hold down Ctrl, then hold down Alt, then press T).

2. Call up the options file by typing
sudo nano /etc/ppp/options
(there are spaces after sudo and after nano only). Hit Enter.

3. Now you edit the two lines, like this:

First, search (scroll down) until you find the line that says:
#Require the peer to authenticate itself using PAP
The following line probably reads   #+pap
At this time the # symbol means this is just a comment.
Change it to an active command by removing the # so that it now says  +pap

Second, search for:
#Don’t agree to authenticate using CHAP
The following line reads #-chap
Remove the # symbol so that it now says  -chap

Save the file by pressing Ctrl + o (i.e. Ctrl and letter ‘o’  together), then press Enter.

Third Challenge

The third challenge is to create a new network connection.

Step 1: Make sure your wireless broadband is set up.
This assumes you have a valid SIM card and that it is already registered with Virgin, and you have already got a user name and password.

Install the SIM card into the E220 modem

Switch on your EEE PC (D’oh!).

Switch off the wireless LAN by pressing Fn and F2 together.

Connect the E220 to the EEE PC with a USB cable – wait for 20–30 seconds for it to be recognised. When it is recognised, a small icon should appear in the task bar (a 3G symbol inside a red ‘No Entry’ sign). The ASUS Mobile Phone Tool window will also open if that tool is installed – it doesn’t matter if it isn’t. If it is, minimise it to the task bar.

In the ASUS Task Manager, click the Internet tab and select Network.

Click the Create button to launch the Connection Wizard and wait for the list to populate.

Select GSM/3G (UMTS)/HSDPA and click Next.

In the next window – Select Hardware – make sure the new modem (huawei – E220) is selected (highlighted). If the new modem is not listed, cancel the process, restart the EEE PC and try again.

With the new modem highlighted, click Next. This brings you to the Network Registration screen. Click the Search button. Wait while it finds available networks.

Select your Network Operator. For Virgin Broadband in Australia the Network Operator is YES OPTUS.

Click Next. This brings you to the Login Data screen.

Select your Operator from the pull-down list. For Virgin in Australia, yours is Australia–Optus.

Change the suggested APN to VirginBroadband (no space, capital V and capital B).

Many forums and the Virgin Broadband web site say to leave the User name and Password blank or accept the defaults. This is not correct.

Instead, type in the User name and password that you used when you registered your SIM. Your user name will probably be something like yourname@virginbroadband.com.au

Click Next. This brings you to the Connection Name window where you can give this new connection a user-friendly name. The default is Mobile Data Connection. Hint: if the new name starts with Virgin…, it will appear near the end of the alphabetical list. If you prefer, put an A or a 1 in front of the name so that it appears at the top.

Click next. This brings you to the Finish window. Here you can check some settings. Make sure that Remember Pin is No and Phone number is *99# (star ninety-nine hash).

You might want to un-check the box labelled ‘Connect automatically at system startup’.

To test your connection, check ‘Start this connection when finished’ and click Finish. After a few moments, if all is well, the 3G symbol will lose its ‘No Entry’ image and go bold to show you are on line.

Assuming it works OK, the next time you start up and plug in the modem you will have two options to connect to the network:
Either: the ASUS Mobile Phone Tool will appear and you can click its ‘Connect’  button,
Or: click the Internet tab and select Network, select your connection from the list, click on the Connection pull-down menu and select Connect.
Use either tool to disconnect or re-connect.

Best wishes, and I hope this works for you