Intro | Starting IrDA | Communicating | Advanced
Communicating over IrDA
The first test is to check if the discovery is happening properly. If the IrDA driver is properly configured, the Linux-IrDA will discover other IrDA devices in range. If the discover doesn't work, this indicate that the low level is not configured properly (and you don't need to go any further). You can check if there is any device listed in the discovery log with:
> cat /proc/net/irda/discovery IrLMP: Discovery log: nickname: Jean Tourrilhes, hint: 0x8220, saddr: 0x913b1bbc, daddr: 0x5619b45eYou can also check various other files in /proc, or use irdadump, check the debugging section.
Then, you might want to use a simple aplication, such as e-Squirt to verify that everything works fine. Or you can skip directly to the next section. The big advantage of e-Squirt is that it is a really simple protocol, doesn't stress the IrDA stack too much and we have implementation for various platforms, so that you can test your setup with almost anything on the other side (Linux, Win32, WinCE or Palm). Compile the Linux e-Squirt library and the test programs on all Linux computers, and go in the tests directory. On other platforms, load and start the relevant the e-Squirt application. If you want to use Linux as a receiver, just do:
> ./squirtTo use Linux as a sender, you can do:
> ./ultra_beacon http://cooltown.hp.com/ > ./socket_squirt http://cooltown.hp.com/With that, you should be able to exchange back and forth URLs and check that your IrDA stack works. If not, continue to read below. One caveat: Most implementations have two exclusive receiving modes, IrDA and Ultra, and they switch between these (either as a preference setting, or automatically triggerd by discovery packets). Linux is an exception and can listen to both at the same time. This means that unless you do a Linux-Linux test, only one of the two sender tests listed above will work properly.
Applications and protocols
If you want to run e-Squirt applications, you are done, and you just need to run the application themselves, they should work. Other applications and protocols you may want to run :
Terminal over IrComm
This is a simple test to check that IrComm is working between
two PCs. After that, you can try more complex applications such as
> getty ircomm0 DT19200 vt100 # Red-Hat syntaxor
> getty -L ircomm0 19200 vt100 # Debian syntaxAt this point, your text terminal should get reset and you come back to a login prompt. That's normal. I don't know what happen in X.
Client side with kermit: Start the terminal emulator
> kermit > > set line /dev/ircomm0 > > set speed 19200 > > connect > stty sane # Get backspace to work okThe prompt shouls appear after connect. Also, you need to ignore the following message: "Warning: no access to tty (Inappropriate ioctl for device). Thus, no job control enabled", and "Can't open terminal /dev/tty".
Client side with minicom: Minicom is a bit more problematic, and I'm still fighting with it. I still don't understand how to connect. I managed to make it work like this:
IrDA and mobile phonesNote: This section must be updated
I don't have any mobile phone, and I don't use IrCOMM, so I can't help... There is many people using this feature, and some of them have put instructions in their web pages. The people doing Gnokii are also quite knowledgeable in this area, so you may ask advice on their mailing list, but please report IrDA bugs in the IrDA mailing lists. If I can't reproduce your problem, I can't debug it, so I can't fix it. If I can't see anything obvious in the irdadump log, I won't bother. You may also want to try to reproduce the problem between two Linux boxes (because I may be able to reproduce that).
TCP/IP over IrLANNote: This section must be updated
I don't use IrLAN any longer, because I'm only using
IrNET. I just did a refresh on the original instructions that I
sent on the mailing list (removing mentions of irmanager).
IrLAN as an access option, which can be 1 (direct mode), 2 (peer to
peer) and 3 (hosted). Basically, you would use 2 if you connect to
another PC, 1 if you connect to a transparent access point, and 3 if
you are the access point. The HP
Netbeamer is an access point, but it accept connections only if the PC
is in peer mode. Go figure...
> insmod irlan access=2 > ifconfig irlan0 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255At this point, the light goes solid green. Link is on, you can ping and everybody is happy. You may want to add a gateway with:
"route add default gw ...".
PC -> PC:
Not everybody has a NetBeamer, so here is a step by step on how to create a link between two PCs.
On the first PC:
> insmod irlan access=2 > ifconfig irlan0 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255On the second PC:
> insmod irlan access=2 > ifconfig irlan0 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255After that, you should be able to ping and telnet...
By default, /etc/irda/network.opts is not used. In the previous example, we ifconfig-ure irlan by hand. If you have a Red-Hat/Mandrake distribution, irmanager can do the job automatically at the condition that you create a file /etc/sysconfig/network-scripts/ifcfg-irlan0 and set the right values in there... There might be more needed, but I'm not totally expert on this...
For other distribution (like Debian), you need to replace the file /etc/irda/network with possibly something from a Pcmcia package, and with some editing you might get it to load network.opts...
You might also want to add in your /etc/conf.modules a "option irlan access=2". So, if you use modprobe instead of insmod, you won't have to specify access=2 on the command line.