SuSE GmbH

SuSE Support Database

Title: Linux and IrDA

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

Linux and IrDA

Applies to

SuSE Linux: Versions since 6.3

Request

You'd like to connect a deivce using an infra-red port.

Background

Almost all Laptops and some peripheral equipment include an infra-red port for wireless communication.  The IrDA Protocol from the Infrared Data Association has become the standard for communication using these devices.

Information on the implementation of the IrDA protocol in Linux can be found under http://www.cs.uit.no/linux-irda/. Detailed information can also be found under http://www.snafu.de/~wehe/IR-HOWTO.htm, the IrDA HOWTO.

Almost all infra-red ports that are built into a PC can be addressed in the same way as a serial port.  This means that the Linux serial-port driver detects the port and configures it as it does any other serial port on a computer.  The infra-red port can be used thanks to an extra kernel-module which accesses the serial-port driver.

The communication between most devices that use the IrDA protocol is supported under Linux.  Better put...the following protocols are supported:

Prerequisites

Infra-red support is included since SuSE 6.3.  The preconfigured package irda includes programs which can integrate most infra-red ports using an UART compatable SIR infra-red port.  All necessary modules needed by the kernel cna be found in the kernmod package.

Configuring the Port

Check to see which I/O address and IRQ interrupt your infra-red port is using.  /dev/ttyS1 and Interrupt 3 are default settings (which means the I/O address 0x2f8.

If these prerequisites are filled you can begin.  IrDA is started with the command rcirda start.  After starting you can check if everything is running correctly with irdadump.  If everything goes as planned you should receive the following monitor-output every 3 seconds:

erda:~ # irdadump
13:42:57.118679 xid:cmd d04496e2 > ffffffff S=6 s=0 (14)
13:42:57.208957 xid:cmd d04496e2 > ffffffff S=6 s=1 (14)
13:42:57.298645 xid:cmd d04496e2 > ffffffff S=6 s=2 (14)
13:42:57.388923 xid:cmd d04496e2 > ffffffff S=6 s=3 (14)
13:42:57.478670 xid:cmd d04496e2 > ffffffff S=6 s=4 (14)
13:42:57.568914 xid:cmd d04496e2 > ffffffff S=6 s=5 (14)
13:42:57.658705 xid:cmd d04496e2 > ffffffff S=6 s=* erde hint=0500 [ PnP Comput
er ] (23)
These are the so-called Discovery packages. (exchange station identification frame - therefore `xid').

When another device with an infra-red port is brought in view the "xid" packages should be returned, which looks like:

09:12:56.756986 xid:cmd 84663133 > ffffffff S=6 s=0 (14)
09:12:56.846938 xid:cmd 84663133 > ffffffff S=6 s=1 (14)
09:12:56.936963 xid:cmd 84663133 > ffffffff S=6 s=2 (14)
09:12:57.026938 xid:cmd 84663133 > ffffffff S=6 s=3 (14)
09:12:57.116931 xid:cmd 84663133 > ffffffff S=6 s=4 (14)
09:12:57.206934 xid:cmd 84663133 > ffffffff S=6 s=5 (14)
09:12:57.286939 xid:rsp 84663133 < 556ecd9e S=6 s=5 BJC-80 hint=8804 [ Printer 
IrCOMM ] (23)
09:12:57.296982 xid:cmd 84663133 > ffffffff S=6 s=* erde hint=0500 [ PnP Comput
er ] (23)

If this second device doesn't receive a signal compare the hardware settings (I/O Address, Interrupts) of the laptop to those found in the file /etc/rc.config.  the variables to look for are IRDA_PORT, the serial port in use, and IRDA_IRQ which listgs the interrupt.

The output of irdadump also shows which protocols the peripheral device supports.  In the example above the device "BJC-80" supports both Printer and IrCOMM.  In this case the device could be addressed as a printer over the serial port /dev/irlpt0.

If you'd like to start the IrDA support at boot set the variable "START_IRDA" in the file /etc/rc.config to yes.

Configuring a printer with IrDA support

If the test above was succesfull you can configure your printer using YaST:

Configuring a Modem Connection (Example with a Cellular Telephone)

Enter the following commands to use the modem in a cellular telephone:

rm /dev/modem
ln -s /dev/ircomm0 /dev/modem

After this you should be able to connect using minicom or wvdial. Configure the modem as given in the handbook for normal serial-port modems.  Please check the compatability-list found under http://www.cs.uit.no/linux-irda/hardware.html to see if your modem can be used under Linux.

Exchanging Data between Linux Computers

Exchanging data between Linux Computers is normally accomplished with the IrLAN protocol. Although sometimes this process has problems auto-detecting the communication partners.

The most reliable method is to use the PPP protocol over a simulated serial port.

Place two computers in view of one another and start the PPP daemon on one computer, for example with the following command:

erde:~# pppd /dev/ircomm0 10.0.0.1:10.0.0.2
On the other computer start pppd as follows:
sonne:~# pppd /dev/ircomm0
With this a PPP connection is made between two computers over an infra-red port simulating a serial port. The computer "sonne" is given the IP Address 10.0.0.2 from the computer "erde" (which has the IP Address 10.0.0.1, given by the PPP interface). In short, you can reach the computer "erde" from the computer "sonne" (with the IP Address 10.0.0.1) using normal network-communication programs like ssh, telnet, ftp, nfs...etc.

----------

Keywords: IRDA, LINUR/IR, INFRAROT, INFRARED, NOTEBOOK, LAPTOP

----------

Categories: Hardware , Documentation , Frequently asked Questions

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

SDB-irda, Copyright SuSE GmbH, Nuremberg, Germany - Version: 17. Nov 1999
SuSE GmbH - Last generated: 24. Nov 1999 12:30:26 by wimer with sdb_gen 1.00.0