[This page originally lived at http://www.natecarlson.com/linux/vaio-infrared.php. I am working on migrating all content over to WordPress, which is why this post exists. This is ancient, and probably no longer applies.]
This document describes how I got infrared working between my Sony VAIO PCG-F390 and my Nokia 8290 GSM Phone.
Last modified: 9/13/01 Nate Carlson
I’ve always wanted wireless internet, but didn’t want to pay the insane rates for Ricochet, etc. I finally ended up picking up a Nokia 8290 phone, which has an integrated modem that you can access over the infrared port. Set up under Windows was fairly simple (just download the ircomm updates, and away it goes), but I had some trouble getting it working under Linux. My two main problems were the broken serial port that the laptop sets up for the port, and then I had problems with latency that were caused by the kernel parameters I was using. I hope this document will make a similar set up easier for you. :)
First Step: Compile options into the kernel
I used the following options with kernel version 2.4.9-ac8:
Just make sure you have these options configured, and build as usual. Note that the CONFIG_IRDA_FAST_RR is very important; without it, you get extremely high latency on the link! I was getting ~5000ms pings over PPP once I brought the link up before I added that option; now I get around 1000.
Second Step: Set up the module config
pre-install nsc-ircc /bin/setserial /dev/ttyS2 irq 0 port 0 uart none
alias irda0 nsc-ircc
options nsc-ircc dongle_id=0x09 io=0x3e8 irq=10 dma=0
The setserial command disables the (broken) serial port for infrared that the notebook enables by default. If you don’t disable it, things aren’t going to work.
Third Step: Activate the Infrared Subsystem
Before you can activate the infrared devices under Linux, you will need to create the character devices (ie, serial ports) that you will use to connect to you infrared device. You only need to do this once. To create it:
# mknod /dev/ircomm0 c 161 0
# mknod /dev/ircomm1 c 161 1
If you need more than two serial devices, just increment the minor number.
Once you have the character devices ready, you’re ready to bring up the link. To do this, run:
# irattach irda0 -s 1
Once you have run this command, you should be able to snoop the traffic on the infrared port by using irdadump. You will always see traffic from your own computer, and if you have a device activated and in the line of sight, you should be able to see packets coming from that device.
Last Step: Use the port!
Once you see traffic from the other devices, you’re ready to go! Just point your favorite terminal program or ppp dialer to /dev/ircomm0, and you’re set. If you are using this to access your Nokia phone, you may also find applications such as ‘gnokii’ and the gsmutils package useful; they allow you to back up your phonebook, and do other interesting operations like that.
If you have any comments on this document, please feel free to drop me an e-mail at: email@example.com