显示标签为“IrDA”的博文。显示所有博文
显示标签为“IrDA”的博文。显示所有博文

2007年1月29日星期一

IrDA器件及其应用电路设计

IrDA器件及其应用电路设计
文章作者:上海豪威IC设计有限公司 怯肇乾
文章类型:设计应用 文章加入时间:2004年9月12日23:31
文章出处:单片机及嵌入式系统应用



摘要:简要介绍IrDA红外数据传输的特征;详细说明各种常见IrDA类型器件的构成;重点阐述常用红外数据传输电路的设计及其注意事项。

关键词:红外数据传输 红外检测 IrDA 编/解码 调制/解调

引 言

红外数据传输,成本低廉、连接方便、简单易用、结构紧凑,在小型移动设备中得到了广泛的应用。近年来,很多著名半导体厂商,如Agilent、Vishay、Sharp、Zilog、Omron等,相继推出了许多遵循同一规范的不同类型的器件。本文就IrDA红外数据传输、各种IrDA器件的构成及其不同类型的红外通信电路设计进行综合阐述。

1 红外数据传输及其规范简介

  红外数据传输,使用传播介质——红外线。红外线是波长在750nm~1mm之间的电磁波,是人眼看不到的光线。红外数据传输一般采用红外波段内的近红外线,波长在0.75μm~25μm之间。红外数据协会成立后,为保证不同厂商的红外产品能获得最佳的通信效果,限定所用红外波长在850nm~900nm。

  IrDA是国际红外数据协会的英文缩写,IrDA相继制定了很多红外通信协议,有侧重于传输速率方面的,有侧重于低功耗方面的, 也有二者兼顾的。IrDA1.0协议基于异步收发器UART,最高通信速率在115.2kbps,简称SIR(Serial Infrared,串行红外协议),采用3/16 ENDEC编/解码机制。 IrDA1.1协议提高通信速率到4Mbps,简称FIR(Fast Infrared,快速红外协议),采用4PPM (Pulse Position Modulation,脉冲相位调制)编译码机制, 同时在低速时保留1.0协议规定。之后,IrDA又推出了最高通信速率在16Mbps的协议,简称VFIR(Very Fast Infrared,特速红外协议)。

  IrDA标准包括三个基本的规范和协议:红外物理层连接规范IrPHY(Infrared Physical Layer Link Specification),红外连接访问协议IrLAP (Infrared Link Access Protocol) 和红外连接管理协议IrLMP(Infrared Link Management Protocol)。IrPHY规范制定了红外通信硬件设计上的目标和要求;IrLAP和IrLMP为两个软件层,负责对连接进行设置、管理和维护。在IrLAP和IrLMP基础上,针对一些特定的红外通信应用领域,IrDA还陆续发布了一些更高级别的红外协议,如TinyTP、IrOBEX、IrCOMM、IrLAN、IrTran-P等等。[1~3]

  红外传输距离在几cm到几十m,发射角度通常在0~15°,发射强度与接收灵敏度因不同器件不同应用设计而强弱不一。使用时只能以半双工方式进行红外通信。

  在此把符合IrDA红外通信协议的器件称为IrDA器件,符合SIR协议的器件称为SIR器件,符合FIR协议的器件称为FIR器件,符合VFIR协议的器件称为VFIR器件。

2 红外数据传输的基本模型

红外数据传输可用图1简单表示。

3 IrDA器件的类型划分[3~8]

  根据图1所述模型,把IrDA器件划分类型,如图2所示。

  根据传输速率的大小,可以把IrDA器件区分为SIR、FIR、VFIR类型。如Vishay的红外收发器,TFDU4300是SIR器件,TFDU6102是FIR器件,TFDU8108是VFIR器件。

  根据应用功耗的大小,可以把IrDA器件区分为标准型和低功耗型。低功耗型器件,通常使用1.8~3.6V电源,传输距离较小(约20cm),如Agilent的红外收发器HSDL-3203。标准型器件,通常使用DC5V电源,传输距离大(在30cm~几十m),如Vishay的红外接收器TSOP12xx系列,配合其发射器TSAL5100,传输距离可达35m。

  使用上述三种分类方法,可以清晰地表明一个IrDA红外器件的性能。如Agilent的SIR标准型红外收发器HSDL-3000。

4 IrDA器件的构成及其使用[3~8]

4.1 红外发送器件

  红外发送器大多是使用Ga、As等材料制成的红外发射二极管,其能够通过的LED电流越大,发射角度越小,产生的发射强度就越大;发射强度越大,红外传输距离就越远,传输距离正比于发射强度的平方根。有少数厂商的红外发送器件内置有驱动电路。该类器件的构成如图3所示。

  红外发送器件在使用时通常需要串联电阻,用以分压限流。

4.2 红外检测器件

  红外检测器件的主要部件是红外敏感接收管件,有独立接收管构成器件的,有内含放大器的,有集成放大器与解调器的。后面两种类型的红外检测器件构成如图4所示。

  接收灵敏度是衡量红检测器件的主要性能指标,接收灵敏度越高,传输距离越远,误码率越低。

  内部集成有放大与解调功能的红外检测器件通常还含有带通滤波器,这类器件常用于固定载波频率(如40kHz)的应用。

4.3 红外收发器件

  红外收发器件集发射与接收于一体。通常,器件的发射部分含有驱动器,接收部分含有放大器,并且内部集成有关断控制逻辑。关断控制逻辑在发送时关断接收,以避免引入干扰;不使用红外传输时,该控制逻辑通过SD引脚接受指令,关断器件电源供应,以降耗节能。使用器件时需要在LED引脚接入适当的限流电阻。大多数红外收发器件带有屏蔽层。该层不要直接接地,可以通过串联一磁珠再接地,以引入干扰影响接收灵敏度。红外收发器件的构成如图5所示。

4.4 红外编/解码器件

  编/解码,英文简称ENDEC,即实现调制/解调。编/解码机制,SIR器件多采用3/16 ENDEC,FIR器件多采用4PPM ENDEC。在此解释一下3/16 ENDEC,其它可参阅有关资料。3/16 ENDEC,即把一个有效数字位(bit)时间段,划分为16等分小时间段,以连续3个小时间段内有无脉冲表示调制/解调信息。红外编/解码器件,需要从外部接入时钟或使用自身的晶体振荡电路,进行调制或解调。

  红外编/解码器件,有单独编码的集成器件,如键盘遥控红外编码器Mitsubishi的M50462AP;也有集编码/解码于一体的,这类器件较为多见,其构成如图6所示。

4.5 红外接口器件

  红外接口器件,实现红外传输系统与微控制器、PC机或网络系统的连接。设计中经常使用的器件有UART串行异步收发器件、USB接口转换器件等。

  USB接口器件,实现红外收发与PC机的USB连接。集成度较高的USB接口器件如SigmaTel的STIr4200。STIr4200全兼容IrDA1.3和USB1.1,IrDA速率在2.4k~4Mbps,内含有红外编/解码器和4KB的FIFO缓存,20/28脚封装,可直接相联标准的IrDA收发器件,其构成如图7所示。

5 常用红外数据传输电路设计[3~9]

5.1 家电红外遥控收发电路的设计

  彩电、空调、VCD等家用电器的遥控收发,是单向传输,通信距离通常在3~5m,调制/解调的载波频率通常在36~40kHz,可用"集成键盘编码IC+带驱动的红外发射管"构成发射遥控器,用"带放大与解调功能的红外检测器"构成接收端,接收后的信息可直接送给简易单片机(如AT89C2051),由单片机通过软件进行遥控功能识别并产生相应动作。

  图8是一个通用的家电遥控收发电路框图。

5.2 PC机简易红外收发装置设计

  现在的笔记本电脑、掌上电脑、移动手机等,常常集成有含编/解码功能(38kHz载波)的5针红外接口;可以很容易地设计电路,给PC机配上红外收发装置,无须考虑调制/解调。

  5针红外接口插座引脚定义了:一对电源脚Vcc和GND,一对收发接口IrTx(红外发射端)和IrRx(红外接收端),有一针NC未定义。

  根据IrDA异步串行通信有关标准,IrTx引脚能提供 >6.0mA的输出电流,IrRx引脚在吸收<1.5>)所示的简易红外收发装置。为进一步提高收发传输能力,可在发射端增加驱动,在接收端增加放大。这样做,分立元件过多,电路不够简洁。为简化电路,可以使用带有驱动和放大能力的红外收发器件。图9(b)就是用Zilog的红外收发器ZHX1010构成的简易收发装置。

  给PC机加上红外收发装置后,需要对系统做如下设置:在BIOS中打开红外线接口,在使用时于设备管理器中启动"红外线监视器"。通常,PC机红外接口与其COM2口共用同一地址和中断,打开了红外接口,COM2口就不能再使用了。

5.3 RS232-IrDA红外收发电路设计

  这种类型电路工作在异步串行通信方式下,可以直接采用"UART电平转换器件 + 红外编/解码器件 + 红外收发器件"构成。图10是一个设计举例,图中器件使用了Maxim的MAX232。MAX232完成RS232信号电平到标准数字信号电平(如5V系统)的转换,HSDL-7000是红外编/解码器。

