Search This Blog

24 June 2010

Configuring La Fonera 2.0n to work in South Africa

in this post I am showing how to configure Fon's router to work with South Africa's Vodacom network & 3G USB modem.

What is La Fonera?
According to www.fon.com La Fonera is a great router with the capability to your existing 3G dongle internet connection into Wifi. Check out their website for more detail.

Hardware Used
Prior to receiving the La Fonera 2.0n, I used to connect my laptop to Vodacom via the Vodafone branded 3G USB modem - Huawei K3750, using the packaged Mobile Partner software for Mac.

While that worked without any problems, the configuration of the La Fonera 2.0 was not a simple plug & play. It took me a good deal of research and hard thinking to determine which steps I am missing and what I would need to do in order to establish an internet connection via the La Fonera 2.0n


Step by Step
First of, you need to download a DEVELOPER image of the latest firmware in order to allow login via ssh. This is required to make changes to the configuration files which are otherwise not accessible.

Download the latest version of the firmware here: http://download.fonosfera.org/LATEST/
Make sure you are downloading the _DEV.tgz file, the .img file will not work.

Next, we need to login to the La Fonera router (http://192.168.10.1 in your browser, the default password is "admin"). Under Dashboard >> Settings >> System browse & select the downloaded firmware file --> wait until the firmware is updated and reboot the device.


When you log in again, you will see that the logo on the top right hand side has changed to show FONOSFONERA beta - update successful :)

Next we can start


Configuring the Settings:
Plug in the Huawei K3750 and set-up the modem via La Fonera's dashboard (Dashboard >> UMTS/3G >> Configure). For Vodacom the following CUSTOM CONFIGURATION needs to be set-up here (without the quotation marks):

CUSTOM SETTINGS
APN: "internet"
PIN: your_SIM_PIN_goes_here (leave blank for no PIN)
Username: ""
Password: ""

(Username & Password are not required to connect to Vodacom in South Africa).

After entering these details, nothing seemed to happen... ;)

Now, ssh into the router (ssh root@192.168.10.1 - the default password = "admin") and edit the following files to make them look as indicated below. The settings might have to change slightly depending on your network and hardware.

1) cd /etc/config
vi umtsd
(press i to get vi into edit mode)
(amend the file to hold the information below)
(after editing press "Esc" to exit edit mode and "wq" followed by "Enter" to save the changes; w=write & q=quit)
/etc/config/umtsd
config 'umtsd' 'umtsd'
option 'pin' 'YOUR_PIN_HERE' <-- (enter your SIM PIN)
option '_country' '_custom'
option 'apn' 'internet'

config 'umtsdstate' 'umtsdstate'

config 'umtsdevice' 'option12D11003'
option 'vendor' 'Huawei'
option 'device' 'K3750'

2) cd /Apps
vi umtsd.lua
(press i to get vi into edit mode)
(amend the file to hold the information below)
(after editing press "Esc" to exit edit mode and "wq" followed by "Enter" to save the changes; w=write & q=quit)

/Apps/umtsd.lua

... (@ about 10% of the file you should see the following)

-- some dummy data
local data = "/dev/ttyUSB0"
local cmd = "/dev/ttyUSB0" <-- used to be ttyUSB1
local type = "Huawei" <--
local user = ""
local pass = ""
local apn = ""
local pin = ""
local since = 0
local mode

... (@ about 75% / 78% of the file you will see)

print("ABORT \"NO CARRIER\"\n"..
"ABORT \"NO DIALTONE\"\n"..
"ABORT \"ERROR\"\n"..
"ABORT \"NO ANSWER\"\n"..
"ABORT \"BUSY\"\n"..
"\"\" \"+++atz\"\n"..
"OK \"ATE0V1\"\n"..
"OK AT+CGDCONT=1,\"IP\",\""..apn.."\"\n"..
"OK \"ATD*99#\"\n".. <-- access number (*99#)
"\"CONNECT\" \"\"")
f:write("ABORT \"NO CARRIER\"\n"..
"ABORT \"NO DIALTONE\"\n"..
"ABORT \"ERROR\"\n"..
"ABORT \"NO ANSWER\"\n"..
"ABORT \"BUSY\"\n"..
"\"\" \"+++atz\"\n"..
"OK \"ATE0V1\"\n"..
"OK AT+CGDCONT=1,\"IP\",\""..apn.."\"\n"..
"OK \"ATD*99#\"\n".. <-- access number (*99#)
"\"CONNECT\" \"\"")

...

3) Log Out of the ssh session and in your browser go to Dashboard >> Settings >> System and choose "Reboot".
After rebooting, the USB modem should connect within 30 to 60 seconds.

4) Just to confirm - /var/state/umtsd
when entering "cat /var/state/umtsd" in the terminal you should see something like

umtsd.umtsd.attached=1
umtsd.umtsd.device=option12D11001
umtsd.umtsdstate.state=ONLINE
umtsd.umtsdstate.tx=0
umtsd.umtsdstate.rx=0
umtsd.umtsdstate.online=0
umtsd.umtsdstate.vendor=
umtsd.umtsdstate.model=
umtsd.umtsdstate.provider=65501
umtsd.umtsdstate.signal=16,99
umtsd.umtsdstate.signal=16,99
umtsd.umtsdstate.signal=16,99
umtsd.umtsdstate.signal=16,99

This has been working for me ever since...
Thanks to all contributors (many of them unknowingly) - as I have been following the advice of:

No comments: