irattach [<dev>] [-s] [-d dongle] [-v]
irattach binds the Linux/IrDA stack to an IrDA port. So this is something you must do in order to use IrDA on your Linux machine.
The irattach command will load the necessary IrDA driver, which will configure the IrDA hardware, and configure the IrDA stack to operate on the new IrDA port. Multiple IrDA ports can be activated through multiple irattach commands.
irattach by default uses the irtty driver which connects to the Linux TTY subsystem and use the standard Linux serial driver. This works well for most machines and configurations, but limits the baud rate to 115200bps (IrDA SIR mode). The mode of operation will work with most FIR hardware (as found in laptops - they provide serial emulation) and most serial dongles (provided the proper dongle type is specified), making it a safe choice. However, this doesn't work with USB hardware and a few other FIR hardware.
irattach can also use one of the Linux FIR drivers, with either the proper command line options or module configuration (this is documented below). This will allow you to use higher baud rates (generally up to 4Mbps). In general, Linux FIR support is not as stable and mature, due to lack of time and documentation.
irattach must be run as root or installed setuid root, as it requires root privileges. If you have compiled the IrDA stack as modules (recommended), then you will need to edit the /etc/modules.conf file. See the Infrared-HOWTO for details.
<dev> is the name of a TTY, an IrDA interface
or IrDA driver.
-s starts discovery of remote IrDA devices (note that the form "-s 1" is no longer supported)
-v shows version information (this happens, when no option is given, too)
-d dongle attaches an additional dongle driver to the IrDA port.
You need a dongle driver if you have an infrared device that connects to your computer's serial port (normal 9-pin serial port connector). These devices are called dongles, and can currently be used by any SIR driver (IrTTY or irport). This option is not compatible with FIR drivers.
The currently known (serial) dongles are:
If you are one of the lucky people which have a FIR chipset that is supported, you can use irattach with the interface name of the IrDA port to configure. You will need to configure /etc/conf.modules appropriately, with at least an alias of irda0 to the driver name.
You don't strictly need to use irattach with FIR drivers, you can use modprobe to load the driver and ifconfig to bring up the interface. You can also use irattach with the module name.
Of course, you need to know which FIR driver applies to your hardware. You may use findchip to get information about the FIR chip. If this doesn't help, the Infrared-HOWTO shows other means to retrieve these data.
Also, you often need to configure the Linux-serial driver to ignore the IrDA port, otherwise both drivers will conflict.
The currently known FIR drivers are:
Attach the IrDA stack to the second serial port and start discovery irattach /dev/ttyS1 -s
Attach the IrDA stack to the first serial port where you have an ACTiSYS dongle and start discovery irattach /dev/ttyS0 -d actisys+ -s
Attach the IrDA stack to the NSC FIR (4Mbps) device driver on a Thinkpad
laptop irattach irda0 -s.
Note: You must also add some entries to
/etc/conf.modules:
options nsc-ircc dongle_id=0x09 alias irda0 nsc-ircc
"ioctl(TIOCGETD): %m"
"irattach: tty: set_disc(%d): %s"
"tcsetattr: %m"
"Failed to open %s: %m"
"Couldn't get device fd flags: %m"
"Couldn't set device to non-blocking mode: %m"
N.N.
irattach(8), irdaping(8), irdadump(8), findchip(8),
irkbd(8), irpsion5(8), modprobe(8)
Linux/IrDA Project http://irda.sourceforge.net -*-
Linux/IrDA-Tutorial http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/index.html -*-
Infrared-HOWTO http://mobilix.org/howtos.html -*-
Infrared-Hardware-Survey http://mobilix.org/ir_misc.html
This manual page is written by Werner Heuser
wehe@mobilix.org. It is based on the READMEs
from irda-utils by the Linux/IrDA Project and the Linux/IrDA-Tutorial.
It was subsequently updated and modified by Jean Tourrilhes
jt@hpl.hp.com.
Copyright (c) 2001 Werner Heuser
Copyright (c) 2002 Jean Tourrilhes
Permission is granted to copy, distribute
and/or modify this document under
the terms of the GNU Free Documentation
License (GFDL), Version 1.1 or any later version published by the
Free Software Foundation; with no Invariant Sections, no Front-Cover
Texts and no Back-Cover Texts.