5.4 USB-IrDA红外收发电路设计

  设计这种类型的电路,最简捷的途经就是使用USB-IrDA接口器件。图11是采用SigmaTel的STIr4200接口器件的一个设计举例。STIr4200有一个可选择的外部增强性发射端口,如果要增强红外传输能力(如传输距离),可在该端口增加发射管。对于STIr4200,SigamTel提供有各种Windows版本的驱动程序,使用十分方便。

5.5 微控制器-IrDA红外收发电路设计

  现在很多微控制器,内部集成有UART单元及其接口,支持IrDA标准,并可以直接与红外收发体系连接。图12是这类电路设计的一个举例。图中MCP2120是Microchip的红外可编程波特率编/解码器件。

  有些微控制器,如80C51单片机,虽然内含有UART,却不支持IrDA标准或高速通信,不能直接相连红外收发体系。还有些微控制器,虽然所含的UART可以直接连接红外收发体系,但UART已用于其它目的。此时,可以选用UART接口器件。图13是80C51通过Maxim的MAX3110连接红外收发体系的,80C51单片机没有SPI接口。这里使用其I/O口,通过软件模拟SPI工作机制。MAX3110有一个收发传输中断脚,十分有利于软件编制。

6 红外数据传输电路设计的注意事项

① 要做好红外器件的选型。要求传输快速时,可选择FIR、VFIR收发器与编/解码器。要求长距离传输时,可选择大LED电流、小发射角发射器和灵敏度高的接收检测器。低功耗场合应用时,可选取低功耗的红外器件。要注意低功耗与传输性能之间存在着矛盾:通常低功耗器件,传输距离很小。这一点在应用时应该综合考虑。

② 红外数据传输是半双工性质的。为避免自身产生的信号干扰自身,要确保发送时不接收,接收时不发送,可以着眼于软件设计,使软件在一种状态时暂不理会另一种状态;同时要合理设置好收发之间的时间间隔,不立即从一种方式转入另一种方式。

③ 要合理设计好各种红外器件的供电电路,选择适当的DC-DC器件,恰当地进行电磁抑制,做好电源滤波。同时还要注意尽可能减少功耗,不使用红外电路时要在软件上能够控制关闭其供电。很多厂家对自己推出的红外器件都有推荐的电路设计,要注意参考并实验。

④ PCB设计时,要合理布局器件。滤波电感、电容等要就近器件放置,以确保滤波效果;红外器件与系统的地线要分开布置,仅在一点相连;晶体等振荡器件要靠近所供器件,以减少辐射干扰。

⑤ 增大红外传输距离、提高收发灵敏度的方法:增加发射电路的数量,使几只发射管同时启动发送;在接收管前加装红色滤光片,以滤除其它光线的干扰;在接收管和发射管前面加凸透镜,提高其光线采集能力等等。

2007年1月28日星期日

Linux-IrDA quick tutorial

http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html

Linux-IrDA quick tutorial
IrNET
e-Squirt
Java-IrDA
Linux & Wireless LANs
Papers
Main page
Status & Patches
Links
Configuration
Checking
Applications
Debugging
Pitfalls

Linux-IrDA
The Linux IrDA project is an Open Source projects to develop an generic IrDA stack for Linux that has many contributors all over the world. I did contribute many bug fixes and enhancement to it since 1999 thanks to Hewlett Packard sponsoring my work. The list of patches is too long to put here ;-)
Let's face it, one of the main roadblock to the use of e-Squirt is getting the IrDA stack up and running, whatever the platform is. We had our share of horror stories on all the OSes involved.
When it come to Linux, I've been hacking the stack often enough to have a few words of advices. Here are a few instructions on how to get it working enough to be able to use e-Squirt or IrNET...
The instructions presented here should work for Linux Kernel 2.4.X and Kernel 2.6.X. And they may work equally well for later kernels and kernel 2.2.15, and maybe others. Some other documentations on the web, like the Linux-IrDA Howto are more generic and complete but not totally up to date, so beware...

Linux-IrDA current status

