Stickied. Great stuff!
Ok, so TheMacAce has his Mac tutorial, xtremein motion has the PC tutorial, time for one for the rest of us geeks. This tutorial will serve as a reference for tethering your phone via USB or Bluetooth (though USB is the main focus) using a *nix box of some kind (should apply generally to Unix-like systems, BSD, Solaris, etc.)
Pairing your phone with Linux is a whole 'nother tutorial in and of itself. Check the MAN pages on your box, or check the reference pages for whichever BT manager you are using.
The first thing to do is check and make sure that your *nix box is recognizing your phone via USB. To start off, with the phone unplugged from the box, open up a terminal and run:
You should get something about USB being disconnected, or alternatively no message about USB at all (check the end of the output). Now, connect your phone to a USB port, and run dmesg again. You should see an output at the end that says something about 'high speed USB device' or something similar. You should also see where the device is located... for example, mine is located at /dev/ttyACM0. Remember that .Code:dmesg
Ok, so once you have that output above, and you know that you're phone is being recognized, you need to setup the PPP configuration. Depending upon what dialer you decide to use (KPPP, wvdial, gnome-ppp, etc), your actual tabs and whatnot may vary, but the settings are the same. I'm going to be specific to wvdial, because I've found that I like it the best, and it's really easy to use from the command line.
First off, once the phone is plugged in, and you've made sure it's recognized using dmesg, then you want to type
in a terminal window. (this is assuming that you have wvdial installed, if not install it first... if you don't know how to install it, then either stop using linux, or learn how quick).Code:wvdialconf
This will basically setup a blank .conf file for you to get in and edit, located at /etc/wvdial.conf.
Using your favorite editor, get into the .conf file for editing (I prefer vim, but nano or whatever is fine). Make sure you do it as root, so it's not read only, i.e.:
orCode:sudo vim /etc/wvdial.conf
or whatever depending on your distro's methodology of superuser access.Code:su /etc/wvdial.conf
You will get a screen that is asking for the parameters to be entered. Enter your parameters, until it looks just like this:
This may involve deleting the second init string (init2), leave password and login blank (since T-Mo doesn't use them, fill in the modem if it's not already, with the info from that dmesg way back when that I told you to remember. Once you are done, save the .conf file and exit the editor. Remember that you may need to replace the wap.voicestream.com APN with something else (internet2, internet3) if you are on a different data plan (I'm using blackberry add-on, which uses the wap.voicestream.com backbone, but with all ports open). T-zones users will have to enter the proxy settings into Konqueror, Firefox, Opera, whatever you are using to access. If you are using a bluetooth connection, change the /dev/ttyACM0 section to whatever is appropriate for your connection (/dev/rfcomm0 or whatever).Code:[Dialer Defaults] Init1 = AT+CGDCONT=1,"IP","wap.voicestream.com" Modem Type = USB Modem Phone = *99# Password = <Your Password> Username = <Your Login Name> Modem = /dev/ttyACM0 Baud = 460800
To connect you just need to enter
Into a terminal... keep in mind that this terminal will remain open while browsing... if you close it, you disconnect (though of course you can minimize it).Code:wvdial
To disconnect, give a ctrl-C in the terminal, and it will disconnect cleanly.
Automating the Process
Now, so that you can have this a lot easier in the future, and not have to open a terminal, make a little bash shell program and put it in your /usr path. Open up a text editor, and type the following:
Save the file asCode:!/bin/bash wvdial
Now, go to your desktop, and create a new Link to Application (in KDE, right click on the desktop, and go to New->Link to Application, I'm not sure in Gnome because I never use it anymore). For the command, put in:Code:GPRS.sh
When double clicked, the icon start your connection for you without having to go into a terminal everytime.Code:wvdial
Hopefully that helps. The process for KPPP and other dialers is similar, just fill in the same values in whatever the corresponding fields are. I prefer wvdial because it is rock solid, where KPPP just locks up on me constantly.
If you have any questions, let me know!
When you are connected, you can see the details of the connection by doing an
*EDIT* oh and this was posted while tethering via USB through my 6681 on EDGE (speed of around 145kbps)... my lappy is running Kubuntu Dapper 6.04, KDE 3.5.1
Last edited by ollywompus; 05-29-2006 at 02:08 AM.
Stickied. Great stuff!
Lol I just realized that I created a shell script and the neglected to use it.
And really, it's not necessary... so ignore the whole part about creating a shell script.... just create the link to application.
Thanks for the stickify!