A few days ago I wrote a tutorial on how to connect your Mac to a GPRS service via Bluetooth and a Bluetooth-enabled phone. However, not everyone owns a Mac or a higher-end phone. And so here is a quick tutorial on how to connect your Linux laptop to a GPRS service using an infrared-enabled phone. For this article we used a Sony Ericsson K700i phone, a Sony Vaio N505VX laptop (which has an onboard IrDA) running the latest Arch Linux and Cingular’s GPRS. In the following weeks I will also be publishing two more tutorials showing how to do the same thing under Linux but via Bluetooth and the USB port.Note: While this effort is geared around Arch Linux, it should be easy to modify for any other Linux distribution by following the distro-specific package management, services start up, etc. Obviously, some of the steps must be done only once (for the setup), while others must be done each time before you dial to GPRS.
Login as root on a terminal. Download and install all the needed applications by issuing the following command on that terminal:
pacman -S wvdial irda-utils setserial wvstreams ppp nano
Edit the /etc/conf.d/irda file and change the DEVICE’s value to /dev/ttyS0 and above that line add IRDA=yes. Then enter:
setserial /dev/ttyS2 uart none (this seems to be necessary on *my* laptop, otherwise the infrared driver refuses to load)
findchip
Depending on what findchip outputs, you must find the right driver for your laptop. For example, mine says that my laptop’s chipset is a NSC one. So, you navigate to /lib/modules/2.6.XX/kernel/drivers/net/irda/ and make an “ls” there. So, after a quick look there, if you also have an NSC chipset, you can easily understand that you need to use the nsc-ircc module. If you have something else, use whatever module has a similar name of what “findchip” found. So, load the specific driver for your infrared chipset as such:
modprobe nsc-ircc dongle_id=0x0b
If you instead are using a usb-to-irda adapter (and so your infrared is not part of your laptop), you might need to take extra steps (refer to the IrDA manual).
If you are using a buggy Sony Ericsson phone (the T-series are known to have a buggy IrDA implementation), you might need to also do the following every time:
echo 115200 > /proc/sys/net/irda/max_baud_rate
echo 2000 > /proc/sys/net/irda/max_tx_data_size
echo 1000 > /proc/sys/net/irda/min_tx_turn_time
echo 1 > /proc/sys/net/irda/max_tx_window
Then, start the IrDA service as such:
/etc/rc.d/irda start
Then, load a few more modules that the IrDA service doesn’t take care of for you:
modprobe ircomm
modprobe ircomm-tty
You should be having some /dev/ircommXX devices on your /dev folder. If you don’t something is wrong, or you might need to create them yourself (usually this happens on 2.4.x kernels).
Now, create a call configuration file for wvDial:
nano /etc/wvdial.conf
In it, type the following for Cingular GPRS (change accordingly for your GPRS service):
[Dialer CingularGPRS]
Modem = /dev/ircomm0 (or /dev/ircomm1, depends on your hardware)
Baud = 115200
Phone = *99***1#
Username = WAP@CINGULARGPRS
Password = CINGULAR1
New PPPD = yes
Stupid Mode = 1
Save the file and exit the nano text editor. Now load the resolv.conf:
nano /etc/resolv.conf
and enter in it the Cingular GPRS DNS servers (change these numbers to your own GPRS’ service DNS numbers if you are not using Cingular):
nameserver 66.102.163.231
nameserver 66.102.163.232
Save the /etc/resolv.conf file.
Take your phone, and enable Infrared in it. On some phones, you might need to place the phone in “modem mode”, while on other phones this is automatic. Additionally, having the GPRS settings of your provider already setup’ed in your phone, is helpful.
Now, place the phone 20cm away from the laptop’s infrared port, and place it in a way that the two infrared ports face each other. On the Linux laptop enter in the command line:
wvdial CingularGPRS
If wvdial doesn’t connect, execute this:
irattach irda0 -s
and then retry ‘wvdial CingularGPRS’.
That’s it! A few seconds later, you should be connected to the internet via GPRS and start paying $1 per 100KBs. Infrared in SIR mode should be able to deliver about 8 or 9 KBs/sec. FIR mode is faster, but more incompatible, so I don’t recommend it.
If you run into trouble, use “irdadump” which is a debugging tool for IrDA and “irdaping any” to ping other IrDA devices. And a suggestion: to minimize the amount of data flowing through your GPRS connection (so you pay less), disable images/flash/java etc rendering. Also, here’s osnews’ lite headline page: www.osnews.com/jphone.php and here is slashdot’s: http://slashdot.org/palm/
It’s not ready for my desktop.
I think that an K700i is an pretty highend phone, but it is hard to tell what an highend phone really is.
Is it an phone that is expensive with many functions/features, is it an phone with man yfeatures but cheap or is it just an phone with many features?? Because almost every phone on the market today can do GPRS an i don´t find that as an highend feature.
Anyway, even if noone can use an expensive mac (which doesn+t have to be expensive, (look at macmini) they, according to your description, has tohave an very late version of linux, and an pretty late phone model to hang along.
I can right now say direct that i have not read the whole story, just the initial description for the story and have to say that you “say againt yourself”.
You have completely misunderstood.
Points:
1. While I used the K700i for this article, even some of the CHEAPEST phones come with Infrared. For example, next week I am planning to review the J210i which costs around $100, and it’s given for free by some carriers. And it comes wiht IrDA, but not bluetooth, obviously. IrDA-SIR costs about $1 to add to a device, while Bluetooth costs $10. So, obviously, most low-end phones either come with IrDA, or with nothing.
2. You talk about the mac mini, but the mac mini is not a laptop. GPRS is used by MOST and FOREMOST by people “on the go”. Which means two things: people either they use a laptop or a PDA with it (David, the owner of osnews uses with GPRS his Powerbook and his PalmOS PDA for example). And because Apple has REMOVED the IrDA networking stack that they used to have in MacOS9, you can only use Bluetooth with them anymore, or the phone’s usb cable.
You really went nit-picking here. You shouldn’t do that because I spent more than 5 hours putting everything together and researching (and I even hit a bug, which I later filed on linux kernel’s bugzilla). For this article, ANY irda-compatible phone should do. I just used the K700i because it’s the only phone that I have at home that has IrDA (my Motorola, Nokia and my Linux phones don’t have IrDA).
Well, ok, I have the T310 too (somewhere in a closet, it’s an eyesore so I have it hidden away from humans), but that’s a very-very old phone, although IT DOES work with my tutorial too.
This is an excellent article, but I want to point out for users of Cingular GPRS service that the APN username/password authentication settings are for the standard APN and that legacy Blue/ATTWS subscribers would pass different settings for APN and not require the username/password authentication for the RADIUS server.
I have written documentation for USB and Bluetooth tethering for the Cingular knowledgebase(I work there) but have not been able to perform any IrDA tethering since none of the laptops I have have infrared ports.
I will definately look through this in more detail on Monday though and see if I can incorporate this into a distrobution generic solution for our customers.
>Because almost every phone on the market today can do GPRS and
> i don´t find that as an highend feature.
What are you talking about? This article is NOT about calling to GPRS and using it directly with your phone! It is a tutorial about getting an internet connection VIA your phone and ROUTE it to your LAPTOP via infrared. In the first case you use the phone’s tiny screen and web browser to browse the web and in the second case you are using a full blown Konqueror/Opera/Gecko browser to browser the net! Do you understand the difference? In the first case you can do between 96×64 up to 240×320, and in the second case, you can go up to 1600×1200, at least. There is an obvious usage difference and it requires quite some work to route the connection from the phone. This is why I wrote the tutorial. It’s not a trivial thing to do for most users. And all the IrDA stacks are so buggy (except Palm’s which is apparently pretty good), that people do need guidance.
Any semi-modern phone that supports data calls should have some form of USB or serial cable available for purchase. Going the IrDA route is definately adding complexity to a very simple problem, with a very cheap solution: buy the cable.
In fact, most wireless companies will sell you a “mobile office kit” with your phone for this very purpose.
I think this is what the previous anonymous poster was hinting at, when he/she said that “almost every phone on the market today can do GPRS”, which is true… Most phones are capable of handling data, and most are capable of using a cable to tether the phone to a laptop or PC.
Personally, I’ve done data connections through my Verizon phone on their 1x network many times via Bluetooth from my Palm Zire 72, and via USB cable through laptops and desktop machines. There’s nothing to it, really, and nothing special required to route the data through the phone to the PC/PDA.
I know that Verizon’s network is not the same as Cingular’s network. But getting a PC connected to the network through a tether isn’t much different on either network.
It is not difficult when using Windows. But it’s getting much more complex if you are using Unix or Linux. Using the cable, yes, it makes it easier (it’s just ppp over usb, you find the equivelant /dev/ttyACM0 device on your linux and you go from there).
But doing it with IrDA, it ain’t that easy, not only because of the IrDA stack bugs, but also because many distros are configuring IrDA or serial ports in a different way than other distros.
Most low-end Sony Ericsson phones don’t come with a USB data cable either, the user needs to shed $15-20 for it. Someone, might choose not to buy it. For these people, this tutorial might be useful.
Also, it’s not difficult when you do it via Palm or PocketPC, not only just Windows. These OSes have special tools to work via Bluetooth or cable with a mobile phone. But on Linux, there is a lot of manual work that needs to be done, and if you read the article, you would notice that it is not a trivial job for a non-power user or non-developer. Sure, having it laid out for you in a single page and having myself or someone else do the research, might look “easy” to you, but I promise you it is not. And putting in place the irda bugs (I stumbled on a major one) and the differences between distros, this quickly becomes a headache. And yet, one might choose that route. A lot of people already have.
And the good old *k* days are back.
Off topic:
Are there free (non-subscription) GPRS services?
the one I am using is with “pay as you go” with Cingular. I don’t have a long term plan with them.
BTW, I tried my Linux phone to work as a modem with my Linux laptop, via USB. The Anonymous earlier tried to make a case as to how “easy” is to have that working. Well, it ain’t under linux, not for all. I stumbled into ANOTHER *kernel* bug (apparently a 2.6.x one), where the /dev/ttyACM0 device doesn’t get “serial” properties from usbserial and cdc_acm modules. It doesn’t happen with all phones (most work), but my Linux smartphone doesn’t. I might try tomorrow my nokia phone.
I used to use IrDA with my old SE T68i, but to be honest it’s daft for most purposes – it’s ok for sending the odd contact, game or photo to/from the phone, but the line-of-site thing is a pain in the ass (and with a PDA it takes up the IR port that it’s more useful to use a keyboard with).
These days I use bluetooth for the link to the phone (from my Linux laptop and from my Zaurus PDA). Much better (once it’s setup) – and I actually have a K700 at the moment. It works a treat, much nicer than using IrDA – and on the laptop, KDE comes with the tools you need to handle bluetooth anyway….unlike IrDA.
Also, several phones have stopped including IrDA in favour of bluetooth these days (my wife’s Motorola V3 has bluetooth, but no IrDA).
I use GprsEasyConnect.
It works easy, works with my phone and runs under
Linux or BSD.
http://www.gprsec.hu/modules/index
http://www.gprsec.hu/images/gallery/3/2-o.jpg
http://www.gprsec.hu/images/gallery/3/3-o.jpg
Irda, BlueTooth, USB, Serial
Enjoy!
put you phone 20 cm from your irda and start paying 1 dollar for 100 kb of data…..
I dont know what kind of deal he gets from his ISP, but I get 10 MB for a buck…. here in hungary…