Willing or not, it seem that I'm the one responsible of making sure the Linux-IrDA stack work properly. Here is a quick status report...
The archive of the mailing list at SourceForge is erratic, some post disapear, which mean that I sometimes misses some e-mail. The new archive at Gmane may behave better. The archive for the old mailing list at pasta no longer exist (a shame).
It is my belief that all known issue regarding the IrDA stack are resolved (I'm not talking here about drivers and installation, which are know to be problematic). Don't prove me wrong ;-)
What's the latest version ? Things are always evolving, so I recommend to get a very recent kernel 2.6.X (like the latest one) and optionally apply some patches from this page (see below). Kernel 2.4.21 and later are also good choices. Versions prior to kernel 2.4.21 have various known bugs, therefore I don't even want to hear about those. And don't mention 2.2.X ;-)
The latest essential update of 2.4.X was in kernel 2.4.21, which fixed various race conditions and connection issues. Kernel 2.4.22 fixes some IrCOMM problems with chat, add workarounds for interoperability with buggy devices and fix a common memory leak. Note the the development of Linux-IrDA in 2.4.X is stopped, and I will no longer accept major patches for it.
The IrDA stack in 2.6.X contains a large number of fixes and improvement over what is available in 2.4.X, and this is where new development is happening, so you are welcome to try it. Usually later version are better. Some of the changes are non-trivial and require your testing, because I can't test all hardwares and configurations.
This is a short list of fixes available in 2.6.X and not in 2.4.X :
Non-modular compilation was fixed.
SMP locking was fixed, and many race condition were fixed.
Internal database (HashBin) use was made safer, especially with the IAS database.
Many SKB memory leaks and were fixed.
/proc filesystem was fixed.
SIR frame wrapping was CPU optimised.
Performance at SIR was dramatically improved.
IrTTY driver was rewritten to work with the new serial driver, along with new dongle drivers. Dongle driver have been simplified, and dongle driver removal is much safer.
VIA driver was added.
SMC driver was rewritten.
IrPORT driver was fixed.
NSC driver add support for PC8739x chipset and speed change fixes.
VLSI and IrDA-USB driver were improved.
New SigmaTel stir4200 USB driver.
This is a short list of things that need to be fixed in 2.6.X :
Test and finish fixing new SMC driver
Get rid of internal use of driver ioctls
My changes to IrTTP and the addition of the Socket scheduler in 2.4.21 are pretty big changes. I've tested those changes and measured the performance with irtty+actisys and the performance with nsc-ircc. You can see that unidirectional small packet performance has increased by a factor 3 at 4Mb/s. Also, the maximum number of Tx buffers queued in the IrDA stack decreased from 21 to 10, which improves latency. Lastly, it seems that the TTY layer is becoming a bottleneck.
The fixes for the dynamic window pf bit marking and the f-timer expiry calculation in 2.6.2 were smaller changes but fixed the remaining protocol performance bottlenecks. I've tested those changes and measured the performance with irtty+actisys. You can see a performance increase of up to 40% for large packets at SIR, and overall make performance more predictable and even (no more pathologic cases for some packet sizes).
The new irtty-sir driver in kernel 2.6.X replace the old irtty driver. It fixes some architectural issue in the interaction with the serial driver. The downside is that all dongle drivers need to be updated to the new dongle infrastructure. Martin has documented that.
irda-utils 0.9.15 is out. Don't use anything older than that. I don't want to look at bug reports using old irdadump, because they don't show some common problems, I really want irdadump 0.9.15 or later. New version of irda-utils :
irda-utils-0.9.15 : add new dongles drivers, new irdadump formating options, fix irdadump TTP and IrCOMM decoding, add LAP QoS decoding, fix irattach error detection, and add new socket samples. With this version, you can't use the incorrect form irattach irda0 -s 1 any longer, you must use irattach irda0 -s instead.
irda-utils-0.9.16 : fixes a few irdadump bugs and allow to disable irdadump parsing, fix a bug with irattach over usb-serial, adds irnetd, and improve man pages.
irda-utils-0.9.17-pre5 : add libpcap raw capture support to irdadump (read/write), add patch for IrDA support in Ethereal.
Linux-IrDA patches included in 2.4.20-pre2 :
Max-Tx sysctl : Fix a contradiction in IrDA spec regarding max frame size, necessary for FIR operation using IrComm or some socket applications.
IrNET disconnect fix : Fix IrNET to re-enable passive mode and retries (bug added in latest kernel patches).
Very important fixes : fix a race condition in IrLAP, fix "unkillable" application in IrSock, and fix transmit before ready in ircomm.
Discovery fixes : ignore passive discoveries in IrComm and IrLAN (to avoid simultaneous connections, mostly useful as server) and force log expiry on LAP disconnect.
NSC OB6100 : Enable the nsc-ircc driver to recognise the FIR chip on the HP OmniBook 6100. Contributed by Kevin Thayer.
irtty stat fixes : increment irtty tx counter at the right time. Contributed by Frank Becker.
USB disconnect fixes : fix race conditions in USB disconnect code. Allow you to unplug the dongle even with heavy transfer going on.
Discovery expiry fix : Make discovery expiry work properly for non default discovery period/timeout.
MCP2120 driver, ActiSys 200L and MA600 driver for 2.4.X : MCP2120 dongle driver contributed by Felix Tang, ActiSys 200L dongle driver contributed by Shimizu Takuja (patch from Gerhard Bertelsmann) and MA600 dongle driver contributed by Leung.
Linux-IrDA patches included in 2.4.21-pre3 :
Socket scheduler : add socket packet scheduler for fairness between socket, add LAP flow control to minimse LAP Tx buffer queue (10 => 2). Need IrTTP fixes.
IrTTP big fixes : fix 3 race conditions (start timer, give credit, flow ind), fix Rx queue flow control (could become infinite), protect Rx credit update, fix TTP flow control, implement packet scheduler, reduce Tx queue max size (11 => 8), reduce latency (by skipping timer), optimise threshold and flow parameters. Need socket scheduler. This seem to have fixed my all my IrNET Oopses and weirdness...
Fix dongle autoloading : avoid loading dongle modules with irq disabled in irtty.
Minor fixes : Always close LAP on LSAP closure, disable LAP timer on accept socket, and header fix for Alpha (by Felix Tang).
Simultaneous IrNET race : fix race condition when the two peer simultaneously create an IrNET connection to each other (thanks to Martin Diehl for reporting this race). As opposed to the IrCOMM/IrLAN discovery workaround, this fixes the race properly and cleanly.
SMC small fixes : Fix SMC driver removal code and various messages. Patch from Jeff Snyder.
Donauboe driver : new driver for Toshiba IrDA chip. Patch from Christian Gennerat & Martin Lucina. Updated version.
Four small bugs in /proc : fix four cases where interrupts would not be re-enabled on failure. Found by the Stanford checker.
Linux-IrDA patches included in 2.4.22-pre2 :
Fixes chat over IrCOMM problem : workaround a bug in the kernel (TTY layer) triggered by chat brokeness by accepting data before IrCOMM is initialised. Also remove the IrCOMM-IAS entry to accept multiple incomming connections.
Handle invalid QoS parameter : handle better case where the peer feed us invalid or oversized parameters. Also add various warning so that users knows when the IrDA peer is buggy (and doesn't start blaming Linux-IrDA). Also add a new sysctl, max_tx_window.
LMP timer race condition : fix a race condition when starting the IrLMP watchdog timer, and improve the debugging messages.
Export CRC-16 routine : export to drivers the routine doing CRC calculations. Original patch from Martin Diehl.
Fix secondary nack code : fix the secondary function to send RR and frames without the poll bit when it detect packet losses.
IrIAP SKB leak : fix an obvious SKB leak in IrIAP. This is only a localised fix, and the same fix need to be applied to all Linux-IrDA state machines. Original patch from Jan Kiszka.
USB driver cleanup : Handle properly failure of URB with new speed settings, fix endianess and various other cleanups.
caddr fix : ignore the C/R bit in the LAP connection address. Patch from Jan Kiszka.
static driver fix : fix some obvious static init bugs.
Linux-IrDA patches included in 2.4.25-pre6 :
NSC '39x support : Add support for NSC PC8739x chipset, such as found in IBM R31/A30/A31 laptops. Original patch from Jan Frey.
VIA FIR driver : driver for the IrDA module of some VIA chipsets. Written by Frank Liu (VIA).
Experimental Linux-IrDA patches for 2.4.22 and later :
Dynamic window fixes (2.4.X) : fix the dynamic window code to properly send the pf bit - patch for 2.4.22 kernel (already in 2.5.67).
Dynamic window fixes (2.4.X) : fix the dynamic window code to properly send the pf bit - patch for 2.4.23+ kernel (already in 2.5.67).
F-timer expiry fix : Fix F-timer timeout calculation - patch for 2.4.23+ kernel.
Other Linux-IrDA patches included in 2.5.13 :
Fix races waiting for events : use proper logic to wait for events instead of obsoleted kernel calls, to avoid race conditions. Most of those races were theoretical or had workaround. Original patch from Martin Diehl.
IrCOMM export rules for 2.5.X : Add proper export rules to IrCOMM modules to make it work properly in kernel 2.5.10 and later. Patch from Kai Germaschews.
Other Linux-IrDA patches included in 2.5.16 :
set_bit fixes : change all arguments of set_long to "unsigned long". Patch from Paul Mackerras.
LSAP cache fix : replace the global LSAP cache with LSAP caches private to each LAP. Fix a bug where two simultaneous connections from two devices using the same LSAPs would get mixed up. Should also improve performance in similar cases. Patch from Christoph Bartelmus.
Other Linux-IrDA patches included in 2.5.24 :
USB driver cleanup : Handle properly failure of URB with new speed settings, and various other cleanups.
Init & Headers cleanup for 2.5.X : Cleanup the header includes (should speed up dependancies & compile) and module init (should enable static compiles). new version for 2.5.22 (use "patch -l" if needed).
LSAP cache and socket receive fixes : fix one instance were we forgot to clear LSAP cache, and fix a bogus conversion to wait_event() where the socket closure would never propagate to the app waiting on a socket. This fixes bugs introduced in 2.5.13 and 2.5.16. Also reserve enough skb header space in IrSOCK so that drivers don't complain. new version for 2.5.22 (use "patch -l" if needed).
Other Linux-IrDA patches included in 2.5.39 :
HashBins fixes : fix kernel crash after removal of IAS object or IAS attribute with duplicated name, simplify LMP registration to avoid using random generator in static init, and make all hashbin uses 64 bit safe.
Unique LAP address : Make sure LAP address is sane, which mean not NULL, not BROADCAST and not already in use by another link.
NSC speed fix : try to fix the NSC driver so that it changes speed back to 9600 properly. Aggregate of both original patches.
Hashbin locking fixes : Fix locking for 2.5.32. Final patch. Apply after two first patches above.
IrCOMM/IrLAN locking fixes : Fix locking for 2.5.32. Final patch. Apply after locking hashbin fixes.
Driver locking fixes : Fix locking for 2.5.32. Final patch. Apply after locking hashbin fixes & nsc speed patch.
ALI locking fixes : Fix locking for 2.5.32. Final patch. Apply after locking hashbin fixes.
Other Linux-IrDA patches included in 2.5.42 :
VLSI driver v0.4 : major update of the VLSI driver. Patch from Martin Diehl.
Donauboe driver : new driver for Toshiba IrDA chip. Patch from Christian Gennerat & Martin Lucina. Updated version.
Export CRC-16 routine : export to drivers the routine doing CRC calculations. Original patch from Martin Diehl.
Fixes chat over IrCOMM problem : workaround a bug in the kernel (TTY layer) triggered by chat brokeness by accepting data before IrCOMM is initialised. Also remove the IrCOMM-IAS entry to accept multiple incomming connections.
Handle invalid QoS parameter : handle better case where the peer feed us invalid or oversized parameters. Also add various warning so that users knows when the IrDA peer is buggy (and doesn't start blaming Linux-IrDA). Also add a new sysctl, max_tx_window. new patch, complete fix.
LMP timer race condition : fix a race condition when starting the IrLMP watchdog timer, and improve the debugging messages.
Other Linux-IrDA patches included in 2.5.47 :
Fix packet type : migrate the IrDA stack to the multithreaded receive path of the networking stack and cleanup the packet type definition. This should fix an annoying warning on SMP.
Fix donauboe init : fix donauboe driver function names to avoid clashes with toshoboe driver.
New irtty driver (2.5.44) : new IrTTY driver to go with the new serial driver in 2.5.X. Original patch from Martin Diehl.
New irtty driver (2.5.45) : new IrTTY driver to go with the new serial driver in 2.5.X. Patch from Martin Diehl.
Linux-IrDA patches included in 2.5.61 :
IrDA driver module fixes : Use SET_MODULE_OWNER() in various IrDA drivers.
Partial rewrite of the SIR wrapper : optimise the SIR wrapper (stuff/unstuff bytes) for better performance. Will only decrease the CPU overhead, not the network overhead. Improved version. Also add the optional ZeroCopy-Rx mechanism for drivers that support it (like this experimental patch for sir-dev).
Fix secondary nack code : fix the secondary function to send RR and frames without the poll bit when it detect packet losses.
IrCOMM status line fix : fix status line initialisation in IrCOMM. Patch from Jan Kiszka.
IrIAP namespace cleanup : reduce namespace pollution in IrIAP. Patch from Arnd Bergmann.
IrQoS namespace cleanup : reduce namespace pollution in IrDA QoS. Patch from Arnd Bergmann.
Linux-IrDA patches included in 2.5.67 :
Discovery fixes and cleanup : fix the last locking problems in discovery and expiry, simplify, cleanup and optimise the discovery/expiry code (i.e. smaller and faster).
Dynamic window fixes : fix the dynamic window code to properly send the pf bit. Up to 40% improvement from large packets at SIR (i.e. most bulk transfer at SIR). Performance unchanged for FIR or small packet. More complete performance analysis later on.
IrDA-USB cleanups : cleanup the Rx path, the USB registration and others in the IrDA-USB driver.
Sir-dev ZeroCopy : Enable ZeroCopy Rx in irtty-sir (provided by the new SIR wrapper).
Minor timer optimisation : make IrDA timers use mod_timer (safer & faster).
IrNET update : Fix module refcounting and add hints to discovery.
Linux-IrDA patches included in 2.5.70 :
skb leak audit : Fix many real and potential skb (packet buffer) memory leaks in the IrDA stack. This patch is so good that over time the number of skb used decrease ;-) Thanks to Jan Kiszka for pointing out the issue.
IrNET context fix : fix IrNET locking to be compatible with PPP, fix a couple of crash in 2.5.67+.
caddr fix : ignore the C/R bit in the LAP connection address. Patch from Jan Kiszka.
sir_kthread comment : add comment to explain task state, new module stuff in irtty-sir.
irport fixes #3 : various fixes and optimisation for irport.
New SMSC driver #6 : new SMSC driver, this one works, even in FIR (but still need testing). Original patch from Daniele Peri. Improved version, for 2.5.69
trans_start fixes : minor fix in various drivers.
TTY API fix : Add an extra call to the TTY API so that irtty-sir can work again. Russell eventually implemented something similar.
Linux-IrDA patches included in 2.6.0-test1 :
IrDA-USB endian fixes : Trivial fix for irda-usb to make it work on big endian boxes (such as PPC). Original patch from Jacek Jakubowski. Add new USB device ID.
NSC '39x support : Add preliminary support for NSC PC8739x chipset, such as found in IBM R31/A30/A31 laptops. This patch needs more work. Original patch from Jan Frey.
Header cleanup : cleanup the header.
IrNET cast fix : remove pointer casting in IrNET debug code. Patch suggested by David S. Miller.
More skb leaks : fix two additional potential skb leaks in IrTTP. Found by the Stanford checker.
setup_dma fix : mark all drivers that need setup_dma() as requiring CONFIG_ISA. Mark new dongle driver as needing sir-dev.
Verify structs : verify the size of packed structures. Patch suggested by Russell King.
IrCOMM devfs fix : make sure that the devfs name for IrCOMM devices are not bogus. Original patch suggested by Martin Diehl.
sir-dev cleanup : various cleanups in irtty-sir and sir-dev drivers. Patch from Martin Diehl.
refrigerator support : support software suspend in irtty-sir. Patch from Neil Brown.
Linux-IrDA patches included in 2.6.0-test3 :
Donauboe probe : disable the probe in Donauboe driver by default and minor cleanups. Patch from Christian Gennerat.
irda-usb probe : minor fix to the probe failure path of irda-usb. Merge of patches from Oliver Neukum and Daniele Bellucci.
IrLAP retry count : add interoperability workaround for a bug in 2.4.X IrDA stacks : 2.4.X secondary forget to set pf bit when reaching window byte capacity without sending the max number of packets (ex: 115 kb/s, max packet size, window=7), and we would eventually close the connection. This bug was fixed in 2.5.67 (Dynamic window fixes).
VIA FIR driver : driver for the IrDA module of some VIA chipsets. Improved version. Written by Frank Liu (VIA).
tekram-sir driver fix : update tekram-sir to latest sir-dev changes. Patch from Martin Diehl.
vlsi driver update : update VLSI driver to version 0.5. Patch from Martin Diehl.
Linux-IrDA patches included in 2.6.0-test5 :
IrCOMM module fix : fix some comments.
NSC '39x fixes : Make support for NSC PC8739x chipset really work. Patch from Jan Frey.
irtty cleanup : Finish removing irtty driver from the kernel.
LAP close race fix : Fix a race condition when closing the LAP, prevent the stack to open new LSAPs while we are killing them.
Connect watchdog fix : Fix problem with the connect watchdog, where we would dup an invalid TSAP. May happen is a IrDA server is suspended.
Init cleanups : Fix various minor problems whith initialisation. Based on a patch from Guennadi Liakhovetski.
Module aliases : Add module aliases to dongle drivers. Patch from Rusty Russell.
Linux-IrDA patches included in 2.6.0-test10 :
IrCOMM might_sleep Oops : Don't do copy_from_user() under spinlock in ircomm_tty_write.
IrNET race Oops : Fix two rare race condition in IrNET, ppp unregister and status event.
af_irda skb leak : Fix a potential skb leak in error code of af-irda.
irlmp_open leak : Fix a potential leak in debug code of IrLMP.
Linux-IrDA patches included in 2.6.2-rc1 :
IrCOMM detach Opps : fix locking problems in IrCOMM.
F-timer expiry fix : F-timer is calculated from end of window, however we set it at start of window. Add the window transmision time to the timer setting. This increase performance for bidirectional large packets at SIR by 10%.
Sir-Dev locking : Fix sir-dev locking problems and make it compatible with irport. Patch from Martin Diehl.
Sir-Dev raw mode : Fix sir-dev raw mode support (necessary for some SIR dongles - ma600 and tekram). Patch from Martin Diehl.
IrCOMM module alias : add module alias for IrCOMM pseudo serial device. Patch from Martin Diehl.
IAS max string : fix a stupid compiler warning.
SMSC release region : fix a stupid cut'n'paste error.
Socket API cleanup : Convert IrDA sockets to unsigned length for send/recv msg. Patch from Stephen Hemminger.
TTY API fixes : Update IrCOMM to the new TTY API for tiocmget/tiocmset. Patch from Russell King.
More Socket API cleanup : Properly check return from memcpy_fromiovec and exit. Patch from Chris Wright.
Linux-IrDA patches included in 2.6.2-rc2 :
sir-dev update : change dongle api such that raw r/w and modem line helpers are directly called, not virtual callbacks. Patch from Martin Diehl.
actisys-sir update : convert to de-virtualized sirdev helpers. Patch from Martin Diehl.
esi-sir update : convert to de-virtualized sirdev helpers. Patch from Martin Diehl.
tekram-sir update : convert to de-virtualized sirdev helpers. Cleanup the tekram-sir dongle driver and make speed change faster. Patch from Martin Diehl.
litelink-sir driver : convert Parallax Litelink driver to the new irtty dongle API. Patch from Eugene Crosser. Convert to de-virtualized sirdev helpers. Patch from Martin Diehl.
act200l-sir driver : converted for new api from old driver. Patch from Martin Diehl.
act200l-sir driver : converted for new api from old driver. Patch from Martin Diehl.
girbil-sir driver : converted for new api from old driver. Patch from Martin Diehl.
ma600-sir driver : converted for new api from old driver. Patch from Martin Diehl.
mcp2120 driver : converted for new api from old driver. Patch from Martin Diehl.
old_belkin-sir driver : converted for new api from old driver. Patch from Martin Diehl.
Makefile update : include build information for new style dongle. Patch from Martin Diehl.
Linux-IrDA patches included in 2.6.3 :
Ultra sendto support : Don't require bind on ultra sockets, and prevent use of unbound sockets if no address given. Original patch from Stephen Hemminger.
Notifier cleanup : Remove unused IrDA device notify handler. Patch from Stephen Hemminger.
IrLAP disconnect race : Cancel IrLAP disconnect is a new connection request arrived before we had time to disconnect. Bug found by Christoph Bartelmus.
Shared IRQ for nsc-ircc : Return proper IRQ status in IRQ handler of nsc-ircc driver. Patch from Stephen Hemminger.
Shared IRQ for ali-ircc : Return proper IRQ status in IRQ handler of ali-ircc driver. Patch from Stephen Hemminger.
Shared IRQ for smsc-ircc2 : Return proper IRQ status in IRQ handler of smsc-ircc2 driver. Patch from Stephen Hemminger.
Shared IRQ for via-ircc : Return proper IRQ status in IRQ handler of via-ircc driver. Patch from Stephen Hemminger.
Shared IRQ for w83977af_ir : Return proper IRQ status in IRQ handler of w83977af_ir driver. Patch from Stephen Hemminger.
Linux-IrDA patches included in 2.6.4 :
Header cleanup : Remove obsolete smc-ircc.h header file (note : do the same with toshoboe.h). Patch from Stephen Hemminger.
Static for the w83977af_ir driver : Add the "static" qualifier to various private functions. Patch from Stephen Hemminger.
Static for the irtty-sir driver : Add the "static" qualifier to various private functions. Patch from Stephen Hemminger.
Static for the irport driver : Add the "static" qualifier to various private functions. Patch from Stephen Hemminger.
Static for the via_ircc driver : Add the "static" qualifier to various private functions. Patch from Stephen Hemminger.
Linux-IrDA patches included in 2.6.6 :
VLSI /proc update : Convert VLSI driver to use seq_file functions. Patch from Stephen Hemminger.
Donauboe crc fix : Make donauboe driver use the standard CRC table instead of its own. Patch from Stephen Hemminger.
RD:RSP fix : Fix handling of RD:RSP frames to properly retry them. Patch from Martin Diehl.
IrLAN print_ret optimisation : Move print_ret to minimise namespace polution and allow inlining. Patch from Stephen Hemminger.
IrLAN handle_filter rename : Rename handle_filter to minimise namespace polution. Patch from Stephen Hemminger.
IrLAN cleanup : Cleanup IrLAN module. Patch from Stephen Hemminger.
IrLAN race condition : Remove a potential race condition in IrLAN. Patch from Stephen Hemminger.
IrLAN flow control : Fix IrLAN flow control and other cleanup. Original patch from Stephen Hemminger.
Linux-IrDA patches included in 2.6.10-rc1 :
Fix LSAP allocation : Fix locking in error path in IrLMP, found by the Stanford checker. Don't reuse unconnected LSAPs, they belong to server sockets. Make sure the LSAP we are picking has just not been grabed. And wrap around the LSAP space properly.
NSC dongle-id check : Make sure the nsc-ircc don't Oops on invalid dongle-id. Original patch from Maik Broemme.
IrNET module alias : Add module alias for IrNET char dev.
IAS delete clarification : Clarify and make optional the destruction of an IAS object when the last attribute is removed.
Adaptive passive discovery : Adapt to the rate of the peer discovery and add some extra safety margin. Allow to interoperate properly with device performing slow discovery. Bug found by Nokia.
IrCOMM IAS restore : Restore properly the IAS object when IrCOMM gets disconnected. Allow "pppd passive persist" to work properly. Bug found by Jan Kiszka.
VIA speed change fixes : various changes to make the VIA driver really work on speed changes, and various other cleanups. Patch untested (port from 2.4.X). Original patch from Sancho Dauskard.
Fix module info : Fix the module parameter info for irda_debug. Patch from Stephen Hemminger.
stir4200 - no USB reset : Get rid of usb-reset on speed change because the Sigmatel 4200 doesn't accept the new address setting. Patch from Stephen Hemminger.
stir4200 - suspend fix : The suspend/resume code only needs to be compiled in if power management is enabled. Patch from Stephen Hemminger.
stir4200 - use netdev_priv : Use netdev_priv and various message cleanups. Patch from Stephen Hemminger.
Linux-IrDA patches included in 2.6.10 :
Fix via_ircc pci init code : Try to make the via-ircc driver usable again and comment on all the problem in the PCI init code. Suggested by Arkadiusz Miskiewicz.
stir4200 - use kill_urb() : Use usb_kill_urb() instead of usb_unlink_urb. Patch from Stephen Hemminger.
irda-usb - use kill_urb() : Use usb_kill_urb() instead of usb_unlink_urb plus other cleanups. Patch from Stephen Hemminger.
Linux-IrDA patches included in 2.6.12-rc1 :
IrNET poll fix : fix the poll method of IrNET so that it properly blocks if the initial discovery log is empty.
irda-usb sysfs fix : add minimal sysfs support to the irda-usb driver. Patch from John K. Luebs.
stir4200 turnaround fix : fix invalid turnaround calculations in the stir4200 driver. Patch from John K. Luebs.
VIA devexit fix : mark properly the exist code in the VIA driver. Patch from Randy Dunlap.
LSAP socket connect : allow IrDA socket to connect on arbitrary LSAPs. Original patch from Iavor Fetvadjie.
NSC PC8738x support : Add support for the NSC PC8738x chipset as found in the IBM X40. Patch from Steffen Pingel.
IrCOMM write cleanup : cleanup some obsolete construct.
Linux-IrDA patches pending for 2.6.12 :
ASSERT fixes : fix the DEBUG and ASSERT macro to be safer, rename ASSERT, MESSAGE and WARNING with an IRDA_ prefix to minimise namespace pollution. Huge patch.
Experimental Linux-IrDA patches for 2.6.X :
SmSC PnP support : Add PnP support to the SmSC driver. Patch from Ville Syrjala. Unfortunately, does not work properly with all hardware...
NSC PnP test : Add PnP debugging to the NSC driver. This seems to make my hardware fail.
ep7211_ir driver locking fix : fix locking in the ep7211_ir driver. Patch from Chris Wilson.
sa1100_ir driver locking fix : fix locking in the sa1100_ir driver. Patch from Chris Wilson.
donauboe comments cleanup : Patch from Pavel Machek.
Fix LAP race condition : improve previous fix for IrLAP race condition to protect in more cases. This patch is not totally safe and need a rewrite.

More information and links
Our work on IrDA :
My IrNET implementation for Linux.
My e-Squirt implementation for Linux.
Our Java-IrDA API for Linux (IrDA sockets in Java).
CoolTown official web site.
More IrDA links :
The Linux-IrDA web pages, to download irda-utils and for the very helpful mailing list...
The Linux-IrDA SourceForge project, which host the above web page and mailing lists.
The Linux-IrDA mailing list at SourceForge for discussions related to the Linux-IrDA stack.
The Linux-IrDA mailing list at Gmane should be the same with a different UI.
The old Linux-IrDA mailing list for discussions related to the Linux-IrDA stack.
The old IrDA mailing list for generic questions regarding IrDA.
Linux kernel source archive (the latest IrDA stack is in the 2.4.X kernels).
The OpenObex web page, where you will find the latest version of the Obex code (and the OpenObex SourceForge project).
The Old Obex homepage, with the mailing list archive...
The Linux-IrDA Howto (note : almost up to date...)
The IrDA organisation, with on-line specs Random Linux-IrDA links that should be on the Linux-IrDA web page :
The OpenObex web page, where you will find the latest version of the Obex code. Obex is the protocol that allow to exchange objects (vCard, vCal) with your Palm or cellular phone over IrDA or BlueTooth.
ObexFTP, an implementation of FTP over OpenObex, with a nice graphical interface. Also include a working implementation of OpenObex over Serial cable. Can be used to browse some cellular phones.
ObexTool, an graphical front end for ObexFTP, including plug-in capability.
MultiSync allow you to synchrnonise data over OBEX with your cell phone.
Gnokii, a package to communicate with your cellular phone over IrDA.
GIrDA, an IrDA monitor that display devices in range and support OpenObex.
Felix Tang has a page on how to build a cheap SIR dongle.
Daniele Peri has some utility to help configure the IrDA port on Toshiba 1800 laptops and is the maintainer of the new SMC driver.
Rob Miller has some utility to help configure the IrDA port on Toshiba 2400, 4600 and 5100 laptops.
James McKenzie and Christian Gennerat have done a rewrite of the toshoboe driver called donauboe.
Paul Stewart is the original author of the stir4200 USB Dongle FIR driver, and is maintaining the version for kernel 2.4.X.
Stephen Hemminger has an improved version of the stir4200 USB Dongle FIR driver for 2.6.X.
Martin Diehl has written a document on the new dongle driver interface he has created in kernel 2.5.X.
Martin Diehl has written some notes about the MA 620 USB dongle.
Ben Moore has created a Window Maker dockapp for managing the Hewlett-Packard CapShare document scanner (boy, that does bring some memories !).
Jan Kiszka has created IrCOMM2k to provide improved IrCOMM support in W2k and Wxp. IrCOMM2k version 2.0 and later is based on a port of the Linux-IrDA stack to the WinNT architecture, version 2.0alphaX was based on the stack in Kernel 2.4.20 (with known bugs), version 2.0betaX is based on my latest version (2.5.67 + updates). Jan has provided me many useful bugfixes and suggestions as the result of this work, thanks...
Cambridge University has some instruction on how to make GPRS connections using Linux-IrDA (of course, assuming you have a GPRS phone).
Tor-Ake Fransson have some instructions on how to use a Linux iPaq with a IrDA enabled cell phone.
Arthur Tyde and Bryan Abshier have some instructions on how to connect a WinCE device to Linux.
Andy has instructions on how to do Telnet from a Palm to Linux over IrDA.
David Desrosiers have some instructions on how to connect a Palm to Linux over IrDA via PPP over IrCOMM.
Rev has instructions on how to exchange Obex objects with an Ericsson phone.
Ian Barry explain how to set up network connections between various handhelds and Linux.
Alan J. McFarlane maintains a short FAQ on Windows IrDA support and has instructions on Win32 IrDA programming (which is very similar to Linux-IrDA programming).
Howard has various instructions and link on Windows IrDA support. More stuff on my web site :
My Linux Wireless LAN Howto
How to setup BlueTooth on Linux

Tutorial : How to use Linux-IrDA
The remaining of this document will give you some tips on how to configure Linux-IrDA.
A lot of IrDA novices mix up the low level and high level of the IrDA stack. A few words...
Low level of Linux-IrDA : this is the part of the IrDA stack dealing with the IrDA hardware on your computer and managing it. The key words are IrDA driver, IrDA ports (either SIR or FIR), IrDA dongles and TTY/serial port.
High level of Linux-IrDA : this is the part of the IrDA stack dealing with communicating with the other IrDA device and exchanging the data (the protocol). The key words are protocol, IrCOMM, IrLPT, OBEX, IrLAN and IrNET. The low level and high level are totally independant of each other, however each need to be configured properly for what you want to do.
The procedure to get IrDA working looks usually like this :
Configure everything
Set up the low level to recognise your IrDA hardware
Verify that the low level works
Set up your application on top of the proper high level protocol
I also offer various debugging tips at the end of this document.

Common configuration
Most Linux kernels don't come with IrDA enabled, and most distributions come with very approximate config scripts. I don't trust those and I always do things by myself.
Get kernel of your choice, unpack the source in /usr/src
Compile yourself a fresh kernel and make it boot properly.
Configure the IrDA stack as a module, enable all options (as module if possible) and the driver/protocols you need (as modules).
Configure serial port as a module. Static is ok as well, except for the NSC or FIR setup.
Recompile the modules and install them : > make modules ; make modules_install
Install irda-utils-0.9.15 or later
Add the following stuff in /etc/modules.conf : # IrDA stuff...
alias tty-ldisc-11 irtty
alias char-major-161 ircomm-tty # if you want IrCOMM support
# These values are hard-coded in irattach (not instance order)
alias irda-dongle-0 tekram # Tekram IrMate IR-210B
alias irda-dongle-1 esi # ESI JetEye
alias irda-dongle-2 actisys # ACTiSYS IR-220L
alias irda-dongle-3 actisys # ACTiSYS IR-220L+
alias irda-dongle-4 girbil # Greenwich GIrBIL
alias irda-dongle-5 litelink # Parallax LiteLink/ESI JetEye
alias irda-dongle-6 airport # Adaptec Airport 1000 and 2000
alias irda-dongle-7 old_belkin # Belkin (old) SmartBeam dongle
alias irda-dongle-8 ep7211_ir # Cirrus Logic EP7211 Processor (ARM)
alias irda-dongle-9 mcp2120 # MCP2120 (Microchip) based
alias irda-dongle-10 act200l # ACTiSYS Ir-200L
alias irda-dongle-11 ma600 # Mobile Action ma600
# IrNET module...
alias char-major-10-187 irnet # Official allocation of IrNET
Create the IrDA devices : > mknod /dev/ircomm0 c 161 0
> mknod /dev/ircomm1 c 161 1
> mknod /dev/irlpt0 c 161 16
> mknod /dev/irlpt1 c 161 17
> mknod /dev/irnet c 10 187
> chmod 666 /dev/ir*
Reboot Now, it's time to check which hardware you want to make run...

Kernel 2.6.X differences
Kernel 2.6.X drivers are slightly different from kernel 2.4.X described above. The main driver differences are listed below. This list is known to not be final.
Driver irtty-sir replaces irtty for SIR mode
Dongles drivers for irtty-sir have the -sir prefix added to their name (to distinguish them from old style dongle drivers).
Driver donauboe replaces toshoboe
Driver smsc-ircc2 may replace smc-ircc
Module configuration is also different, you need to add the following in /etc/modules.conf : alias tty-ldisc-11 irtty-sir
alias char-major-161 ircomm-tty
alias irda-dongle-0 tekram-sir
alias irda-dongle-1 esi-sir
alias irda-dongle-2 actisys-sir
alias irda-dongle-3 actisys-sir
alias char-major-10-187 irnet

Low level drivers
This really depend on the IrDA hardware that you have. I describe a few of the options below. The two safest options are Laptop in SIR mode and Serial dongle.

Serial dongle (using irtty driver)
For all serial dongles, you need an IrDA driver, which is irtty, and a dongle driver. The dongle I use if the Actisys 220L+, and the dongle driver is called actisys (see list above). The setup for other dongles should be very similar. I'm also using the first serial port in this example (ttyS0), you may need to adapt to your case.
Attach dongle to the serial port, and check which serial port it is.
Check if the serial config is ok : > setserial /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
If it say UART: unknown, your serial configuration is invalid.
Start the IrDA stack : > irattach /dev/ttyS0 -d actisys -s
If you want to unload/stop the IrDA stack just kill all the IrDA applications and do : > killall irattach
> rmmod irtty actisys
> rmmod irda
Note : all the modern ESI dongles work better with the litelink driver.

Laptop port in SIR mode (using irtty driver)
SIR (Serial Infrared) is not fast but almost always work and is easy to set-up, so it's a safe bet. It will work only if the BIOS is set to SIR mode, so don't bother otherwise. Some BIOS don't offer the setting and try to be clever and autodetect the proper setting, but it doesn't always works.
Note that some laptops (Toshiba) need special magic for their IrDA port to be enabled, see link section above.
The irtty driver will use the standard Linux serial driver.
Go in the BIOS of the laptop, enable the Infrared port, and set it to SIR mode.
While in the BIOS, note the IO address and IRQ assigned to it.
Using setserial or in the boot log messages, find the ttyS* that correspond to this port. Let's assume /dev/ttyS1 (as in my laptop).
Check if the serial config is ok : > setserial /dev/ttyS1
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
If it say UART: unknown, your serial configuration is invalid. If the port and IRQ are different, it's usually OK.
Start the IrDA stack : > irattach /dev/ttyS1 -s
Refer to previous example for more Now, you just need to figure out on which side of the laptop if the IrDA port...
HP Omnibook 6000 in FIR modeIt seems that each laptop has its quirk when it come to FIR mode. I've managed to get my OB6000 to work (great laptop BTW). Other laptops will be different (different driver, different settings).
Go in the BIOS of the laptop, enable the Infrared port, and set it to FIR mode.
Add the following stuff in /etc/modules.conf : # NSC FIR chipset in the OB6000
alias irda0 nsc-ircc
options nsc-ircc dongle_id=0x08
Remove the serial driver that gets in the way : > setserial /dev/ttyS1 uart none
> rmmod serial
Start the IrDA stack : > irattach irda0 -s
The NSC driver gives me some pretty good performance.
Other laptops in FIR modeThere is different FIR hardwares included in the various laptops. Linux-IrDA support some of them (not all) in various degrees (from good to bad). Moreover, it seems that each laptop has its quirk, so it's difficult to list everything here.
For this reason, I recommend to make it work first in SIR mode. After that, you can experiment, check the Howto and query the mailing list...
THe setup for most FIR drivers will follow the same pattern as the Omnibook 6000 example above. You will need to find the proper value of the modules parameters, set the BIOS properly, take care of conflicting hardware (serial, Pcmcia cards and other interrupt conflicts) and start the stack with irattach.
As a rule of thumb, the NSC driver seems to be the most functional (if you set the proper dongle_id, which most likely 0x9, but sometimes 0x8), and the old SMC driver the most problematic.

USB FIR dongles
This driver is included in recent kernel. It's not as efficient as other FIR hardware, but at least is supported and is relatively easy to get working. Also, all the current products are based on the same hardware, and we know most of its bugs.
The latest version of the driver has been tested with usb-uhci and usb-ohci.
Start the USB stack. If you have an UHCI hardware, it looks like : > modprobe usb-uhci
Load USB driver and start the IrDA stack : > modprobe irda-usb
> irattach irda0 -s
If you have already some other IrDA hardware configured on the PC, the driver won't load as irda0, so check the message log with dmesg. Also, the driver can manage up to 4 IrDA-USB dongles per PC (that can be increased in the source).
Recently a new type of USB dongle from SigmaTel has appeared on the market which is not compliant with the IrDA-USB specification, and therefore doesn't work with this driver. On the other hand, SigmaTel has made available the full technical specification, so writing a driver for it is possible. There is a alpha driver for 2.6.X in my patch list.
The MA 620 USB dongle is a SIR USB dongle, there is some howto for it written by Martin Diehl.
Important note : in recent kernels, the USB team has added a driver called ir-usb. Not only this driver is not compatible with the IrDA stack (the IrDA driver is called irda-usb), but this driver will load automatically before irda-usb, therefore preventing you to use it. Solution : get rid of ir-usb. It may also be possible to blacklist ir-usb in /etc/hotplug/blacklist. I would like to thank warmly the USB team for the confusion they created. For complains, please direct it to them.
SIR with irportThe standard SIR driver is irtty, which uses the standard serial driver and tty layer. This is the easiest and safest way to get IrDA working.
However, the tty layer adds some overhead and doesn't understand the IrDA protocol, which make it unsuitable in some case (dongle without echo cancelation) and less performant in others (small packets). That is why there is a second driver, irport, which allow the IrDA stack direct access to the serial port.
Unfortunately, the procedure to use irport is more complicated and less well tested. Actually, I personally never managed to make irport work reliably on any of my systems.
Remove the serial driver that gets in the way : > setserial /dev/ttyS0 uart none
> rmmod serial
Load the irport driver and attach the dongle driver. > modprobe irport io=0x3f8 irq=4
> dongle_attach irda0 -d actisys+
Start the IrDA stack : > irattach irda0 -s

Checking that it work
The first test is to check if the discovery is happening properly. If the IrDA driver is properly configured, the Linux-IrDA will discover other IrDA devices in range. If the discover doesn't work, this indicate that the low level is not configured properly (and you don't need to go any further).
You can check if there is any device listed in the discovery log with : > cat /proc/net/irda/discovery
IrLMP: Discovery log:
nickname: Jean Tourrilhes, hint: 0x8220, saddr: 0x913b1bbc, daddr: 0x5619b45e
You can also check various other files in /proc, or use irdadump, check the debugging section.
Then, you might want to use a simple aplication, such as e-Squirt to verify that everything works fine. Or you can skip directly to the next section.
The big advantage of e-Squirt is that it is a really simple protocol, doesn't stress the IrDA stack too much and we have implementation for various platforms, so that you can test your setup with almost anything on the other side (Linux, Win32, WinCE or Palm).
Compile the Linux e-Squirt library and the test programs on all Linux computers, and go in the tests directory. On other platforms, load and start the relevant the e-Squirt application.
If you want to use Linux as a receiver, just do : ./squirt
To use Linux as a sender, you can do : ./ultra_beacon http://cooltown.hp.com/
./socket_squirt http://cooltown.hp.com/
With that, you should be able to exchange back and forth URLs and check that your IrDA stack works. If not, continue to read below.
On caveat : Most implementations have two exclusive receiving modes, IrDA and Ultra, and they switch between these (either as a preference setting, or automatically triggerd by discovery packets). Linux is an exception and can listen to both at the same time. This means that unless you do a Linux-Linux test, only one of the two sender tests listed above will work properly.

