Home
About
Contact
Documentation
Applications
Download
Resources
Documentation
Developer
Status

Intro | Starting IrDA | Communicating | Advanced 

Starting Linux-IrDA stack

Contents:
    Introduction
    SuSE Linux 8.0 and 8.1
    Debian GNU/Linux 2.2 and 3.0
    Mandrake Linux 8.1 ... 9.0
    RedHat Linux 7.1 ... 9.0
    Slackware 8.0 and 8.1
    Common pitfalls

Introduction

Most Linux distributions come with IrDA support by default. Following are instructions to configure IrDA and your device. If you don't find explanations for your distro, please send contact us on Linux-IrDA mailing list.

SuSE Linux 8.0 and 8.1

SuSE come with irda-utils-0.9.13-494 and the relevant script to start IrDA is /etc/init.d/irda which is configured by /etc/sysconfig/irda. You may configure IrDA from Yast2, although here are the variables which can be set:

  • IRDA_PORT - Here is what SuSE configuration file says:
    Currently the UART (SIR) mode is supported in the normal configuration. The variable IRDA_PORT sets the used serial port. Have a look at your BIOS-Setup, to find out which is correct.

    If you have a supported FIR chipset, specify the name of the corresponding kernel module in IRDA_PORT, e.g. IRDA_PORT="toshoboe". FIR must be enabled in the BIOS setup first. Sometimes you additionally have to disable the serial port, which would be used in SIR mode via 'setserial /dev/ttyS uart none'

Please have a look at smcinit package if you have installed SuSE on a Toshiba laptop.

Debian GNU/Linux 2.2 and 3.0

You at least must install the irda-common package. To have at hand the irdadump, then get and install irda-tools package. The easy way is:

> apt-get install irda-common
> apt-get install irda-tools
As of August 2002, these utilities are based on irda-utils 0.9.14. To start IrDA driver and stack at boot time, you should run:
> update-rc.d irda defaults
To start or stop it manually, run:
> /etc/init.d/irda start
> /etc/init.d/irda stop
Before you run the irda script you must configure the /etc/irda.conf. Bellow are the variables used in this file:
  • IRDADEV: path to device where IrDA dongle is attached. It's for serial attached dongles. Default is /dev/ttyS1, but you must figure where you connect the physical device and change value acordingly.
  • DONGLE: this efectively tell which device driver to be used between physical device and IrDA stack. Look on dongle documentation to figure out. For laptops with FIR built-in, please consult ... (fixme: must point to a list of laptops, devices and drivers)
  • DISCOVERY: if blank, discovery is not started. If set to -s, the continuos discovery will be started and any IrDA device in range will be discovered and made available in discovery log.
  • ENABLE: default is no and mean that IrDA is not started at boot or by issuing /etc/init.d/irda start. To activate it you must set this variable to yes.

Mandrake Linux 8.1 and 8.2

This section must be written.

RedHat Linux 7.1 ... 9.0

RedHat come with irda-utils-0.9.14 (on RedHat 9.0 Shrike) and the relevant script to start IrDA is /etc/rc.d/init.d/irda which is configured by /etc/sysconfig/irda. Here are the variables which can be set:

  • IRDA - Default yes. If it's no then IrDA subsystem will not start even when run at startup.
  • DEVICE - It's the device where Linux IrDA stack will attach. For infrared dongles you should use the serial device where dongle is attached, like /dev/ttyS1. For SIR/FIR IrDA controlers found on-board on laptops you should put here irda0.
  • DONGLE - If the DEVICE tell that you use a dongle, then here you put the type of dongle hardware: actisys, ... etc. Read the irattach man page for complete listing. For FIR drivers (i.e. when you have DEVICE=irda0) you must comment this variable.
  • DISCOVERY - Default yes. This will put Linux IrDA stack in discovery mode. Note that on laptops this will drain additional power and may prevent a kernel intiated suspend (this last statement is not fully verified).

Slackware 8.0 and 8.1

The Slackware user have no IrDA support by default, except the one provided by kernel. You must grab the latest irda-utils source and compile yourself. For instructions see Advanced section.

Common pitfalls

There is many way to get the IrDA stack to not run properly. Not following instructions seems to be one of the most guaranteed way to reach that goal. Here are mistakes I've seen user make:

  • IrDA ports not properly aligned
  • irmanager running (it's obsolete, get rid of it; let the init scripts of the distribution do the job)
  • irdaping running (prevent the LAP connection)
  • obsolete irda-utils
  • using the wrong driver (FIR/irtty/irport)
  • using the wrong port (/dev/ttyS0 vs /dev/ttyS1)
  • wrong permissions on the serial port (irattach must run as root)
  • some other application (such as pppd) grabbing the serial port
  • some other driver (most likely a PCMCIA card) using the IRQ that the IrDA driver needs (for Pcmcia drivers, play with "exclude" directives in /etc/pcmcia/config.opts)
  • wrong irattach command (irattach /dev/ttySX for SIR vs irattach irdaX for FIR, where "X" is a number, i.e. 0)
  • multiple instances of irattach for the same port (staying in background)
  • wrong modules names (should be ircomm-tty, not ircomm_tty)
  • IrDA modules not loaded
  • mixing up /dev/ttySX and /dev/ircommX. The stack runs on top of /dev/ttySX and provides serial emulation through /dev/ircommX, so serial apps should run on top of /dev/ircommX.
  • compiling the IrDA stack static (i.e. non module - it may work, but this is not what the developpers work with)
  • compiling the IrDA stack without the IRDA_DEBUG option. This option enable extra checks that prevent your kernel to crash.
  • mixing modules belonging to different versions of the IrDA stack
  • unclean IrDA source (failed patch)
  • mixing modules belonging to different kernel versions
  • trying to load an IrDA module on a stack wich has this code compiled static (or loading module twice)
  • wrong version of modules tools (for kernel 2.4)
  • failed to do depmod -a (usually automatic at reboot)
  • using a version of the kernel which is not used and recommended by developpers.
Home | About | Contact | Documentation | Applications | Download | Resources 

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