Intro | Starting IrDA | Communicating | Advanced 

Communicating over IrDA

    Applications and protocols
        Terminal over IrComm
        IrDA and mobile phones
        TCP/IP over IrLAN


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: 0x5619b45e
You 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:
> ./squirt
To 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 :

Note that I don't use IrCOMM and IrLAN, so I can't help much with that...

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 PPP.
Server side: Start the terminal server

> getty ircomm0 DT19200 vt100	 # Red-Hat syntax
> getty -L ircomm0 19200 vt100  # Debian syntax
At 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 ok
The 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:
  • start minicom
  • Configure (Ctrl+A O)
  • sub-menu serial
  • set to /dev/ircomm0
  • set speed to 19200
  • exit
  • sub-menu "save as dft"
  • exit
  • Exit (Ctrl+A X)
  • restart minicom

IrDA and mobile phones

Note: 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).


Note: 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...

PC -> HP NetBeamer:
Here is how to hook to the NetBeamer... After aligning the IrDA port or after starting irattach, the light of the NetBeamer should flash. If it doesn't, you may want to play with the slot_timeout value.

> insmod irlan access=2
> ifconfig irlan0 netmask broadcast
At 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 netmask broadcast
On the second PC:
> insmod irlan access=2
> ifconfig irlan0 netmask broadcast
After 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.
Home | About | Contact | Documentation | Applications | Download | Resources 

Copyright 2002-2003 Linux-IrDA Project. Released under GNU FDL license.