Using the Huawei E169G usb mobile internet modem on the EEE

Update: I've attempted to automate the steps above by using a package, have a look at: Huawei E169G - the easy way
Yesterday I treated myself to a new mobile internet "dongle" to go with my Asus EEE PC. I decided to go for the Huawei E169G usb modem as it matches my black EEE, however there is a small problem with getting this device to work straight away. The problem is that the E169G is a composite device, which basically means that it will ask as a USB memory stick until it is sent a command to tell it to be a modem. The EEE doesn't know about this so you can't use it straight away as a 3G modem in the connection wizard. Fortunatelty, back in April Dale Lane documented in his blog how to send the modem the right command to be able to use it wil the EEE, his blog post on the topic is worth reading as it explains the background to the issue. After experimenting with my friend Keren Mills' E169G (thanks Keren!) to check that I could get this method to work I took the plunge and got my own one. Following the instructions on Dale Lane's blog I was able to send some commands manually to the unit to get it to switch but what I really wanted to do was to get the EEE to recognise the device automatically so I can start a 3G connection without having to run any commands in the terminal. Fortunately this is possible.
Here I how I got it all to work. The first thing to do is to get hold of the program that sends the command to the E169G to get it to switch to modem mode. This is called usb_modeswitch and is available from: http://www.draisberghof.de/usb_modeswitch/ . This utility is suuplied ready to go and after you download the file for it uncompress it by (opening an terminal and) typing:
tar xvzf [the name of the file you downloaded]
This should create a new directory containing the downloaded files. If you look inside it (cd [the directory created]) you should see a file named usb_modeswitch. This should be executable (i.e. the computer can run it as a program, it should appear green in colour, if it is not fix ths by typing chmod u+x usb_modeswitch). We now need to copy this file into a location where it can be easily found by the operating system, so type:
sudo cp usb_modeswitch /usr/sbin/
The next step is to make ourselves a small file that will actually function as a command to switch the E169G into modem mode. We are actually going to send the unit two command, one to tell it to stop being a storage medium and one to tell it to be a modem. For fun, let's use VIM, a text mode editor to do this. Type this start the VIM text editor:
sudo vim /usr/sbin/e169g_switch
Press the 'i' key to start inputting and type:
#!/bin/sh
/usr/sbin/usb_modeswitch -v 12d1 -p 1001 -d 1
/usr/sbin/usb_modeswitch -v 12d1 -p 1001 -H 1
To save the file press the ESC key and then enter ':wq' (this means write the file and quit). You now need to tell the EEE that this is a program that it can run and not just a text file, so do this by typing:
sudo chmod u+x /usr/sbin/e169g_switch
At this point we now have a command we can run manually to switch the E169G into modem mode, but what would be ideal is to get the EEE to run this automatically when the unit is plugged in. We can do this by adding a configuration file as described under the "How to automate" section of the usb_modeswitch documentation. So we need to create a small file to do this, type:
cd /etc/udev/rules.d
This brings you to the place where we need to add a file to get the EEE to send the switch command automatically. To start work on the file type:
sudo vim 70-e169g.rules
Press the 'i' key to start inputting and type:
SUBSYSTEM=="usb" SYSFS{idProduct}=="1001", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/e169g_switch"
.. and press ESC then enter ':wq' to save and quit. Be careful to type this exactly as shown, making sure you enter the right number of equals signs.
Hopefully by this point your EEE should now be capable of using the E169G. You might have to restart the machine, but the next time you plug the E169G in it should get picked up as a modem and you should be able to use it to create a 3G connection using the wizard.
What I don't have yet is a way to send and receive SMSs and get the signal strength. There are however some utilities out there which might provide this functionality (of which this one from Vodafone looks promising and UMTSmon looks like it could help too). I'll be having a look at these soon so keep an eye on this blog.
- Liam Green-Hughes's blog
- 6053 reads





















Comments
Re: Using the Huawei E169G usb mobile internet modem on the EEE
Hi
I have just bought an EEE pc and although managed to get the pc (eventually!) to see the usb stick and set up the connection, when I try and connect to the internet (network, mobile connection, connect) it tells me operation failed.
I am a realy dummy when it comes to computers (hence me buying the easy pc!) and have no idea what to do next!!
Can someone please help me using simpleton terms!
Thanks
Re: Using the Huawei E169G usb mobile internet modem on the EEE
G'day
Just thought I'd mention something I got stuck on.
The command...
tar xvzf [the name of the file you downloaded]
should be...
tar xjvf [filename]
Took me a few hours to figure that out... thanks for everything else though!
Re: Using the Huawei E169G usb mobile internet modem on the EEE
Hi - I am an absolute Linux newbie ... and I would really, really like to get this to work, but I can't get past the first line - I open a terminal window (ctrl+alt+t) and type "tar xvzf usb_modeswitch-0.9.4.tar.bz2" and I get an error message:
tar: usb_modeswitch-0.9.4.tar.bz2: cannot open: No such file or directory
tar: error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
/home/user>
help??!
Thanks
Farne
Re: Using the Huawei E169G usb mobile internet modem on the EEE
Hi Farne,
Looks like you might not be in the right directory (sometimes called a "folder" on Windows, where did you download it to? Sometimes Firefox is configured to download files straight to your desktop (which might not be visible on the EEE), in your home directory there will be an entry called "Desktop", you see it if you type in "ls" on the command line. Find out if your file is there by typing in "ls Desktop". If it is you should move this out of your desktop by typing "mv Desktop/usb_modeswitch-0.9.4.tar.bz2 .." note the double full stop this means move the file to the directory above the one it is on. You should then be able to continue with the instructions.
Hope this helps!
Re: Using the Huawei E169G usb mobile internet modem on the EEE
Hi
I have diligently followed your steps word for word as i am a linux novice so don't have the background knowledge to really know what each step does. I got to the final step and put
SUBSYSTEM=="usb" SYSFS{huawei - E169G}=="1001", SYSFS{3 UK}=="12d1", RUN+="/usr/sbin/e169g_switch"
as this was how they appeared on dale lanes pictures of the connection wizard. This doesn't seem to have worked, please could somebody tell me where to get the info and if i need to 'undo' the above rule?
thanks in advance
Re: Using the Huawei E169G usb mobile internet modem on the EEE
I think you might have got a bit mixed up there! The line should read:
SUBSYSTEM=="usb" SYSFS{idProduct}=="1001", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/e169g_switch"
What is happening here is that you are providing the EEE with a way to identify the USB modem you just plugged in. When it sees this modem and can identify it (idProduct and idVendor provide an identifier) it will take the action specified after the RUN part of the line and in quotes.
Hope this helps.
Possible 3G monitor
http://www.3eportal.com/index.php?option=com_content&task=view&id=35&Ite...
Shows signal strength etc for the e220, may work with e169g
Re: Using the Huawei E169G usb mobile internet modem on the EEE
Liam
Thanks for your post and the easy to follow instructions on making the script. Using that I am now connected. Well I can ping and view sites by IP, so just need to sort out DNS. But that's easy :-)
Colin
Post new comment