Apps and protocols on top of the IrDA stack
If you want to run e-Squirt applications, you are done, and you just need to run the application themselves, they should work.
Other applications and protocols you may want to run :
TCP/IP over IrNET
Terminal over IrCOMM
TCP/IP over IrCOMM
TCP/IP over IrLAN
Connect to a mobile phones
Obex to exchange files/objects with PDAs, Phones and other Obex devices Note that I don't use IrCOMM and IrLAN, so I can't help much with that...

Terminal over IrComm
This is a simple test to check that IrComm is working between two PCs. After that, you can try more complex applications such as PPP. The original instructions were sent on the mailing list.
Server side : Start the terminal server > getty ircomm0 DT19200 vt100 # Red-Hat syntax
or > getty -L ircomm0 19200 vt100 # Debian syntax
At this point, your text terminal should get reset and you come back to a login prompt. That's normal. I don't know what happen in X.
Client side with kermit : Start the terminal emulator > kermit
> > set line /dev/ircomm0
> > set speed 19200
> > connect
> > > stty sane # Get backspace to work ok
The prompt shouls appear after connect. Also, you need to ignore the following message : "Warning: no access to tty (Inappropriate ioctl for device). Thus, no job control enabled", and "Can't open terminal /dev/tty"
Client side with minicom : Minicom is a bit more problematic, and I'm still fighting with it. I still don't understand how to connect. I managed to make it work like this :
start minicom
Configure (^A O)
sub-menu serial
set to /dev/ircomm0
set speed to 19200
exit
sub-menu "save as dft"
exit
Exit (^A X)
restart minicom

