How-to 3G using Huawei USB dongle

How to get 3G working on Kuki using a Huawei Model E169 with the Danish provider 3 (and probably others)

This guide is a bit more hardcore as it requires you to use an editor and configure system files the old fasion way.

Acer med dongle

First thing to check is that the device is supported by your kernel: Before you plug in the dongle Open a terminal and type


ls /dev/tty*

There should be at long list of tty’s. Now plug in your dongle, wait a few seconds and repeat above command.
Some more ttyUSB devices should now have been added to the list.

Now lets start talking to the dongle. 3G support using the Huawei is working like a old fashioned modem, using commands like ATi to get the modem manufacture and so on. (A list of AT commands for Huawei can be found at here.)

We will be using the pppd program for 3G connection. pppd in turn uses program called chat to deal with the AT commands of the modem.

First we configure chat: Open an editor
sudo mousepad /etc/chatscripts/[providername]
and enter the below code


#
# abortstring
ECHO OFF
ABORT BUSY
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
TIMEOUT 3
# modeminit
'' \dATZ
TIMEOUT 4
OK AT+CPIN?
READY-AT+CPIN=9999-OK \d\d\dATDT*99#
TIMEOUT 60
CONNECT ''

Remember to replace 9999 above with your PIN code
Save and close.

At first chat will ask the dongle if it is READY. If not it usually because it have not been unlocked and a AT+CPIN=9999 is inserted. After READY – or in the second case OK is received, we have to wait a while for the receiver to find the network. Currently this is done by \d\d before the dial command but I think this could be improved by asking the dongle for its state. Possibilities in chat is wery limited and as it is now I do not always get connection in first attempt.

Chat is called from pppd which is configured in /etc/ppp/peers. Open the editor again
sudo mousepad /etc/ppp/peers/[providername]
Fill in the following:


hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/[providername]"
debug
/dev/ttyUSB0
460800
defaultroute
replacedefaultroute
noipdefault
user "notNeeded"
usepeerdns

For the initial test just type pon [providername] in your terminal to connect. Wait a little while and test that you are connected to the internet. poff to close the connection.

If it does not work, open the first file and change ECHO to ON. Save it, open a new terminal and type

tail -f /var/log/ppp-connect-errors

and try to establish the connection again while you observe the ppp-connect-errors terminal. In tail display you can follow the chat/dongle conversation and may spot the problem. The chat should end with a CONNECT statement from the modem and then the communication channel is handed over to pppd

PPP Tray in connected state.

 

When you got pon working it is time to add a nice gui. I installed ppp-tray wich work wery well and fit perfectly in Kuki’s small formfactor desktop. Please refer to Ubuntu forums for help on ppp-tray

Tip: With the above setup you can have configurations for several dongles in ppp-peers and select the one you want from ppp-tray.

 

If you have any doubt or question just ask on Kuki Forum (we have a dedicated topic for this how-to here) or come to our #kukilinux channel on Freenode IRC.

This How-to as been made by Klaus, thank you for your contribution!

Kuki: ”Because leak coudn’t find anything on telly”



Comments are closed.