IRATTACH(8)

πŸ“¦ version 0.9.18, in fedora 43, fedora 44

🫢 IRATTACH(8) 🫢

aka the manual page for irattach, straight outta section 8 (the admin/system-commands section, iykyk)

✨ NAME ✨

irattach β€” binds the Linux-IrDA stack to a IrDA port

yes bestie that is literally the whole job, and it is lowkey the most important step πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

irattach [ <dev> ] [ -s ] [ -d dongle ] [ -v ] [ -h ]

🌸 DESCRIPTION 🌸

okay so. irattach binds the Linux-IrDA stack to an IrDA port. What that means fr is it configures the low level of the Linux-IrDA stack in the kernel. And bestie, you usually gotta do this <em>before</em> you (or literally any application) can touch the higher layer of the IrDA stack. No skip step, no shortcut, periodt.

The irattach command loads the necessary Linux-IrDA driver β€” which is what actually configures your IrDA hardware β€” and then configures the IrDA stack to operate on that brand new IrDA port. And guess what, you can activate multiple IrDA ports by just running multiple irattach commands. Slay.

By default irattach uses the irtty driver. The irtty driver connects to the Linux TTY subsystem and uses the standard Linux serial driver. This works great for most machines and configs, but it caps the baud rate at 115200bps (that's IrDA SIR mode, btw). This mode of operation plays nice with most FIR hardware (like the stuff found in laptops β€” they give you serial emulation) and most serial dongles (as long as you specify the proper dongle type), which honestly makes it the safe choice. safe choice queen. BUT β€” and this is the tea β€” USB dongles and a few FIR hardware pieces don't support serial emulation, so they can't be used with the irtty driver. Sorry bestie, that's just how it is 😭.

irattach can <em>also</em> use one of the Linux FIR drivers (USB dongle drivers included) instead of irtty. Most FIR drivers need proper configuration of module parameters β€” don't worry, it's documented below. FIR drivers let you use higher baud rates, generally up to 4Mbps ✨. In general though, Linux FIR support is not as stable and mature as we'd want, due to lack of time and documentation. It's giving "we tried our best", ngl.

irattach must be run as root or installed setuid root, because it requires root privileges. Full stop. If you compiled the IrDA stack as modules (which is the recommended way btw), then you'll need to edit the /etc/modules.conf file. See the Infrared-HOWTO for the deets.


πŸ’… OPTIONS πŸ’…

  • <dev> β€” this is the name of a TTY, an IrDA interface or an IrDA driver. irattach decides whether to use the irtty driver or one of the FIR drivers based on this argument. Three flavours, three vibes:
    • TTY name β€” this is the serial port to be configured using the irtty driver, such as /dev/ttyS0. irattach will use the irtty driver, so only SIR will be available. You need to check your serial configuration or BIOS to figure out which serial port is the IrDA port that needs to be passed to irattach.
    • interface name β€” this is the device name of an IrDA interface, such as irda0. irattach will use one of the FIR drivers (USB dongle drivers included). The selected FIR driver must be loaded prior to the call to irattach, or the proper alias for the device name must be set in /etc/modules.conf.
    • module name β€” this is the name of an FIR driver module, such as nsc-ircc (see the list below). All new IrDA interfaces created after loading the module will be configured, so this won't work if the module is already loaded. Heads up: this feature is still experimental πŸ§ͺ.
  • -s β€” starts discovery of remote IrDA devices. (note that the form "-s 1" is no longer supported, bestie, we moved on)
  • -v β€” shows version information. (this happens when no option is given, too, so it's the default vibe)
  • -h β€” shows help information.
  • -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 (the normal 9-pin serial port connector). These devices are called dongles, and they can currently be used by any SIR driver (IrTTY or irport). > This option is not compatible with FIR drivers, and only works with the irtty and irport drivers. Don't try it with FIR, it's not that girl.

The currently known (serial) dongles are:

  • esi β€” Extended Systems JetEye PC ESI-9680
  • tekram β€” Tekram IrMate IR-210B dongle
  • actisys β€” ACTiSYS IR-220L dongle
  • actisys+ β€” ACTiSYS IR-220L+ dongle
  • girbil β€” Greenwich GIrBIL dongle
  • litelink β€” Parallax LiteLink dongle & Extended Systems JetEye PC ESI-9680B
  • airport β€” N.N.
  • old_belkin β€” Belkin (old) SmartBeam dongle or any dongle only capable of 9600 bauds
  • ep7211 β€” IR port driver for the Cirrus Logic EP7211 processor (ARM based)
  • mcp2120 β€” Dongles based on the MCP2120 (Microchip)
  • act200l β€” ACTiSYS Ir-200L dongles
  • ma600 β€” Mobile Action ma600 dongles
  • toim3232 β€” Vishay/Temic TOIM3232 and TOIM4232 based dongles

πŸ”₯ FIR DRIVER MODULES πŸ”₯

If you're one of the lucky people who has a FIR chipset or USB dongle supported by one of the Linux-IrDA drivers, you can use irattach with the interface name of the IrDA port you want to configure. You'll need to configure /etc/conf.modules appropriately, with at least an alias of irda0 to the driver name, or just load the driver manually beforehand. Either way works, do you boo.

You don't strictly need to use irattach with FIR drivers β€” you could use modprobe to load the driver, ifconfig to bring up the interface, and set the various sysctl by hand. But irattach offers a convenient way to do it, so like… why would you 😭.

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 that doesn't help, the Infrared-HOWTO shows other means to retrieve this data.

Also, you often need to configure the Linux-serial driver to ignore the IrDA port, otherwise both drivers will conflict. This can usually be done with setserial /dev/ttySx uart none. (yes, remember this one, it comes back later πŸ‘€)

The currently known FIR drivers are:

  • ali-ircc β€” ALi FIR Controller Driver for ALi M5123 (options: io, irq, dma). This driver supports SIR, MIR and FIR (4Mbps) speeds. This chipset is used by e.g.:

The ALi M5123 FIR Controller is embedded in ALi M1543C, M1535, M1535D, M1535+, M1535D South Bridge.

  • irda-usb β€” IrDA-USB device driver, for USB devices/dongles that comply with the official IrDA-USB class specification. Note: USB 2.0 is not yet tested. (options: qos_mtt_bits int, description "Minimum Turn Time"). This is used, for e.g.:

ACTiSYS ACT-IR2000U

KC Technology KC-180

Extended Systems XTNDAccess ESI-9685

Note that there is another USB driver for those devices called ir-usb which is NOT compatible with the IrDA stack and conflicts with irda-usb. Because it always loads first, you have to remove ir-usb completely. bye βœ‹

Devices based on the SigmaTel chip are not not compliant with the IrDA-USB class specification and therefore not supported by this driver. (yes the original says "not not", we keep it, it's iconic πŸ’€)

  • nsc-ircc β€” NSC IrDA device driver (options: io, irq, dma, dongle_id, qos_mtt_bits). This chipset is used by e.g.:

IBM ThinkPad dongle_id=0x09

HP OmniBook 6000 dongle_id=0x08

  • sa1100_ir β€” Infrared driver for devices based on the StrongARM SA1100 embedded microprocessor (options: power_level, tx_lpm). This driver may support FIR on devices that can do it. This chipset is used by e.g.:

Samsung YOPY, COMPAQ iPAQ, SHARP Zaurus SL5000/5500

  • smc-ircc β€” SMC IrCC controller driver (options: ircc_dma, ircc_irq). This chipset is used by e.g.:

Fujitsu-Siemens Lifebook 635t Sony PCG-505TX

  • w83977af_ir β€” Winbond W83977AF IrDA device driver (options: io, irq, qos_mtt_bits). This chipset is used by e.g.:

Corel NetWinder

  • toshoboe β€” Toshiba OBOE IrDA device driver, supports Toshiba Type-O IR chipset. (options: max_baud). This chipset is used by e.g.:

Toshiba Libretto 100CT., and many more old Toshiba laptops.

  • donauboe β€” is a new version of toshoboe and has better FIR support and compability with the Donauoboe chip http://libxg.free.fr/lib-irda.html (options: ..). This chipset is used by e.g.:

Toshiba Libretto 100CT., Tecra 8100, Portege 7020 and many more Toshiba laptops.

  • vlsi_ir β€” VLSI 82C147 SIR/MIR/FIR device driver. This chipset is used by e.g.:

HP Omnibook 800

(options: ..).

  • clksrc int, description "clock input source selection"
  • ringsize int array (min = 1, max = 2), description "tx, rx ring descriptor size"
  • sirpulse int, description "sir pulse width tuning"
  • mtt_bits int, description "IrLAP bitfield representing min-turn-time"

πŸ¦‹ EXAMPLES πŸ¦‹

Attach the IrDA stack to the second serial port (integrated IrDA port using serial emulation) and start discovery:

  • irattach /dev/ttyS1 -s

Attach the IrDA stack to the first serial port where you have an external ACTiSYS serial dongle and start discovery:

  • irattach /dev/ttyS0 -d actisys+ -s

Attach the IrDA stack to the first IrDA-USB dongle and start discovery:

  • modprobe irda-usb ; irattach irda0 -s

Attach the IrDA stack to the NSC FIR (4Mbps) device driver on a Thinkpad laptop:

  • modprobe nsc-ircc dongle_id=0x9 ; irattach irda0 -s.

Attach the IrDA stack to the NSC FIR (4Mbps) device driver on a Thinkpad laptop:

  • irattach irda0 -s.

This assume that you have added the following entries to /etc/conf.modules:

options nsc-ircc dongle_id=0x09

alias irda0 nsc-ircc

πŸ“ CAVEATS πŸ“

The following hints are a very short introduction into the configuration of Linux/IrDA. If this doesn't help, read the Linux/IrDA-Tutorial and/or the Infrared-HOWTO. Before configuring Linux/IrDA, make sure whether you want to configure SIR or FIR. It's recommended to try SIR first, unless your device is not compatible with SIR (for example USB dongles). SIR first, always, it's the safe queen πŸ‘‘.

To get the SIR "serial" device, have a look into the BIOS. Then run dmesg | grep tty to get a survey of tty devices supported by your machine. Now try to choose the one which is probably the IrDA device, and use irattach /dev/ttySx -s.

If you don't succeed with SIR (which seems a rare case) you may try FIR. First look up the BIOS. Then run findchip to get information about the IrDA controller chip. Use setserial /dev/ttySx uart none to avoid conflicts with the serial driver. > Note: don't use setserial if you configure SIR. Now you may use irattach.

Finally irdadump should show at least your computer itself. If it doesn't, start at the beginning. no skipping, bestie.

This man page deals only with the low level of the IrDA stack (IrDA ports and IrDA drivers). After this step is done, you usually need to set up your favorite application to access the high level IrDA stack (via IrCOMM, IrLPT, IrNET, IrLAN or IrSOCK), which is documented elsewhere.

This man page doesn't document the usage of the irport driver. The irport driver supports the same hardware as the irtty driver, but is configured like a FIR driver. (so like, same hardware, different setup energy ✨)


😭 DIAGNOSTICS 😭

This section currently contains the raw error messages from source code only. (fr fr, no extra context, just the receipts)

  • "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"

πŸ’€ BUGS πŸ’€

N.N.


πŸ‘€ SEE ALSO πŸ‘€

ok so if you wanna keep the rabbit hole going (and bestie, you know you do), go peek at these:


and like, the actual sources, the lore, the ✨canon✨:

obsessed with a project that just links you to four other websites tbh. very "the real manual was the friends we made along the way" energy. 🌸


🫢 AUTHOR 🫢

This manual page is written by Werner Heuser <wehe@tuxmobil.org>. It's based on the READMEs from irda-utils by the Linux/IrDA Project and the Linux/IrDA-Tutorial. Then Jean Tourrilhes <jt@hpl.hp.com> came through and updated and modified it. ✨

like okayyy two-author collab, we love a shared credit moment πŸ’…


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.

no invariant sections, no front-cover texts, no back-cover texts. she said keep it clean bestie πŸŽ€


and that's the whole page, you made it, congrats, main character behaviour fr fr πŸ‘‘

this absolute icon of a manpage is from IRATTACH(8), dated 03 July 2006 β€” yes bestie, 2006, it's giving vintage, it's giving heritage, it's giving "still works though". go touch some infrared. πŸ¦‹

πŸ“¦ where this page comes from