I’ve been loaned a USB mobile broadband modem by 3 to try out for a few months. I’ll write a proper post about why I’ve got it and what I think of it later. First, I wanted to share how I got it working with my EEE PC.
What am I talking about?
The modem is a small USB dongle – not dissimilar in appearance from a USB memory stick. You put a SIM card in, and the small mobile phone radio inside gives an Internet connection to any computer that it’s plugged into.
The dongle is a Huawei E169G.
So what’s the problem?
The dongle is supported on Windows and Mac OS. Not Linux. My EEE PC still runs the original Xandros Linux.
Should it work on Linux?
Posts on the eeeuser forum suggested that it wouldn’t be possible.
Other dongles seem to have caused less trouble, but the E169 wouldn’t work.
The consensus seemed to be that:
Huawei 169 requires a patch to usb-storage driver to recognize the hardware similarly to 220… I think that ASUS is on a way to produce a small upgrade package to fix the issue for E169.
And a little Googling failed to turn up anyone who has got the Huawei E169 to work with an EEE PC on Linux.
Still… how hard could it really be, eh? 🙂
What happens if you try and use it?
Plug the USB dongle in.
Notice that the system tray icon you get when you plug in a USB flash memory stick does not appear.
Click on ‘Network’.
Except you can’t. The EEE PC doesn’t recognise the E169 dongle – the list of hardware to choose from is empty.
I tried using wvdial to configure the modem myself without the wizard. Running the auto config mode – where it queries the device itself – failed. In fact, it seg faulted!
I tried configuring it manually – a few different configuration files I found online. None of them worked. In each case, wvdial would fail to connect to the device.
The EEE PC just really couldn’t see the dongle.
The dongle works fine on Windows, so switching quickly to a Windows ThinkPad I could investigate further.
I plugged it into my ThinkPad and kicked off USB Monitor to have a dig around. The first thing I noticed is that the device ID it returns is different to the one printed on the USB device itself: E620. Weird.
More interesting though was that USB Monitor shows that the dongle is a “Composite Device”. This was a new one on me, but it seems that – rather than ship the dongle with CDs containing the drivers to use – the USB device is a two-in-one device. It is both a “Mass Storage Device” – a flash memory disk, and a Modem. It starts out by behaving as flash memory. The flash storage contains the modem drivers, with an autorun config that installs them on a PC when it is plugged in. Once installed, the USB device is switched to modem mode.
It seems that Linux, or the EEE PC at any rate, cannot handle this sort of composite device. It wasn’t sending the right signals to the device to tell it which mode to behave in, or didn’t understand when it reported itself to be a composite. Either way… I needed to find a way to manually make the device switch modes.
Making USB devices switch modes
Things were looking up – I found (yay for Google!) that Josua Dietze has written a Linux utility to do this already: USB_ModeSwitch.
He’s written a utility that simplifies sending control commands to USB devices. All you have to do is put the command codes into a config file, then run his utility. He even includes a sample config file with the right codes for fifteen different USB devices.
Unfortunately, the Huawei E169 isn’t one of the devices he’s identified the codes for. (And I tried the other Huawei codes on his list – none of them worked).
So it was back to the USB sniffer to identify the right codes to use.
So back to the EEE PC ‘Create connection’ wizard.
I chose it, and copied the other network details from the information on the three website.
This is all overkill. By all accounts, the newer Huawei mobile broadband modems are much easier to get working. If you have an EEE PC and are considering getting a mobile broadband dongle, you might find it easier to just go for E220 or newer.
But if you do already have the E169, or can get it cheaper, it seems that you can get it working!
Update: See the comment thread below for background, but in short, people have found it quicker to put in usb_modeswitch options at the command line rather than have to edit config files. E.g.
./usb_modeswitch -v 0x12d1 -p 0x1001 -d 1
./usb_modeswitch -v 0x12d1 -p 0x1001 -H 1
You may find this easier to script than the config file approach in my post.
The developer of usb_modeswitch has more info on automating which is also worth a look.