TCP/IP over IrCOMM between two PCs
This simple example of PPP over IrCOMM is somewhat similar to TCP/IP over IrNET, and is not much use, except to verify the IrCOMM works properly. Real life PPP over IrCOMM to a mobile phone will involve a much more complex configuration (to configure the modem and dial).
Server side : Start the ppp deamon > pppd /dev/ircomm0 9600 local noauth passive
As you can see, the visible difference with IrNET is that we use /dev/ircomm0 instead of /dev/irnet. Also, IrCOMM doesn't have the advanced features of IrNET to specify IrDA peer.
Client side : Start the ppp deamon Start the terminal emulator > pppd /dev/ircomm0 9600 local noauth
At this point, the IrDA stack should connect (check with irdadump) and PPP should create a new network device (usually ppp0) and configure IP and route. You should be able to ping and connect to the other side using its IP address.

TCP/IP over IrLAN
I don't use IrLAN any longer, because I'm only using IrNET. I just did a refresh on the original instructions that I sent on the mailing list (removing mentions of irmanager which no longer exist).
IrLAN as an access option, which can be 1 (direct mode), 2 (peer to peer) and 3 (hosted). Basically, you would use 2 if you connect to another PC, 1 if you connect to a transparent access point, and 3 if you are the access point (Dag, correct me if I'm wrong). The HP Netbeamer is an access point, but it accept connections only if the PC is in peer mode. Go figure...
PC -> HP NetBeamer : Here is how to hook to the NetBeamer... After aligning the IrDA port or after starting irattach, the light of the NetBeamer should flash. If it doesn't, you may want to play with the slot_timeout value. > insmod irlan access=2
> ifconfig irlan0 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255
At this point, the light goes solid green. Link is on, you can ping and everybody is happy. You may want to add a gateway with "route add default gw ...".
PC -> PC : Not everybody has a NetBeamer, so here is a step by step on how to create a link between two PCs.
On the first PC : > insmod irlan access=2
> ifconfig irlan0 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255
On the second PC : > insmod irlan access=2
> ifconfig irlan0 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
After that, you should be able to ping and telnet...
Automated ifconfig : By default, /etc/irda/network.opts is not used. In the previous example, we ifconfig-ure irlan by hand. If you have a Red-Hat/Mandrake distribution, irmanager can do the job automatically at the condition that you create a file /etc/sysconfig/network-scripts/ifcfg-irlan0 and set the right values in there... There might be more needed, but I'm not totally expert on this...
For other distribution (like Debian), you need to replace the file /etc/irda/network with possibly something from a Pcmcia package, and with some editing you might get it to load network.opts...
You might also want to add in your /etc/conf.modules a "option irlan access=2". So, if you use modprobe instead of insmod, you won't have to specify access=2 on the command line.

IrDA and mobile phones or PDAs
I don't have any mobile phone, and I don't use IrCOMM, so I can't help...
There is many people using IrDA to connect either to their mobile phone or PDA, and lot's of them have put instructions in their web pages. You may use OBEX to transfer simple objects, or PPP over IrCOMM to establish connections, depending on the application and the device. The people doing Gnokii are also quite knowledgeable in this area, so you may ask advice on their mailing list, but please report IrDA bugs in the IrDA mailing lists.
One of the most common gotcha is that applications need to be configured to use the proper IrCOMM virtual port (which most often is /dev/ircomm0).
If I can't reproduce your problem, I can't debug it, so I can't fix it. If I can't see anything obvious in the irdadump log, I won't bother. You may also want to try to reproduce the problem between two Linux boxes (because I may be able to reproduce that).

Checking Linux-IrDA state and debugging
Of course, I'm sure that you won't get things smooth the first time. Actually, I'm pretty sure you will struggle a little bit.
If you get the Obex stuff out of the loop (so, using Ultra or Socket, as described above), the e-Squirt stuff is so simple that if anything doesn't work you can bet that it's the IrDA stack.
The first trick is to check is the modules are loaded : > cat /proc/modules
actisys 1652 1 (autoclean)
irtty 7524 2 (autoclean)
irda 151905 11 (autoclean) [actisys irtty]
This is what a serial dongle setup would look like. If the modules don't show up, check you modules configuration and check the error messages in the log (with dmesg).
Then, check the bunch of files in /proc/net/irda : > cat /proc/net/irda/discovery
IrLMP: Discovery log:
nickname: Jean Tourrilhes, hint: 0x8220, saddr: 0x913b1bbc, daddr: 0x5619b45e
> cat /proc/net/irda/irlap
irlap0 state: LAP_NDM
device name: irda0, hardware name: ttyS0
caddr: 0x52, saddr: 0x913b1bbc, daddr: 0x5619b45e
win size: 1, win: 1, line capacity: 4800, bytes left: 4800
tx queue len: 0 win queue len: 0 rbusy: FALSE mbusy: FALSE
retrans: 0 vs: 2 vr: 2 va: 0
qos bps maxtt dsize winsize addbofs mintt ldisc comp
tx 9600 0 64 1 12 0 0
rx 9600 0 64 1 12 0 0
> cat /proc/net/irda/irias
LM-IAS Objects:
name: hp:esquirt, id=76371435
- Attribute name: "IrDA:TinyTP:LsapSel", value[IAS_INTEGER]: 96
name: OBEX:ESquirt, id=76371435
- Attribute name: "IrDA:TinyTP:LsapSel", value[IAS_INTEGER]: 95
name: Device, id=0
- Attribute name: "IrLMPSupport", value[IAS_OCT_SEQ]: octet sequence
- Attribute name: "DeviceName", value[IAS_STRING]: "lagaffe"
name: hp:beacon, id=76371435
- Attribute name: "IrDA:TinyTP:LsapSel", value[IAS_INTEGER]: 97
There, you can see that the IrDA stack has discovered my Palm V, that my IrDA port is ttyS0, that I'm not connected, and you can also see that I have an e-Squirt application running that has opened a bunch of server sockets (of course, if you haven't started e-Squirt, the IAS won't contains all those sockets).
The ultimate debugging tool is irdadump (and remember that I require you to use version 0.9.15 or later). You should run irdadump while attempting to connect and check what's happening. A normal irdadump log with a IrDA device in front of the port (not connected) should show something like this : > irdadump
22:04:48.000713 xid:cmd 6f1e8511 > ffffffff S=6 s=0 (14)
22:04:48.090705 xid:cmd 6f1e8511 > ffffffff S=6 s=1 (14)
22:04:48.180714 xid:cmd 6f1e8511 > ffffffff S=6 s=2 (14)
22:04:48.270734 xid:cmd 6f1e8511 > ffffffff S=6 s=3 (14)
22:04:48.270698 xid:rsp 6f1e8511 < fb48d412 S=6 s=2 Jean Tourrilhes hint=8220 [ PDA/Palmtop IrOBEX ] (32)
22:04:48.360742 xid:cmd 6f1e8511 > ffffffff S=6 s=4 (14)
22:04:48.450733 xid:cmd 6f1e8511 > ffffffff S=6 s=5 (14)
22:04:48.540762 xid:cmd 6f1e8511 > ffffffff S=6 s=* weblab10 hint=0400 [ Computer ] (24)
You see my Palm V answering the discoveries of Linux. The Palm shows the infamous "Waiting for sender" pop-up.
On the other hand, if the stack is not properly configured (wrong port, wrong driver), or if the device in front is not active, you will get something like this : 22:02:47.988983 xid:cmd 6f1e8511 > ffffffff S=6 s=0 (14)
22:02:48.078981 xid:cmd 6f1e8511 > ffffffff S=6 s=1 (14)
22:02:48.168992 xid:cmd 6f1e8511 > ffffffff S=6 s=2 (14)
22:02:48.258995 xid:cmd 6f1e8511 > ffffffff S=6 s=3 (14)
22:02:48.349018 xid:cmd 6f1e8511 > ffffffff S=6 s=4 (14)
22:02:48.439035 xid:cmd 6f1e8511 > ffffffff S=6 s=5 (14)
22:02:48.529063 xid:cmd 6f1e8511 > ffffffff S=6 s=* weblab10 hint=0400 [ Computer ] (24)
As you can see, nobody answer us...
After that, send a good bug report to the Linux-IrDA mailing list.

The connection just "hang"
The first type of hang is a very classical problem, where the connection hanging just after beeing negociated (after the packets called SNRM and UA). The irdadump looks like the following : 18:03:28.766071 xid:cmd ffffffff < af28ca67 S=6 s=0 (14)
18:03:28.856067 xid:cmd ffffffff < af28ca67 S=6 s=1 (14)
18:03:28.947685 xid:cmd ffffffff < af28ca67 S=6 s=2 (14)
18:03:29.037383 xid:cmd ffffffff < af28ca67 S=6 s=3 (14)
18:03:29.037549 xid:rsp 977f612c > af28ca67 S=6 s=3 lagaffe hint=4400 [ Computer LAN Access ] (23)
18:03:29.126099 xid:cmd ffffffff < af28ca67 S=6 s=4 (14)
18:03:29.216071 xid:cmd ffffffff < af28ca67 S=6 s=5 (14)
18:03:29.316257 xid:cmd ffffffff < af28ca67 S=6 s=* tanguy hint=4400 [ Computer LAN Access ] (22)
18:03:29.316433 snrm:cmd ca=fe pf=1 977f612c > af28ca67 new-ca=ba (32)
18:03:29.417508 ua:rsp ca=ba pf=1 977f612c < af28ca67 (31)
18:03:29.417646 rr:cmd > ca=ba pf=1 nr=0 (2)
18:03:29.666173 rr:cmd > ca=ba pf=1 nr=0 (2)
If you are on the primary, you will see a series of rr:cmd until it times-out. On the secondary, you won't see anything after the ua:rsp and it will eventually timeout.
What most likely happening is that the negociated connection parameters don't match. Usually, one end doesn't implement properly the speed that is beeing negociated, so the two nodes can't hear each other after changing speed. And most likely it happens at FIR speeds.
Of course, it would be nice to fix the driver, but in the short term the solution is to force the IrDA stack to negociate a lower speed : > echo 115200 > /proc/sys/net/irda/max_baud_rate
You can of course try lower values, and there is also other parameters you can tweak in this directory.
There is second type of hang, that may look similar but is not. You may see the IrDA stack "hanging" on transmitting a large packet (the last number between parenthesis). This seems due to a bug in the some FIR hardware. 18:03:30.458569 i:rsp < ca=ba pf=1 nr=6 ns=5 LM slsap=12 dlsap=10 CONN_CMD TTP credits=0(12)
18:03:30.458740 i:cmd > ca=ba pf=1 nr=6 ns=6 LM slsap=10 dlsap=12 CONN_RSP TTP credits=0(12)
18:03:30.466399 rr:rsp < ca=ba pf=1 nr=7 (2)
18:03:30.516548 rr:cmd > ca=ba pf=1 nr=6 (2)
18:03:30.537423 i:rsp < ca=ba pf=1 nr=7 ns=6 LM slsap=12 dlsap=10 TTP credits=0 (29)
18:03:30.537663 rr:cmd > ca=ba pf=1 nr=7 (2)
18:03:30.547328 rr:rsp < ca=ba pf=1 nr=7 (2)
18:03:30.555025 i:cmd > ca=ba pf=1 nr=7 ns=7 LM slsap=10 dlsap=12 TTP credits=1 (2050)
18:03:30.566804 i:cmd > ca=ba pf=1 nr=7 ns=7 LM slsap=10 dlsap=12 TTP credits=1 (2050)
18:03:30.596405 i:cmd > ca=ba pf=1 nr=7 ns=7 LM slsap=10 dlsap=12 TTP credits=1 (2050)
It may look a bit different for you, but you get the idea, the packet doesn't goes through and is retried, and the communication just dies there.
As we can't fix the hardware, the solution is to force the IrDA stack to transmit smaller packets : > echo 2000 > /proc/sys/net/irda/max_tx_data_size
Now, I've seen is a third type of hang which happen during the connection, and not related to a large packet. This happens with buggy phones, such as Ericsson phones (T39/T68/...). 14:53:57.741656 snrm:cmd ca=fe pf=1 2cc4b1b4 > 29c42130 new-ca=ae
LAP QoS: Baud Rate=4000000bps Max Turn Time=500ms Data Size=2048B
Window Size=7 Add BOFS=0 Min Turn Time=1000us Link Disc=12s (33)
14:53:57.877021 ua:rsp ca=ae pf=1 2cc4b1b4 < 29c42130
LAP QoS: Baud Rate=1152000bps Max Turn Time=500ms Data Size=256B Window
Size=3 Add BOFS=0 Min Turn Time=0us Link Disc=12s (31)
14:53:57.877622 rr:cmd > ca=ae pf=1 nr=0 (2)
14:53:57.889399 rr:rsp < ca=ae pf=1 nr=0 (2)
14:53:57.889468 i:cmd > ca=ae pf=1 nr=0 ns=0 LM slsap=11 dlsap=00 CONN_CMD (6)
14:53:57.895119 i:rsp < ca=ae pf=1 nr=1 ns=0 LM slsap=00 dlsap=11 CONN_RSP (6)
14:53:57.895264 i:cmd > ca=ae pf=1 nr=1 ns=1 LM slsap=11 dlsap=00
GET_VALUE_BY_CLASS: "IrDA:IrCOMM" "Parameters" (28)
14:53:57.899848 i:rsp < ca=ae pf=1 nr=2 ns=1 LM slsap=00 dlsap=11
GET_VALUE_BY_CLASS: Success
IrCOMM Parameters Service Type=NINE_WIRE THREE_WIRE Port Type=PARALLEL (19)
14:53:57.900690 i:cmd > ca=ae pf=0 nr=2 ns=2 LM slsap=11 dlsap=00 DISC (6)
14:53:57.900803 i:cmd > ca=ae pf=1 nr=2 ns=3 LM slsap=12 dlsap=00 CONN_CMD (6)
14:53:57.914408 rr:rsp < ca=ae pf=1 nr=4 (2)
14:53:57.914453 rr:cmd > ca=ae pf=1 nr=2 (2)
14:53:57.924388 rr:rsp < ca=ae pf=1 nr=4 (2)
14:53:57.965741 rr:cmd > ca=ae pf=1 nr=2 (2)
The first interesting part of the log above is the Min Turn Time=0us. The peer says that it can turn the link around in 0us, but I've never seen any device that fast.
The problem here is that the Linux-IrDA stack gives the peer exactly what he ask for, and the Linux-IrDA stack can be very fast in turning around. And of course the peer can't keep up and doesn't receive properly the frames, and after that it usually goes downhill.
In those cases, you may want mandate that Linux uses a large turnaround time : > echo 1000 > /proc/sys/net/irda/min_tx_turn_time
The second interesting part of the log above is that it fails just after the Linux-IrDA sends two consecutive packets. IrLAP is a windowed protocol (up to 7 consecutive frames), but some devices have trouble managing that (such as the Ericsson phones and USB dongles).
In those cases, you may want limit Linux to send one frame per IrLAP window : > echo 1 > /proc/sys/net/irda/max_tx_window
Note that the patch adding max_tx_window to the IrDA stack is included only in kernel 2.4.22, for earlier kernel to fetch a patch up here.

irattach print "tcsetattr" in the log
People using FIR drivers (nsc-ircc, smc-ircc...) are often confronted to this simple problem. When they start irattach, it doesn't work and the following message (or similar) is printed in the log : irattach: tcsetattr: Invalid argument
This is due to a conflict between the Linux-IrDA FIR driver and the regular Linux serial driver. Both want to manage the same hardware, the serial driver has registered the FIR port as a pseudo serial port and is owning it, and the kernel rightly prevent the FIR driver to get ownership of it (it's first come first serve).
The solution is simple. You need to tell the serial driver that it should not manage this port.
The safest way is to remove the serial driver : > rmmod serial
Unfortunately, the trick above doesn't always work (non-modular driver, another serial port in use). Another way is to declare the port invalid : > setserial /dev/ttyS1 uart none
On the other hand, if you do that, you won't be able to use irtty (SIR mode driver), because irtty uses the regular Linux serial driver. If you change your mind and want to use the irtty driver, you can reenable the serial port with : > insmod serial
> setserial /dev/ttyS1 uart 16550A

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)
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.
Compilation problemsSometimes, when you compile the IrDA stack or some various IrDA package, you may have the compiler complaining the things such as IRLMP_HINT_MASK_SET or IRDAPROTO_ULTRA are not defined.
This is because of a mess related to kernel headers and the way most distributions deal with it. If you have the 2.4.X kernel source lying around, the fix is simple. Just copy the header irda.h from the kernel to your include directory : cp /usr/src/linux/include/linux/irda.h /usr/include/linux
That should fix it ;-)