IrDA (Infrared Data Association) is an industry standard for wireless communication with infrared light. Many laptops sold today are equipped with an IrDA-compatible transceiver that enables communication with other devices, such as printers, modems, LANs, or other laptops. The transfer speed ranges from 2400 bps to 4 Mbps.
There are two IrDA operation modes. The standard mode, SIR, accesses the infrared port through a serial interface. This mode works on almost all systems and is sufficient for most requirements. The faster mode, FIR, requires a special driver for the IrDA chip. Not all chip types are supported in FIR mode because of a lack of appropriate drivers. Set the desired IrDA mode in the BIOS of your computer. The BIOS also shows which serial interface is used in SIR mode.
Information about IrDA can be found in the IrDA how-to by Werner Heuser at http://tuxmobil.org/Infrared-HOWTO/Infrared-HOWTO.html. Additionally refer to the web site of the Linux IrDA Project http://irda.sourceforge.net/.
The necessary kernel modules are included in the kernel package. The package irda provides the necessary helper applications for supporting the infrared interface. The documentation can be found at /usr/share/doc/packages/irda/README after the installation of the package.
The IrDA system service is not started automatically by the booting process. Use the YaST runlevel module to change the settings of the system services. Alternatively, use chkconfig. Every few seconds, IrDA sends out a “discovery packet” to detect other peripheral devices in its neighborhood. This consumes a considerable amount of battery power. For this reason, IrDA is disabled by default and should only be started when needed. Manually activate it with rcirda start or deactivate it with rcirda stop. All kernel modules needed are loaded automatically when the interface is activated.
The file /etc/sysconfig/irda contains only the one variable IRDA_PORT. This is where the interface used in SIR mode is set. The script /etc/irda/drivers of the infrared support package sets this variable.
Data can be sent to the device file /dev/irlpt0 for printing. The device file /dev/irlpt0 acts just like the normal /dev/lp0 cabled interface, except the printing data is sent wireless with infrared light. Printers used with the infrared interface are installed just like printers connected to the parallel or serial ports. Make sure the printer is in visible range of the infrared interface and the infrared support is started.
Communication with other hosts and with mobile phones or other similar devices is conducted through the device file /dev/ircomm0. The Siemens S25 and Nokia 6210 mobile phones, for instance, can dial and connect to the Internet with the wvdial application using the infrared interface. Synchronizing data with a Palm Pilot is also possible, provided the device setting of the corresponding application has been set to /dev/ircomm0.
Only those devices that support the printer or IrCOMM protocols can be accessed without any further adjustments. Devices that support the IROBEX protocol, such as the 3Com Palm Pilot, can be accessed with special applications, like irobexpalm and irobexreceive. Refer to the IR-HOWTO on this subject. The protocols supported by the device are stated in brackets behind the name of the device in the output of irdadump. IrLAN protocol support is still a “work in progress” — it is not stable yet, but will surely also be available for Linux in the near future.
If devices connected to the infrared port do not respond, use the command irdadump (as root) to check if the other device is recognized by the computer. Something similar to Example 8.3. “Output of irdadump” appears regularly when a Canon BJC-80 printer is in visible range of the computer:
Example 8.3. Output of irdadump
21:41:38.435239 xid:cmd 5b62bed5 > ffffffff S=6 s=0 (14) 21:41:38.525167 xid:cmd 5b62bed5 > ffffffff S=6 s=1 (14) 21:41:38.615159 xid:cmd 5b62bed5 > ffffffff S=6 s=2 (14) 21:41:38.705178 xid:cmd 5b62bed5 > ffffffff S=6 s=3 (14) 21:41:38.795198 xid:cmd 5b62bed5 > ffffffff S=6 s=4 (14) 21:41:38.885163 xid:cmd 5b62bed5 > ffffffff S=6 s=5 (14) 21:41:38.965133 xid:rsp 5b62bed5 < 6cac38dc S=6 s=5 BJC-80 hint=8804 [Printer IrCOMM ] (23) 21:41:38.975176 xid:cmd 5b62bed5 > ffffffff S=6 s=* earth hint=0500 [ PnP Computer ] (21)
Check the configuration of the interface if there is no output or the other device does not reply. Verify that the correct interface is used. The infrared interface is sometimes located at /dev/ttyS2 or at /dev/ttyS3 and another interrupt than IRQ 3 is sometimes used. These settings can be checked and modified in the BIOS setup menu of almost every laptop.
A simple CCD video camera can also help in determining whether the infrared LED lights up at all. Most video cameras can see infrared light, whereas the human eye cannot.