Difference between revisions of "IrDA"

From ThinkWiki
Jump to: navigation, search
(Supported Models)
(Supported Models)
Line 87: Line 87:
 
'''IrDA 1.0 (SIR - 115Kbps)'''
 
'''IrDA 1.0 (SIR - 115Kbps)'''
 
* {{365C}}, {{365CD}}, {{365CS}}, {{365CSD}}, {{365E}}, {{365ED}}, {{365X}}, {{365XD}}
 
* {{365C}}, {{365CD}}, {{365CS}}, {{365CSD}}, {{365E}}, {{365ED}}, {{365X}}, {{365XD}}
 +
* {{535}}, {{535E}}
 
* {{560}}
 
* {{560}}
 
* {{755CD}}, {{755CDV}}, {{755CE}}, {{755CSE}}, {{755CV}}, {{755CX}}
 
* {{755CD}}, {{755CDV}}, {{755CE}}, {{755CSE}}, {{755CV}}, {{755CX}}

Revision as of 13:07, 23 January 2006

ThinkPad IrDA configuration

IrDA can be used to communicate using Infrared to other IrDA compliant devices, such as other Notebooks, PDAs and mobile phones.

All IBM ThinkPads manufactured in the last years have integrated IrDA that can be used in one of two modes, SIR or FIR. Some very old ThinkPads only support SIR mode, or might not have IrDA support at all. A newer VFIR standard exists, which supports speeds upto 16Mbps. However for the moment no ThinkPads support this.

The purpose of this document is to get the IrDA hardware in your ThinkPad operational, setting up communication to other devices is not covered. However, the external links section can prove useful for this.

Serial IR (SIR)

SIR is limited to serial datarates up to 115.2Kb/s

Linux 2.4 kernel config

Edit /etc/modules.conf and add the following lines

  alias tty-ldisc-11 irtty
  alias char-major-161 ircomm-tty

Linux 2.6 kernel config

Edit /etc/modprobe.conf and add the following lines

  alias tty-ldisc-11 irtty-sir
  alias char-major-161 ircomm-tty

Fast IR (FIR)

FIR is the preferred mode of IrDA operation and operates at a bandwidth of 4 Mbps

BIOS settings

Main problem here is that the chips FIR mode needs to be activated. On most ThinkPads, the easiest way to activate FIR mode is by entering BIOS setup during boot-up by pressing F1 when prompted. Then, selecting 'Config' followed by 'Infrared' will allow you to control the IrDA operation. Here you will need to select the option to Enable the infra-red port, and ensure the proper resources are set (typically: IO 0x2f8 and IRQ 3). Be sure to save the changes, and then Exit.

Note: Changing these BIOS settings does not affect Windows 2000 or XP operating systems, but may cause resource issues in older windows versions, or other legacy operating systems.

PnP settings from Linux

If changing the BIOS setting is not an option or if the settings cannot be altered, as on some older ThinkPads, the FIR mode can be activated from Linux with one of the following (this needs to be done on every boot):

  • setpnp as part of the old pcmcia-utils source package
  • tpctl, but only for some old ThinkPads

setpnp requires a kernel with pnp-bios support compiled in, which the Red Hat and Fedora kernels lack.

ISA PnP patch

2.6 kernel ISA PnP Patches exist for the nsc-ircc driver, that allow the loading of the driver without the BIOS, setpnp or tpctl hacks.
You will still have to call setserial and set the dongle_id parameter, as shown below.

This patch seems necessary in some cases (e.g., ThinkPad T43 and kernel 2.6.14.2).

Linux 2.4 kernel config

Edit /etc/modules.conf and add the following lines

      alias irda0 nsc-ircc
      options nsc-ircc dongle_id=0x09 io=0x2f8 irq=3
      pre-install nsc-ircc setserial /dev/ttyS1 uart none port 0 irq 0

Linux 2.6 kernel config

Edit /etc/modprobe.conf and add the following lines

      alias irda0 nsc-ircc
      options nsc-ircc dongle_id=0x09 io=0x2f8 irq=3
      install nsc-ircc /bin/setserial /dev/ttyS1 uart none port 0 irq 0; /sbin/modprobe --ignore-install nsc-ircc

Known problems

  • If the FIR mode is not activated, attempts to load the nsc-ircc module will result in an error in syslog of "Wrong chip version ff".
  • After suspend the nsc-ircc module needs to be manually reloaded
  • Module reloading does not work for me after a suspend. The IrDA port has to be actived.
rmmod nsc_ircc
echo disable > /sys/devices/pnp0/00\:0d/resources
echo activate > /sys/devices/pnp0/00\:0d/resources
modprobe nsc_ircc

The value pnp0/00\:0d can vary - look for a resources file containing the appropriate irq/dma/io values, e.g., using # grep 0x2f8 /sys/devices/pnp*/*/resources .

Some other things you might want to do with IrDA

  • add fast PPP support:
# modprobe irnet
  • if needed, limit further the size of the transmit window
# echo 1 > /proc/sys/net/irda/max_tx_window

External links

Supported Models

IrDA 1.0 (SIR - 115Kbps)

IrDA 1.1 (FIR - 4Mbps)