2.6. Hardware Supported by Linux/IrDA

2.6.1. Obtaining Information about the Infrared Port in Laptops

To get the IrDA port of your laptop working with Linux/IrDA you may use StandardInfraRed (SIR) or FastInfraRed (FIR).

2.6.1.1. SIR

Up to 115.200bps, the infrared port emulates a serial port like the 16550A UART. This will be detected by the kernel serial driver at boot time, or when you load the serial module. If infrared support is enabled in the BIOS, for most laptops you will get a kernel message like:

Serial driver version 4.25 with no serial options enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A     #first serial port /dev/ttyS0
ttyS01 at 0x3000 (irq = 10) is a 16550A    #e.g. infrared port
ttyS02 at 0x0300 (irq = 3) is a 16550A     #e.g. PCMCIA modem port

2.6.1.2. FIR

If you want to use up to 4Mbps, your machine has to be equipped with a certain FIR chip. You need a certain Linux/IrDA driver to support this chip. Therefore you need exact information about the FIR chip. You may get this information in one of the following ways:

  1. The irda-utils contain a program findchip now.

  2. Read the specification of the machine, though it is very rare that you will find enough and reliable information there.

  3. Try to find out whether the FIR chip is a PCI device. Do a cat /proc/pci . The according files for 2.2.x kernels are in /proc/bus/pci . Though often the PCI information is incomplete. You may find the latest information about PCI devices and vendor numbers in the kernel documentation usually in /usr/src/linux/Documentation or at the page of Craig Hart http://members.hyperlink.net.au/~chart . From kernel 2.1.82 on, you may use lspci from the pci-utils package, too.

  4. Use the DOS tool CTPCI330.EXE provided in ZIP format by the German computer magazine CT ftp://www.heise.de/pub/ct/ctsi/ctpci330.zip . The information provided by this program is sometimes better than that provided by the Linux tools.

  5. Try to get information about Plug-and-Play (PnP) devices. Though I didn't use them for this purpose yet, the isapnp tools, could be useful. At the page from Craig Hart I found this PNP IDs:
    IBM0002   IBM Thinkpad Infrared Port
    IBM0034   IBM Thinkpad Infrared Port
    PNP0510   Generic IRDA-compatible device
    PNP8294   IrDA Infrared NDIS driver (Microsoft-supplied)
    PNP8389   Peer IrLAN infrared driver (Microsoft-supplied)

  6. If you are running Linux-2.3.x and PCMCIA-CS-3.1.x, turn on the PnP BIOS in PCMCIA-CS. Then, do a lspnp -v (from Thomas Davis).

  7. If you have installed the Linux/IrDA software load the FIR modules and watch the output of dmesg, whether FIR is detected or not.

  8. Another way how to figure it out explained by Thomas Davis (modified by WH): "Dig through the FTP site of the vendor, find the Windows9x FIR drivers, and they have (for a SMC chip):
    -rw-rw-r--   1 ratbert  ratbert       743 Apr  3  1997 smcirlap.inf 
    -rw-rw-r--   1 ratbert  ratbert     17021 Mar 24  1997 smcirlap.vxd 
    -rw-rw-r--   1 ratbert  ratbert      1903 Jul 18  1997 smcser.inf 
    -rw-rw-r--   1 ratbert  ratbert     31350 Jun  7  1997 smcser.vxd 
    If in doubt, always look for the .inf/.vxd drivers for Windows95. Windows95 doesn't ship with _ANY_ FIR drivers. (they are all third party, mostly from Counterpoint, who was assimilated by ESI)."

  9. Also Thomas Davis found a package of small DOS utilities made by SMC. Look at http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip . The package contains FINDCHIP.EXE. And includes a FIRSETUP.EXE utility that is supposed to be able to set all values except the chip address. Furthermore it contains BIOSDUMP.EXE, which produces this output:

    Example 1 (from a COMPAQ Armada 1592DT)

         In current devNode:
               Size      = 78
               Handle    = 14
               ID        = 0x1105D041 = 'PNP0511' -- Generic IrDA SIR
               Types:  Base = 0x07, Sub = 0x00,  Interface = 0x02
                    Comm. Device, RS-232, 16550-compatible
               Attribute = 0x80
                    CAN be disabled
                    CAN be configured
                    BOTH Static & Dynamic configuration
          Allocated Resource Descriptor Block TAG's:
               TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                       Min=0x03E8, Max=0x03E8
                                       Align=0x00, Range=0x08
               TAG=0x22, Length=2 IRQ Tag, Mask=0x0010
               TAG=0x79, Length=1 END Tag, Data=0x2F

    Result 1:

    Irq Tag, Mask (bit mapped - ) = 0x0010 = 0000 0000 0000 0001 0000 so, it's IRQ 4. (start at 0, count up ..), so this is a SIR only device, at IRQ=4, IO=x03e8.

    Example 2 (from an unknown machine)

         In current devNode:
              Size      = 529
              Handle    = 14
              ID        = 0x10F0A34D = 'SMCF010' -- SMC IrCC
              Types:  Base = 0x07, Sub = 0x00,  Interface = 0x02
                   Comm. Device, RS-232, 16550-compatible
              Attribute = 0x80
                   CAN be disabled
                   CAN be configured
                   BOTH Static & Dynamic configuration 
    
         Allocated Resource Descriptor Block TAG's:
              TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                      Min=0x02F8, Max=0x02F8
                                      Align=0x00, Range=0x08
              TAG=0x22, Length=2 IRQ Tag, Mask=0x0008
              TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                      Min=0x02E8, Max=0x02E8
                                      Align=0x00, Range=0x08
              TAG=0x2A, Length=2 DMA Tag, Mask=0x02, Info=0x08
              TAG=0x79, Length=1 END Tag, Data=0x00

    Result 2:

    a) it's a SMC IrCC chip

    b) one portion is at 0x02f8, has an io-extent of 8 bytes; irq = 3

    c) another portion is at 0x02e8, io-extent of 8 bytes; dma = 1 (0x02 =0000 0010)

    Thomas Davis has placed some device information at http://www.jps.net/tadavis/irda/devids.txt .

    WARNING: The package is not intended for the end user, and some of the utilities could be harmful. The only documentation in the package is in M$ Word format. Linux users may read this with catdoc, available at http://www.fe.msk.ru/~vitus/catdoc/ .

  10. Use the Device Manager of Windows9x/NT or WINMSD (Windows NT Diagnostics) in Windows NT 4.0, WINMSD is quite useful, and a bit more informative than Windows9x's Device Manager.

  11. You may also use the hardware surveys mentioned below.

  12. And as a last ressort, you may even open the laptop and look at the writings at the chipsets itselfs. Here is an probably incomplete list of manufacturers: Chrystal, Hewlett Packard (HP, chipsets are marked HSDL), Hitachi, IBM, National Semi Conductor (NSC), NEC, Philips, Sharp, Standard Micro Systems Corporation (SMC/SMSC), Texas Instruments (TI), VLSI, Winbond. As an example of application circuits the HSDL-7001 (from a HP brochure, modified by WH):
        LEDs        Encode/Decode        SIR/FIR
    
       HSDL-1001    HSDL-7001          UART 16550/
                                      MicroController
       ______      ______________      ____________
      |      |    |              |    |            |
    (||   TXD|<---|IR_TXD     TXD|<---|SOUT        |
      |      |    |              |    |            |
      |      |    |           RCV|--->|SIN         |
      |      |    |              |    |            |
    (||   RCV|--->|IR_RCV  16XCLK|<---|BAUDOUT     |
      |      |    |          NRST|-+  |            |
       ------      --------------  |   ------------
                                   V

2.6.2. How to Make Inrared Light Visible

If you have a IRDA aware printer, you can point you phone at it and you should see a light near the IR port light up or flash. If you have a Palm organizer w/ IR, point it at the phone. If the IR on the phone is in discovery mode, you should see the "Waiting for Sender" dialog box pop up on the Palm.

There is a program for the Palm called "IRMonitor" which measures IR emissions. You can get this off EuroCool or PilotZone. You run the program, point your Palm at where you think the IR beam should be coming from and if there are any emissions from that port, they will show up as a spike on the IrMonitor scrolling graph. I would highly recommend this program to anybody out there who plays with or works with IR devices.

You may also use a video camera to detect infrared light. But I couldn't check this yet.

Most of this section is taken from a posting to the Linux/IrDA list by "The Armadillo with the Mask" <armadilo@daft.com>.

2.6.3. Big Endian

Though the source is build to work with big endian machines, I didn't get any reports about actually using it. It would be interesting if it's actually working or not. You will probably need an IrDA dongle or something to test it.

i386 and alpha are little endian, arm can choose (but the NetWinder has been wired as a little endian machine). m68k, sparc and ppc are big-endian! mips can choose I think. If unsure, look in /usr/src/linux/asm/byteorder.h and check if it includes <linux/byteorder/big_endian.h> or <linux/byteorder/little_endian.h> .

2.6.4. SMP

Dag Brattli: "The problem ... has not been analyzed yet. It may be unsafe, and it may work pretty well. All upstream traffic should be safe (bh's), but downstream traffic _may_ be dangerous. I really don't know. ... All list operations irqueue.c in Linux-IrDA is currently SMP safe!". Please check the source code for the current status.

2.6.5. Hardware Surveys

There are some surveys about Linux and infrared capable devices in the WWW: