HSDPA – Three USB Modem

HSDPA Huawei E160g

Note – Since Ubuntu Intrepid Ibex, connection via a Mobile device has significantly improved in many of the later Ubuntu variants and this document is considered out of date however it contains good information possibly transferable to other system others might find useful.

Note:- If you intend to use this device with Intrepid Ibex Ubuntu Version 8.10 released at the end of October 2008 you do not need to follow any of the steps below. The new version of the Network Manager supports Mobile dialup connections from the Network Manager icon itself on your desktop

For the most part if you can connect you may be able to browse the Internet, I say may be reservedly as this device has a tendency to misbehave at critical moments. We can only recommend that you do not rely on this device to service your connection whatever platform you are using, if the project or work is important enough for an internet connection and this is essential then this is not the device to hedge your bets on or get you out of a jam it may work but chances are it won’t.

Although this howto is specifically written with Ubuntu in mind there is no reason why this procedure will not work on other Linux OS flavours.

Step 1

Your modem is supplied as a package, included in it is the USB modem itself the SIM card and the phone number that is used. At the moment the USB Modem device has no credit associated with it which will be needed for continued Internet operation.

Remove the SIM card from the package the USB Modem came with and insert this into your own mobile phone, yes thats right your own mobile phone not the USB Modem (Not Yet at any rate).

Step 2

Go to the following web page https://my3.three.co.uk/mysecurity/register.do. You need to do this first with the SIM card in the Mobile phone, at present you do not have a password to validate a voucher or login to your “my3” account. Filling the details on this page will send a text message to the SIM card in the phone this will be your login password for your USB Mobile phone Number, be certain to write this down when you receive it, this is very IMPORTANT.

Step 3

Now go to the following page my3 armed with your password enter the digits that correspond to the USB Modem device BUT with the SIM card still in your own phone, enter into the relevant box the password emailed to the USB Modem Phone No via your own mobile phone.

Step 4

At this point we recommend you purchase a three mobile voucher at the moment it is not suitable for use with USB Modem, the voucher itself needs to be converted however the process is well documented through your my3 page. The voucher can be obtained from many retail outlet’s, we do not recommend credit purchase using a credit card as the voucher value does not get converted for use with broadband without additional steps.

Step 5

By now we hope that the voucher has been correctly accredited to your USB Modem device. If you have logged into your account and converted your voucher please check the My Account section of your my3 page.

Step 6

We have followed all the steps we need to to activate the account and the SIM card, remove the card from your own Mobile phone and place this now into the USB Modem device. We now need to prepare the Linux operating system, if you are running Ubuntu 8.04 or Hardy Heron wvdial should already be installed however you need to make some entries to detect and the modem device is attached and install a modem script called wvdial.conf. First lets deal with wvdial.conf as this is the easiest to deal with run one of the following commands to edit this file.

If you are familiar with vim and can edit with it use the following command:

#> sudo vim /etc/wvdial.conf

If vim is a problem for you use this command instead

#> sudo gedit /etc/wvdial.conf

Using either of these methods above copy the contents below and paste these into the file you are editing also edit for the correct phone number and the correct password for the USB Device.

[Dialer Defaults for wvdial.conf]

Phone = *99#
#Phone = *99***1# #Not required
Username = 07723777777 #= Sample USB Mobile Phone No
Password = woiuFF #= Sample password as set by three
Stupid mode = 1
Dial Command = ATDT

[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init1 = ATZ
Init2 = ATE0V1&D2&C1S0=0 +IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init3 = AT+CGDCONT=1,”IP”,”three.co.uk”;

Step 7

At the bottom of this page are attachment files that you need, you can right click on and select save, once copied to your computer this file needs to be copied to the relevant directories such as /etc/udev/rules.d all of these should be done as root user we suggest you do the following.

#> sudo cp (path_to_file/65-huewei-e220-modem.rules) /etc/udev/rules.d

You will need to use your standard login password but only if you have relevant ‘admin’ permissions.

Step 8

The above rules use a file called usb_modeswitch to detect when the USB modem has been inserted which has not yet been installed. A binary file is supplied below as an attachment we suggest you copy this file and place this file in the directory /sbin

#> tar xvjf (path_to_file/usb_modeswitch.tar_.gz)
#> sudo cp (path_to_file/usb_modeswitch) /sbin

Step 9 Along with the above file we also need a configuration file called usb_modeswitch.conf the file has already been altered to work with the E160g we suggest you copy this file into /etc directory.

#> sudo cp (path_to_file/usb_modeswitch.conf) /etc

Step 10

Ideally your USB device needs to be aligned to /dev/USB0, as the modem key is inserted the device needs to register this because it is a Modem which will take some time, several minutes in fact so please be patient even when you think the scrolling has stopped wait at least a minute more before initialising the Modem to the internet.

Plug in to a vacant USB slot the Huawei E160g with the SIM card inside it, it should not be necessary to reboot the PC or Laptop, often reseting the Huawei E160g out of and into the USB slot might correctly adjust USB device outputs, hopefully. To check what USB device output the system is aligned to run the following command. Open a clean terminal and paste this command to it.

#> tail -f /var/log/messages

Once you are sure the Modem has registered properly by viewing /var/log/messages run this command.

#> sudo wvdial HSDPA

Step 11

This part is only necessary when you can connect via three but do not or can not access the internet services, this procedure does not always work but does give you another avenue to try when the connection does not work as intended.

#> sudo vim /etc/resolv.conf

For some reason the DNS (Domain Name Service) provided by three do not work so why not change the DNS to openDNS instead. Simply edit the document above and place these entries into it.

208.67.222.222 and 208.67.220.220

Change the contents of resolv.conf to read the following.

nameserver 208.67.222.222
nameserver 208.67.220.220

WARNING each time the Modem is reset the values in /etc/resolv.conf will change.

If you should have any comments about this procedure we would like to here from you.

Author: Derek Shaw - Page reference: 2077
Last modified: Derek Shaw - 2015-01-20

Categories: Uncategorised

Number of comments: 0