Prolink PHS100 in Ubuntu Jaunty (9.04)

I finally decided to get a 3G connection as a backup for my ADSL one at home. I often find myself ending up in places without readily provided Internet and wishing for a mobile solution. After doing a bit of research, I found Airtel as the best deal. If you are wondering about Airtel 3G coverage, all I have to say is that I live and usually spend my time within a 20-30 Kilometre radius from the city of Colombo. And when I go out of this zone, Internet or a Laptop or anything related to work is usually the last thing on my mind :) So getting 3G coverage in rural Sri Lanka isn't a huge priority! That, and the fact that this is a supplementary connection, which means it should cost at least 50% or less compared to the primary connection made the choice very easy.



Now for the fun part. Hating how the usual Huawei E220 modem looks, I opted for the more elegant Prolink PHS100, which can be bought with no vendor lock (let's not get started on vendors locking hardware for which I pay for). I found this great post by Laxman, which gets the modem detected in Linux perfectly. But upon dialling with wvdial, the Airtel server wouldn't give me an IP nor any sort of DNS data. I kept getting the following;

--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: ATM0
ATM0
OK
--> Sending: AT+CGDCONT=1,"IP","airtellive"
AT+CGDCONT=1,"IP","airtellive"
OK
--> Modem initialized.

--> Sending: ATDP*99#
--> Waiting for carrier.
ATDP*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Fri Sep 11 00:12:27 2009
--> Pid of pppd: 5989
--> Using interface ppp0

--> pppd: Я[06]���� ���
--> pppd: Я[06]���� ���
--> pppd: Я[06]���� ���
--> pppd: Я[06]���� ���
--> pppd: Я[06]���� ���
--> pppd: Я[06]���� ���
--> pppd: Я[06]���� ���
--> Disconnecting at Fri Sep 11 00:13:03 2009

--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.

--> Auto Reconnect will be attempted in 5 seconds

Looking at my /var/log/messages I saw this, which eventually lead to hours of reading logs, googling error messages etc., etc.

Sep 11 00:11:33 clair pppd[5974]: pppd 2.4.5 started by root, uid 0
Sep 11 00:11:33 clair pppd[5974]: Using interface ppp0
Sep 11 00:11:33 clair pppd[5974]: Connect: ppp0 <--> /dev/ttyUSB2
Sep 11 00:11:33 clair pppd[5974]: CHAP authentication succeeded

Sep 11 00:11:33 clair pppd[5974]: CHAP authentication succeeded
Sep 11 00:12:03 clair pppd[5974]: IPCP: timeout sending Config-Requests
Sep 11 00:12:09 clair pppd[5974]: Connection terminated.
Sep 11 00:12:09 clair pppd[5974]: Modem hangup

Sep 11 00:12:09 clair pppd[5974]: Exit.

I tried for a while and was about to admit defeat and go for the ugly modem, which users claim to work perfectly in Linux. Then I had a Eureka moment. What if the modem remembers settings while its connected to Windows? I mean its light is always Red in Linux. But I saw it turning Blue when connected (that's what the manual says too Red -> no show / Blue -> party on). So I plugged the modem back in my Windows machine and instead of disconnecting using the Software, I just yanked it out.

Voila! Now, when its plugged to Linux the light turns Blue in seconds and wvdial completes. By the way, this is the second post from my 3G connection. The first post was an e-mail to Laxman (who was very helpful in giving further tips to try out) informing the solution. I added a comment to his original blog post as well.




Comments

Wildan Maulana said…
Hi,

I do what laxman suggest, but with no luck.

After i compile 2.6.31 kernel and enable the serial driver .., voila.., my PHS100 modems work as expected ..

http://wildanm.wordpress.com/2009/09/14/prolink-phs100-on-ubuntu-jaunty/
Infernova said…
I was wondering if you could help me with getting my phs100 setup. I am running Ubuntu Netbook Remix, the kernel is 2.6.28-15 and I could not get it to work at all following your blog and laxman's.

Thanks
Tyrell said…
@infernova

Did you try plugging it to windows and getting it to connect first and then just removing the dongle (without using the s/w just pulling it out)?
Infernova said…
I did and its working. But whenever I plug in an eth0 line.. it will refuse to get dns. I am using the Dialog 3G package.. do you know how to configure the dns after wvdial is connected?
Tyrell said…
@Infernova

Try turning Network manager off

sudo /etc/init.d/NetworkManager stop

I sometimes find Network Manager doing unwanted meddling with connections. I'm not sure whether it is the problem in your case. But worth giving a try.
Infernova said…
Thanks. I will try that when I get back. At the moment I am using the windows partition. Do you know what /etc/init.d/ppp-dns does? Is it used to set the dns after the ppp loads?
Infernova said…
I think i figured out what was wrong. It was the wvdial script. I had some other junk on it.. I changed it and now it works... but I would like to be able to do it with gnome-ppp instead of wvdial, would you have any ideas?
Tyrell said…
I use gnome-ppp too.

1. Launch gnome-ppp and put the phone number as *99***1#
2. Click "Setup" and enter 'Device' mine is /dev/ttyUSB2 Click 'Detect' to make sure it works.
3. Now click 'Init Strings'. Enter your init strings from wvdial.conf (except the very first init string)
4. Go to the 'Options' Tab. Make sure that 'Ignore terminal strings (stupid mode)' is checked.
5. Additionally I have checked 'Dock in notification area' as well. You get a nice icon in the tray instead of a minimized gnome-ppp window that way.

That's about it :)
.... said…
it's worked... Thanks tyrell..

Popular Posts