Benscomputer.no-ip.org

Please see footer for Copyright Details
Benscomputer.no-ip.org

Patent Free


Using the LG (Cookie) KP501/KP500 as a Dial Up Adaptor in Linux




(A PDF of this document can be found here.)
  1. Intro
  2. Notes
  3. Preparation
  4. Configuration
  5. User Access Rights
  6. Connect to the Interwebs
  7. Alternative Config
  8. Closing Notes

Intro

Using the LG Cookie as a dial up adaptor in Linux is reasonably easy. You follow many of the same steps as when using the W910i as a modem. The instructions below are to use an LG Cookie on T-Mobile. The phone was originally locked to Orange, and because of this the steps differ slightly to those for the W910i (Which was always T-Mobile).

If you are using an unlocked phone then use the WVDIAL config given below, if you are using the phone on the network it was configured for then use the configuration at the very bottom of the page (you'll see the difference)


Notes

As with the W910i we are connecting via USB, largely because it means the phone will be charging at the same time. This put us at a disadvantage with the W910i because it meant we couldn't use HDSPA. As the Cookie doesn't support HDSPA this isn't really an issue.


Preparation

OK firstly, you need the relevant kernel options set. Check the following options are enabled in your kernel config;


Device Drivers
--USB Support
----USB Modem (CDC ACM) support
----USB Serial Converter Support

Before you dig around in the config, do a quick

lsmod | grep cdc_acm

to see if the module is already installed. If so, Continue!


Next, we need to install Wvdial. One of its dependancies is WVStreams, so grab them both

Wvstreams - http://alumnit.ca/wiki/?page=WvStreams
Wvdial - http://alumnit.ca/wiki/index.php?page=WvDial

Or on Gentoo, simply

emerge -av wvdial


Now connect your LG Cookie to the Computer. When it detects the connection, it will ask you which mode you want to enter. The answer is not as obvious as it seems! You will be given the following options;

  • PC Internet
  • Mass Storage
  • PC Suite
  • Music Sync

A sensible user would select PC Internet. Unfortunately this is the incorrect answer! Selecting this option provides you with a virtual CDROM containing Windows Device drivers for the modem. Not a lot of use to us on a non-windows system.

However, selecting PC Suite will provide us with access to the modem. If your modules are loaded, then a quick

dmesg

should show a line similar to the one below;

cdc_acm 2-1:2.0: ttyACM0: USB ACM device

The system has found our modem, now we just need to configure dialing out.


Configuration

The first thing to do (as root) is to run;

wvdialconf

This will detect the basic settings, and create the file /etc/wvdial.conf for you.

Next we need to edit it, because the phone I use to dial up can change I use several sections. but here's the configuration I use

[Dialer Defaults]
Auto DNS = true
Baud = 460800
Dial Attempts = 2
Idle Seconds = 180
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Modem = /dev/ttyACM0
Modem Type = USB Modem

[Dialer Tmobile]
Compuserve = false
ISDN = false
Init1 = ATZ
Init5 = AT+CGDCONT=1,"IP","general.t-mobile.uk"
Modem = /dev/tty/ACM0
Modem Name = KP501
Modem Type = USB Modem
Password = pass
Phone = **99*1#
Remote Name = user
Stupid Mode = true
Username = t-mobile

Now as I mentioned previously, my config has been made un-necessarily complex by the fact that the phone was locked to Orange. The Orange Internet Settings have been made read only, so you can't edit or remove them. That is why this config has the Init5 line. If you are using a KP500/501 on the network that it was locked to, you wont need that line. In fact, if you're not using T-Mobile, it'll break your config!

If you aren't in the same position as me, then use the config at the bottom of this page.

Either way, save and exit.


User Access Rights

Add any users that you want to be able to dial out to the groups dialup and uutp. Best to check that the groups exist first though;

grep dialup /etc/groups

if nothing is shown then run

groupadd dialup

then do the same sequence for uutp.

Next we want to add each user to the group

usermod -a -G dialup username
usermod -a -G uutp username

and finally check that the user was added successfully

id username

and look for the group names in the output.


Connect to the Interwebs

Right, you've come this far, so it's time to make the connection. Try to connect as root first, it makes life easier for troubleshooting!


run

wvdial

which should generate a long list of output, ultimately ending with information similar to the following;

- -> local IP address 10.156.189.208
- -> pppd: ??[06][08]
- -> remote IP address 10.156.189.208
- -> pppd: ??[06][08]
- -> primary DNS address 149.254.192.126
- -> pppd: ??[06][08]
- -> secondary DNS address 149.254.201.126
- -> pppd: ??[06][08]

Obviously, your IP addresses are going to differ, and you may not see the question marks after ppd:.
Either way, at this point, you are connected! There may still be a little bit of legwork to do though, firstly, lets check our connectivity. We are on T-mobiles network, but can we send any traffic across it?

So lets ping google (their servers must handle billions of un-necessary pings every day!)

ping www.google.com

Now, if you're a jammy sod, you'll start seeing replies. If not, then the route has not been set. Wvdial (I could swear) used to have an option to set default route, but it doesn't seem to be accepted in the config files any more. If anyone knows why or how it changed please give me a shout!!!

Anyway, lets set the route, as root (No puns please!) run the following;

route add default ppp0

then if you run the command

route

you should see the following line (there will be other lines as well)

default   *   0.0.0.0   UG   0   0   0   ppp0

Now when you ping Google, you should see some replies. Start browsing to your hearts content!




Alternative Config

This is the config I would use for a phone locked to the T-mobile network. For any other network, it should just be a case of confirming the username/password. As long as the connection to the net works on your Phones browser, the following should work

run

wvdialconf

then edit /etc/wdial.conf

Change the Phone = line to

Phone = *99*1#

Change Username = to

Username = t-mobile

Change the Password = to

Password = pass


Closing Notes

It really couldn't be much easier! OK so you don't get the speed of a Mobile Broadband dongle, but in my experience you do get a far better chance of having coverage! It's also one less thing to have to remember to pack when you go away, so in that respect it's far better.

T-Mobile users (and a lot of other networks) will find they get a fairly limited version of the Internet, thanks to our cotton wool society. You will find that there is a Content Filter enabled by default, and to remove this you need to either provide Credit Card details or nip into a branch with details. I don't have a CC and I'm too lazy to go into a branch, so I phoned the Content Filter number intent on browbeating them into removing the filter. As it turns out, all I had to do was ask!

Unfortunately, the Content filter is a bit broad. I can live without browsing smut on a GPRS connection, but when pages like Yahoo Answers are blocked, thats a step too far!





COMMENTS: If you wish to comment on a story, please use the Contact Me page. Due to the level of comment spam on the net, this has become the easiest way for me to police it. Thanks

RIPA NOTICE: NO CONSENT IS GIVEN FOR INTERCEPTION OF PAGE TRANSMISSION

DISCLAIMERS:

Note: all views expressed on this site are my own, and do not necessarily represent the views of my friends, family or employer.
Creative Commons
LicenseThis page is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike2.5 License, and are copyright to me, Ben Tasker, or their respective owners. Unless otherwise stated. All Images operate under  a seperate license
Please read this page for more information. The Full Image License can be read here




RSS
Feed [Valid RSS]

Privacy Policy