world leader in high performance signal processing
Trace: » irda_framework

IrDA History

Type Speed (max rate) Year WindowSize (frames)
SIR 115.2 Kbit/s 1994 7
FIR 576 Kbit/s 1995 7
FIR 1.152 Mbit/s 1995 7
FIR 4 Mbit/s 1995 7
VFIR 4 Mbit/s 1999 127

IrDA Glossary

  • IrDA - Infrared Data Association
  • SIR - Serial Infrared
  • FIR - Fast Infrared
  • VFIR - Very Fast Infrared
  • BER - Bit Error Rate

IrDA Protocol Layer

A chart of IrDA Protocol Layers:

  • Physical Layer - Specifies physical characteristics. For SIR, it use RZI modulation to convert NRZ signals to IrDA signals:
  • IrLAP - IrDA Link Access Protocol
  • IrLMP - IrDA Link Management Protocol
  • TinyTP - This layer is optional
  • IrCOMM - Serial and Parallel Port emulation
  • IrOBEX - Provides easy file and data exchange APIs

Linux IrDA Device Support

Supported IrDA devices:

  • Irtty - SIR driver that based on serial drivers.
  • Serial Dongle - Modem like devices, connected to serial port, only support SIR.
  • USB Dongle - USB devices, connected to USB port, usually support SIR, and FIR.
  • Specific IC - Some IC integrated IrDA functions, usually support SIR, and FIR.
  • UART that integrated IR - UART of blackfin537 support SIR, Intel SA1100 UART2 support SIR and FIR.

Use IrDA Under Linux

  1. Configure the IrDA drivers:
    Make menuconfigNetworkingIrDA ( infrared ) subsystem supportInfrared-port device drivers
  2. Attach IrDA stack to IrDA devices:
    If you use Irtty driver on PC, please be sure you have enabled IR function in BIOS, usually it will enable the IR function on COM2. Then run:
    # modprobe irtty-sir
    # irattach /dev/ttyS1 -s

    If you use Irtty driver on blackfin, please enable UART1 driver first, as UART0 is used for Console, and attach the IRDA-SIR Add-On card to UART1's connector. Run:

    # modprobe irtty-sir
    # irattach /dev/ttyBF1 -s&

    If you use bfin_sir.ko as SIR drivers, run:

    # modprobe bfin_sir
    # irattach irda0 -s&

    If you use other drivers, please refer to: Linux-IRDA Project

  3. Test IrDA connections:
    If there are other active IrDA devices in the range (3 feet or 1 meter), you can find them through:
    # cat /proc/net/irda/discovery 
    IrLMP: Discovery log:
    nickname: blackfin, hint: 0x8420, saddr: 0x92bd07ac, daddr: 0xcce60c43

    Then you can use irdaping to test the connections:

    # irdaping 0xcce60c43

    You will see messages just like 'ping'.

  4. For example, use ircp to transfer files:
    On receiver side, run:
    # ircp -r

    On transfer side, run:

    # ircp some_file

    Program will exit until the transfers is finished.

Linux IrDA Device Driver Frame Work

Frame work initialize:

  • Driver probe: bfin_sir_probe()‏
  • Open driver: bfin_sir_open() - do the UART initialize work

Core transive functions:

  • Send: IrLAP → bfin_sir_hard_xmit() - Send one frame‏
  • Receive with PIO mode: bfin_sir_rx_int() - Receive one character and send it to IrLAP layer
  • Receive with DMA mode: bfin_sir_dma_rx_int() - Receive several characters and send them to IrLAP layer

Frame work deinitialize:

  • Stop driver: bfin_sir_stop() - shutdown the UART.
  • Remove driver: bfin_sir_remove()

Notes for Testing IrDA on Variant Boards

Blackfin IRDA Add-On-Card: irda_sir


  • IrDA on UART0, Console on UART1
  • Populate JP3 (STAMP ENABLE)
  • SW20 (SPORT0A ENBL) 3 and 4 OFF
  • If you use Irtty driver, please change the console port in u-boot,
    • setenv bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 console=ttyBF1


  • IrDA on UART0, none serial console
  • Disable Console on serial port,
    • make menuconfig → Device Drivers → Character devices → Serial drivers → [ ] Console on Blackfin serial port


  • IrDA on UART1, Console on UART0
  • Disable the push button switch(SW5) pin 1,2, for GPIO PF2 and PF3 multiplexed with uart1 tx rx


  • IrDA on UART3, Console on UART1


  • Can't test IrDA

Notes for all boards

  • Be sure the testing uart signals are not connected through expansion interface, so you'd better remove the card on expansion interface.

Complete Table of Contents/Topics