Linux Infrared HOWTO

Werner Heuser

Linux Mobile Edition  Edition

Version 3.7

TuxMobil

Berlin

$Date: 2005/10/08 14:29:43 $

The Infrared-HOWTO provides an introduction to Linux and infrared devices and how to use the software provided by the Linux/IrDA project. This package uses IrDA(TM) compliant standards. IrDA(TM) is an industrial standard for infrared wireless communication, and most laptops made after January 1996 are equipped with an IrDA(TM) compliant infrared transceiver. Infrared ports let you communicate with printers, modems, fax machines, LANs, and other laptops or PDAs. Speed ranges from 2400bps to 4Mbps.

The Linux/IrDA stack supports IrLAP, IrLMP, IrIAS, IrIAP, IrLPT, IrCOMM, IrOBEX, and IrLAN. Several of the protocols are implemented as both clients and servers. There is also support for multiple IrLAP connections, via several IrDA(TM) devices at once. The Linux/IrDA project started at the end of 1997 and experienced some major rewrites since then. Please don't expect every feature working straight yet. As far as I know Linux/IrDA is the only open source IrDA implementation available.

Remote Control (RC) via infrared is the aim of the Linux Infrared Remote Control - LIRC project, and also described in this HOWTO.

Copyright (c) 2000-2005 Werner Heuser. For all chapters permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being "Preface" and "Credits", with the Front-Cover Texts being "Linux Infrared HOWTO", and with the Back-Cover Texts being the section "About the Document and the Author". A copy of the license is included in the section entitled "GNU Free Documentation License".


Table of Contents
Preface
1. About the Document
2. Status of the Document
3. About the Author
I. IrDA
1. About the Linux/IrDA Project
2. Getting Started
3. Specific Connections and IrDA - Protocols
4. Hardware Supported by Linux/IrDA
5. Advanced Topics
II. Infrared Remote Control
6. Introduction
7. Linux Infrared Remote Control - LIRC
8. Lego Mindstorm
9. Serial Infrared Remote Controller
10. Infrared Tools for the COREL Netwinder PC
11. ir
12. irmctl
13. IRManager
14. irXxD
15. XR3
16. IR File Chooser
17. IControl
18. jlirc
19. lircemu
20. tonto
21. Infrared Remote Control ./. IrDA
III. Appendix
A. Credits
B. Revision History
C. Serial Infrared Port Sniffers
D. Infrared Light and Eye Safety
E. Copyrights, Disclaimer, Trademarks
List of Figures
5-1. IrDA Stack

Preface

 

Better red, than dead.

  Unknown AuthorEss

1. About the Document

This document is based on the documentation part of the Linux/IrDA project homepage and the Linux/IrDA Tutorial by Jean Tourillhes. I have also included material provided by the Linux/IrDA core team, the Linux/IrDA mailing lists and other sources.

The document is included in THE LINUX DOCUMENTATION PROJECT - TLDP .

The latest version of this document is available at TuxMobil-HOWTOs.

Mathieu Arnold provides an earlier version of the IR-HOWTO in French. A Japanese translation of issue v3.4 is provided by the Linux Japanese FAQ Project .

Please feel free to contact me for comments or questions about the HOWTO. I know this material is not finished or perfect, but I hope you find it useful anyway. For other questions and current information about Linux/IrDA please ask in the Linux/IrDA mailing list as explained below.

Werner Heuser <wehe_at_tuxmobil.org>


2. Status of the Document

The latest kernel I used is 2.4.19 and the latest irda-utils version is 0.9.15. I tried to check all information but I don't have all the necessary infrared hardware yet, so if something doesn't work for you, please don't blame me.

Warning

Former kernel and irda-utils versions need a completely different setup. Since I don't recommend to use former versions, all references to these setups are removed from this document. You may find some hints in the chapter Code History.

I have included all the changes to be in sync with the 2.4.x kernel series and the latest Linux/IrDA development now. Therefore some testing and proof-reading has still to be done. So please don't expect anything working straight out of the box.


3. About the Author

Since I have installed Linux on my first laptop (HP OmniBook 800CT), I am addicted to Linux and mobile computers. I have written the Linux-Mobile-Guide and founded TuxMobil: Linux with Laptops, Notebooks, PDAs, Mobile Phones and Portable Computers. I am also interested in upgrading, repairing and modding laptops or notebooks, disassembling and reassembling PDAs and HandHelds and taking apart and modding mobile (cell) phones. In May 2000 I have founded the German vendor Xtops.DE: Linux, Laptops, Notebooks, PDAs pre-installed, to sponsor the TuxMobil project.

I am also the author of the Linux-Ecology-HOWTO, which describes Linux as a means to save our environment, as well as founder of DataConv a survey of data conversion and migration tools.


Chapter 1. About the Linux/IrDA Project

1.1. Project History

The project started at the end of 1997 with the name Linux/IrDA. Due to some troubles with the name IrDA, which is trademarked by the Infrared Data Association IrDA , the name was changed to Linux/IR. At the end of 1998 the relationship between both became better and the name was changed to Linux/IrDA again. Since February 1999 the project is an official member of IrDA .

Companies and developers which are interested in joining these efforts should contact the Linux/IrDA Project or me at <wehe_at_tuxmobil.org>.


1.2. Code History

The Linux/IrDA project has undertaken some changes in the program code, which you should know to understand some possible confusions with older documentation, which you shouldn't use anyway.

Warning

Some caveats in the documentation have been caused by changes of the following concepts, device names and parameters. I hope I have got them alright now, they confused me sometimes, too. The new style stuff works from Kernel 2.2.15 / 2.4.0. Some important changes were made again in Kernel 2.6, not all of these are mentioned in this document yet, I will fix that hopefully soon. Anyway I recommend not to use any earlier kernel version than 2.6. This document will describe differences to the kernel 2.4 series in the appropriate places to provide documentation for situations where you must use kernel 2.4, which is hopefully rare. You should always use current Kernel, irda-utils and documentation.

  • For 2.0.x kernels Linux/IrDA support worked in a totally other way (only user-land programs) and is no longer supported by the Linux/IrDA project. Since 2.1.131 and 2.2.0 it is part of the kernel.

  • The major device number of the irda device changed from 61 to 161 (as far as I remember there was also a major number 60 around, too), also there have been different and now obsolete minor device numbers around, see the list of current device numbers below.

  • The irmanager is obsolete now, its tasks are now achieved by irattach.

  • The module name /dev/ircomm_tty changed to /dev/ircomm-tty , but there are other modules around which use either "-" or "_" in there names, this might be confusing.

  • The device names /dev/irnine and /dev/ircomm_new are obsolete.

  • IrLPT is handled by IrCOMM now. So all references to irlpt_server are obsolete.

  • From irda-utils 0.9.15 the behaviour of the -s option of irattach has changed. The option must not use the parameter 1 anymore.

  • The toshoboe driver for Toshiba laptops has been removed from 2.6 kernels.

  • Some important changes (e.g. for module names) were made in Kernel 2.6, these are not mentioned in this document yet, I will fix that hopefully soon.


Chapter 2. Getting Started

2.1. Software

The commands provided by the irda-utils package are the basic set of tools to get a working IrDA connection. The other tools (e-Squirt, IrNET, ..) are optional. Since version 0.9.15 manual pages are included. Most current manual pages are at TuxMobil.


2.1.1. IrDA-Utils

2.1.1.1. Compilation

  • Use the latest source of irda-utils available at Linux/IrDA Project. Also recommended is the latest glibc library. You may find out the current version with ldd --version. The use of the older libc5 library may lead to compile errors.

  • Untar the package with tar xvzf irda-utils<VERSION> . I recommend to do this in /usr/src.

  • Do a make clean (not necessary if you compile the package for the first time).

  • Do a make all to build the binaries.

  • Do a make install, this brings all commands into the right place and installs some config files in /etc/irda.

  • Sometimes, 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


2.1.1.2. Precompiled Packages

Debian/GNU Linux provides an irda-utils package since Potato. Also Mandrake since 6.1, Redhat since 6.1 and SuSE since 6.1 contain RPM packages of the irda-utils. Some caveat with precompiled packages might be some incompatibilities between kernel version and appropriate package version.


2.1.1.3. Contents of Linux/IrDA-Utils

2.1.1.3.1. irattach

irattach uses the module set as parameter; it can be a specific FIR driver: irattach toshoboe or ircomm (and then it loads the module aliased as "irda0" in /etc/modules.conf)

If you are one of the lucky people which have a FIR chipset that is supported, then you don't need to use irattach anymore. Now you just have to modprobe the driver.


2.1.1.3.2. irdadump

A program that displays all the frames sent, and received on the infrared link.

One advantage of implementing IrDA device drivers as network device drivers is that you should be able to attach sniffers to the device (or actually the packet type). That way, it is possible to use a really handy utility called irdadump (instead of tcpdump). This will make debugging MUCH easier. Linux-2.2 implements the BPF (Berkeley Packet Filter), so its possible to filter out exactly the frames you want to see.

Note: You probably have to be root for using irdadump . CONFIG_PACKET has to be enabled in the kernel. If compiled as a module you might load the module manually. irdadump has been converted into a library, so it can be used from GUI applications as well.

Here is a sample output of a small session between Linux and a Palm III. This log shows that the local irobex layer is not responding, so the Palm III sends a disc frame.

dagbnb /home/dagb/linux/irda-utils/irdadump/ # ./irdadump

20:18:15.305711 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=0
20:18:15.385597 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=1
20:18:15.465568 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=2
20:18:15.545953 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=3
20:18:15.625574 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=4
20:18:15.705575 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=5
20:18:15.785601 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=255,info=Linux
20:18:18.075526 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=0
20:18:18.225498 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=1
20:18:18.375495 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=2
20:18:18.526355 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=3
20:18:18.675614 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=4
20:18:18.676364 xid:rsp:saddr=0x05c589 > daddr=0xb50c14b,S=6,s=4
20:18:18.765506 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=5
20:18:18.927221 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=255,info=Palm III
20:18:18.975796 snrm:cmd,ca=0xfe,pf=1
20:18:18.976534 ua:rsp,ca=0x58,pf=1
20:18:18.977145 ua:rsp,ca=0x58,pf=1
20:18:19.585627 rr:rsp,ca=0x58,nr=0,pf=1
20:18:19.585810 rr:rsp,ca=0x58,nr=0,pf=1
20:18:19.606413 i:cmd,ca=0x58,nr=0,ns=0,pf=1
20:18:19.606582 rr:rsp,ca=0x58,nr=1,pf=1
20:18:19.627708 rr:cmd,ca=0x58,nr=0,pf=1
20:18:19.627871 i:rsp,ca=0x58,nr=1,ns=0,pf=1
20:18:19.650571 disc:cmd,ca=0x58,pf=1
20:18:19.650736 ua:rsp,ca=0x58,pf=1
20:18:21.165524 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=0
20:18:21.315608 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=1
20:18:21.315793 xid:rsp:saddr=0x05c589 > daddr=0xb50c14b,S=6,s=1
20:18:21.395499 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=2
20:18:21.545516 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=3
20:18:21.695500 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=4
20:18:21.845840 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=5
20:18:22.007222 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=255,info=Palm
III
20:18:22.056143 snrm:cmd,ca=0xfe,pf=1
20:18:22.056310 ua:rsp,ca=0xc8,pf=1
20:18:22.056381 ua:rsp,ca=0xc8,pf=1

37 pacckets received by filter


2.1.1.3.3. irdaping

Makes it possible to try and ping a remote device using IrDA test frames. Not all devices implement support for test frames. This is a program similar to ping(8). It sends IrDA test frames, enriched by some userdata which contain the frame number and the time the frame was sent. You can also change the size of the frame by using the -s option. You must supply an IrDA device address, and not an IP address. You have to be able to get that device address by using irdadump.

Here is one output sample (pinging an ACTiSYS IR-100M):

dagbnb /home/dagb/linux/irda-utils/irdaping/ # ./irdaping 0xf7be8388
IrDA ping (0xf7be8388): 32 bytes
32 bytes from 0xf7be8388: irda_seq=0 time=102.466003 ms.
32 bytes from 0xf7be8388: irda_seq=1 time=102.202003 ms.
32 bytes from 0xf7be8388: irda_seq=2 time=102.170998 ms.
32 bytes from 0xf7be8388: irda_seq=3 time=101.633003 ms.

4 packets received by filter

Christian Gennerat "I use an alias which does not use any parameter (in $HOME/.bashrc): alias irping="irdaping \`grep daddr /proc/net/irda/discovery|sed s/.*daddr://\`" It works fine when there is only one discovered client."


2.1.1.3.4. irkbd

Implements support for the mouse and keyboard protocol as used by the Tekram IR-660 infrared docking station. For details on how to use external keyboards with Linux PDAs see below.


2.1.1.3.5. findchip

Tries to find out which FIR IrDA chipset your machine is using. Try out findchip -v to check it out. For other methods to detect the chipset see below.


2.1.1.3.6. irsockets

A collection of programs which uses IrDA sockets.


2.1.1.3.7. irpsion5

File transfer program for exchanging files with your Psion PDA.


2.1.1.3.8. /etc/irda

This directory contains the configuration file irda.conf. You may for example configure the serial port for the SIR driver. For first testing you should try the SIR driver.


2.1.2. openobex

The overall goal of the OpenOBEX project is to make an open source implementation of the Object Exchange (OBEX) protocol. OBEX is a session protocol and can best be described as a binary HTTP protocol. OBEX is builtin in devices like PDA's like the Palm Pilot, and mobile phones like the Ericsson R320, Siemens S25, Siemens S45, Siemens ME45, Nokia NM207 and Nokia 9110 Communicator. OBEX is optimised for ad-hoc wireless links and can be used to exchange all kind of objects like files, pictures, calendar entries (vCal) and business cards (vCard). A typical application is the "beam" function of PalmOS.


2.1.3. e-squirt

e-Squirt is a simple protocol for sending URLs over the IrDA medium. This allows for interaction with CoolTown enabled devices.


2.1.4. IrNET for Linux-IrDA

IrNET is a protocol allowing to carry TCP/IP traffic between two IrDA peers in an efficient fashion. It is a thin layer, passing PPP packets in a IrTTP socket. It uses PPP in synchronous mode for efficiency, and offers lots of flexibility and various features. The main part of IrNET in included in kernel 2.4.x, and a user-space daemon (to automate connections) is available on the web page.


2.1.5. Java - IrDA Interface

This Java Infrared Socket API provides a way of communicating through infrared medium on a linux machine using Java. Thus, Java application developers can develop applications involving infrared access much easily. The API is very similar to java.net.Socket API and has been implemented using the Linux infrared stack. Both connection oriented streams (IrSocket and IrServerSocket) and connectionless Ultra (UltraSocket, UltraPacket) interfaces are available.


2.2. Kernel

2.2.1. Preface

Please read the Kernel-HOWTO from TLDP to get more information about the compilation process. Thomas Hertweck has written another useful Linux-Kernel-HOWTO (but it is only available in German and Italian). Check the Linux/IrDA Project or the Linux/IrDA mailing list archives for latest patches.

You'll find the Linux/IrDA Kernel code in:

/usr/src/linux/net/irda (protocol stuff)

/usr/src/linux/drivers/net/irda (device drivers)

/usr/src/linux/include/net/irda (header files)


2.2.2. General Parameters

Make sure you use kernel 2.6 sources. I recommend not to use any earlier kernel version, but this document will describe differences to the kernel 2.4 series in the appropriate places. If unsure about your kernel version try uname -r.

For current 2.6 kernels there are no patches necessary. In case there is a kernel patch from the Linux/IrDA project or other places to apply (for example for kernel 2.4), put it into the directory /usr/src or where else your kernel sources live and apply something like (replace patch-2_4.0-irdaXXX with the actual file name):

cd /usr/src
tar xvzf patch-2_4.0-irdaXXX.tar.gz
cd linux
patch -p1 -l < ../patch-2_4.0-irdaXXX
For latest drivers experimental support has to be enabled CONFIG_EXPERIMENTAL, at least in kernel 2.4.

Enable sysctl in "General Setup" CONFIG_SYSCTL.

You should have proc file system support CONFIG_PROC_FS.

Also serial support for the SIR features CONFIG_SERIAL.

I am not sure whether there has to be printer support for using a printer with Linux/IrDA CONFIG_PRINTER. But I assume this feature is not necessary.

Networking support _must_ be enabled CONFIG_NET.

Make sure you have module support CONFIG_MODULES in your kernel! Test it e.g. with lsmod.

Also kerneld support CONFIG_KERNELD. But kmod (CONFIG_KMOD) also works. A monolithic kernel seems to work, too. But modules are highly recommended!

To use irdadump you probably have to set CONFIG_PACKET.

If you only apply the Linux/IrDA patch, you should not have to do a make clean, so that should save you some time. I suggest you do something like this:

For kernel 2.4 use: make dep && make all && make modules && make install && make modules_install. For kernel 2.6 use: make all && make install && make modules_install. If you get really strange errors, then try to rebuild from scratch after a make clean.


2.2.3. IrDA Specific Parameters

The following is from ../linux-2.4.3/Documentation/Configure.help (kernel 2.4) or ../linux-2.6.x/net/irda/Kconfig, ../linux-2.6.x/drivers/net/irda/Kconfig (kernel 2.6) with some modifications by me. Please consult the latest available kernel documentation for current information and new drivers.


2.2.3.1. IrDA subsystem support

CONFIG_IRDA Say Y here if you want to build support for the IrDA (TM) protocols. The Infrared Data Associations (tm) specifies standards for wireless infrared communication and is supported by most laptops and PDA's.

To use Linux support for the IrDA (tm) protocols, you will also need some user-space utilities like irattach . For more information, see the file Documentation/networking/irda.txt. You also want to read the InfraRed-HOWTO, available at TuxMobil .

This support is also available as a module called irda.o. If you want to compile it as a module, say M here and read Documentation/modules.txt.

IrDA Cache last LSAP

CONFIG_IRDA_CACHE_LAST_LSAP Say Y here if you want IrLMP to cache the last LSAP used. This makes sense since most frames will be sent/received on the same connection. Enabling this option will save a hash-lookup per frame.

If unsure, say Y.

IrDA Fast RR's

CONFIG_IRDA_FAST_RR Say Y here is you want IrLAP to send fast RR (Receive Ready) frames when acting as a primary station. This will make IrLAP send out a RR frame immediately when receiving a frame if its own transmit queue is currently empty. This will give a lot of speed improvement when receiving much data since the secondary station will not have to wait the max. turn around time before it is allowed to transmit the next time. If the transmit queue of the secondary is also empty the primary will back off waiting longer for sending out the RR frame until the timeout reaches the normal value. Enabling this option will make the IR-diode burn more power and thus reduce your battery life.

If unsure, say N.

IrDA Debug

CONFIG_IRDA_DEBUG Say Y here if you want the IrDA subsystem to write debug information to your syslog. You can change the debug level in /proc/sys/net/irda/debug

If unsure, say Y (since it makes it easier to find the bugs).

IrLAP Compression support

CONFIG_IRDA_COMPRESSION Compression is _not_ part of the IrDA(tm) protocol specification, but it's working great! Linux is the first to try out compression support at the IrLAP layer. This means that you will only benefit from compression if you are running a Linux <-> Linux configuration.

If you say Y here, you also need to say Y or M to a compression protocol below.

IrLAP Deflate Compression Protocol (EXPERIMENTAL)

CONFIG_IRDA_DEFLATE Say Y here if you want to build support for the Deflate compression protocol. The deflate compression (GZIP) is exactly the same as the one used by the PPP protocol.

If you want to compile this compression support as a module, say M here and read Documentation/modules.txt. The module will be called irda_deflate.o.

IrLAN Protocol But currently the IrLAN protocol is no longer maintained by the Linux/IrDA core team.

CONFIG_IRLAN Say Y here if you want to build support for the IrLAN protocol. If you want to compile it as a module (irlan.o), say M here and read Documentation/modules.txt. IrLAN emulates an Ethernet and makes it possible to put up a wireless LAN using infrared beams.

The IrLAN protocol can be used to talk with infrared access points like the HP NetbeamIR, or the ESI JetEye NET. You can also connect to another Linux machine running the IrLAN protocol for ad-hoc networking!

IrCOMM Protocol

CONFIG_IRCOMM Say Y here if you want to build support for the IrCOMM protocol. If you want to compile it as a module (you will get ircomm.o and ircomm-tty.o), say M here and read Documentation/modules.txt. IrCOMM implements serial port emulation, and makes it possible to use all existing applications that understands TTY's with an infrared link. Thus you should be able to use application like PPP, minicom and others. Enabling this option will create two modules called ircomm and ircomm-tty.


2.2.3.2. Device Drivers

IrTTY IrDA Device Driver

CONFIG_IRTTY_SIR Say Y here if you want to build support for the IrTTY line discipline. If you want to compile it as a module (irtty.o), say M here and read Documentation/modules.txt. IrTTY makes it possible to use Linux's own serial driver for all IrDA ports that are 16550 compatible. Most IrDA chips are 16550 compatible so you should probably say Y to this option. Using IrTTY will however limit the speed of the connection to 115200 bps (IrDA SIR mode)

If unsure, say Y.

IrPORT IrDA Device Driver

CONFIG_IRPORT_SIR Say Y here if you want to build support for the IrPORT IrDA device driver. If you want to compile it as a module (irport.o), say M here and read Documentation/modules.txt. IrPORT can be used instead of IrTTY and sometimes this can be better. One example is if your IrDA port does not have echo-canceling, which will work OK with IrPORT since this driver is working in half-duplex mode only. You don't need to use irattach with IrPORT, but you just insert it the same way as FIR drivers (insmod irport io=0x3e8 irq=11). Notice that IrPORT is a SIR device driver which means that speed is limited to 115200 bps.

If unsure, say Y.

Winbond W83977AF IrDA Device Driver

CONFIG_WINBOND_FIR Say Y here if you want to build IrDA support for the Winbond W83977AF super-io chipset. This driver should be used for the IrDA chipset in the Corel NetWinder. The driver supports SIR, MIR and FIR (4Mbps) speeds.

If you want to compile it as a module, say M here and read Documentation/modules.txt. The module will be called w83977af_ir.o.

NSC PC87108 IrDA Device Driver

CONFIG_NSC_FIR Say Y here if you want to build support for the NSC PC87108 and PC87338 IrDA chipsets. This driver supports SIR, MIR and FIR (4Mbps) speeds.

If you want to compile it as a module, say M here and read Documentation/modules.txt. The module will be called nsc-ircc.o.

Toshiba Type-O IR Port Device Driver

CONFIG_TOSHIBA_FIR Say Y here if you want to build support for the Toshiba Type-O IR chipset. This chipset is used by the Toshiba Libretto 100CT, and many more laptops. If you want to compile it as a module, say M here and read Documentation/modules.txt. The module will be called toshoboe.o.

SMC IrCC (Experimental)

CONFIG_SMC_IRCC_FIR Say Y here if you want to build support for the SMC Infrared Communications Controller. It is used in the Fujitsu Lifebook 635t and Sony PCG-505TX. If you want to compile it as a module, say M here and read Documentation/modules.txt. The module will be called smc-ircc.o.

ALi M5123 FIR Controller Driver (Experimental)

CONFIG_ALI_FIR Say Y here if you want to build support for the ALi M5123 FIR Controller. The ALi M5123 FIR Controller is embedded in ALi M1543C, M1535, M1535D, M1535+, M1535D South Bridge. This driver supports SIR, MIR and FIR (4Mbps) speeds.

If you want to compile it as a module, say M here and read Documentation/modules.txt. The module will be called ali-ircc.o.

Serial dongle support

CONFIG_DONGLE Say Y here if you have an infrared device that connects to your computer's serial port. These devices are called dongles. Then say Y or M to the driver for your particular dongle below.

Note that the answer to this question won't directly affect the kernel: saying N will just cause this configure script to skip all

ESI JetEye PC Dongle

CONFIG_ESI_DONGLE Say Y here if you want to build support for the Extended Systems JetEye PC dongle. If you want to compile it as a module, say M here and read Documentation/modules.txt. The ESI dongle attaches to the normal 9-pin serial port connector, and can currently only be used by IrTTY. To activate support for ESI dongles you will have to start irattach like this: irattach -d esi.

ACTiSYS IR-220L and IR220L+ dongle

CONFIG_ACTISYS_DONGLE Say Y here if you want to build support for the ACTiSYS IR-220L and IR220L+ dongles. If you want to compile it as a module, say M here and read Documentation/modules.txt. The ACTiSYS dongles attaches to the normal 9-pin serial port connector, and can currently only be used by IrTTY. To activate support for ACTiSYS dongles you will have to start irattach like this: irattach -d actisys or irattach -d actisys+.

Tekram IrMate 210B dongle

CONFIG_TEKRAM_DONGLE Say Y here if you want to build support for the Tekram IrMate 210B dongle. If you want to compile it as a module, say M here and read Documentation/modules.txt. The Tekram dongle attaches to the normal 9-pin serial port connector, and can currently only be used by IrTTY. To activate support for Tekram dongles you will have to start irattach like this: irattach -d tekram.

Greenwich GIrBIL dongle

CONFIG_GIRBIL_DONGLE Say Y here if you want to build support for the Greenwich GIrBIL dongle. If you want to compile it as a module, say M here and read Documentation/modules.txt. The Greenwich dongle attaches to the normal 9-pin serial port connector, and can currently only be used by IrTTY. To activate support for Greenwich dongles you will have to insert irattach -d girbil in the /etc/irda/drivers script.

Parallax Litelink dongle

CONFIG_LITELINK_DONGLE Say Y here if you want to build support for the Parallax Litelink dongle. If you want to compile it as a module, say M here and read Documentation/modules.txt. The Parallax dongle attaches to the normal 9-pin serial port connector, and can currently only be used by IrTTY. To activate support for Parallax dongles you will have to start irattach like this irattach -d litelink.

Old Belkin dongle

CONFIG_OLD_BELKIN_DONGLE Say Y here if you want to build support for the Adaptec Airport 1000 and 2000 dongles. If you want to compile it as a module, say M here and read Documentation/modules.txt. The module will be called old_belkin.o. Some information is contained in the comments at the top of drivers/net/irda/old_belkin.c.


2.2.4. Current Kernel Patches

Note: donauboe is a new version of toshoboe better FIR support and compatibility with Donauoboe chip from lib-irda. Note: the toshoboe drivers has been removed from the 2.6 kernel series.


2.3. Kernel Module Options

This survey of module options was generated with the modinfo command.


actisys.o
Dag Brattli <dagb_at_cs.uit.no> - Jean Tourrilhes <jt_at_hpl.hp.com>
ACTiSYS IR-220L and IR-220L+ dongle driver

ali-ircc.o
Benjamin Kong <benjamin_kong_at_ali.com.tw>
ALi FIR Controller Driver
io int array (min = 1, max = 4), description "Base I/O addresses"
irq int array (min = 1, max = 4), description "IRQ lines"
dma int array (min = 1, max = 4), description "DMA channels"

esi.o
Dag Brattli <dagb_at_cs.uit.no>
Extended Systems JetEye PC dongle driver

girbil.o
Dag Brattli <dagb_at_cs.uit.no>
Greenwich GIrBIL dongle driver

irport.o
Dag Brattli <dagb_at_cs.uit.no>
Half duplex serial driver for IrDA SIR mode
io int array (min = 1, max = 4), description "Base I/O adresses"
irq int array (min = 1, max = 4), description "IRQ lines"

irtty.o
Dag Brattli <dagb_at_cs.uit.no>
IrDA TTY device driver
qos_mtt_bits int, description "Minimum Turn Time"

litelink.o
Dag Brattli <dagb_at_cs.uit.no>
Parallax Litelink dongle driver

nsc-ircc.o
Dag Brattli <dagb_at_cs.uit.no>
NSC IrDA Device Driver
qos_mtt_bits int, description "Minimum Turn Time"
io int array (min = 1, max = 4), description "Base I/O addresses"
irq int array (min = 1, max = 4), description "IRQ lines"
dma int array (min = 1, max = 4), description "DMA channels"
dongle_id int, description "Type-id of used dongle"

old_belkin.o
Jean Tourrilhes <jt_at_hpl.hp.com>
Belkin (old) SmartBeam dongle driver

smc-ircc.o
Thomas Davis <tadavis_at_jps.net>
SMC IrCC controller driver
ircc_dma int, description "DMA channel"
ircc_irq int, description "IRQ line"

tekram.o
Dag Brattli <dagb_at_cs.uit.no>
Tekram IrMate IR-210B dongle driver

toshoboe.o
James McKenzie <james_at_fishsoup.dhs.org>
Toshiba OBOE IrDA Device Driver
max_baud int

w83977af_ir.o
Dag Brattli <dagb_at_cs.uit.no>
Winbond W83977AF IrDA Device Driver
qos_mtt_bits int, description "Mimimum Turn Time"
io int array (min = 1, max = 4), description "Base I/O addresses"
irq int array (min = 1, max = 4), description "IRQ lines"

irda.o
Dag Brattli <dagb_at_cs.uit.no>
The Linux IrDA Protocol Subsystem
irda_debug_R07c03e02 long

irlan.o
Dag Brattli <dagb_at_cs.uit.no>
The Linux IrDA LAN protocol
eth int, description "Name devices ethX (0) or irlanX (1)"
access int, description "Access type DIRECT=1, PEER=2, HOSTED=3"

   But currently the IrLAN protocol is no longer maintained
   by the Linux/IrDA core team.

ircomm-tty.o
Dag Brattli <dagb_at_cs.uit.no>
IrCOMM serial TTY driver

ircomm.o
Dag Brattli <dag_at_brattli.net>
IrCOMM protocol

irnet.o
<none>
<none>


2.4. Configuration

2.4.1. Device Numbers


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*
There might be some other device number necessary if you want to use the irkbd features. You may find the latest device numbers in ../src/linux/Documentation/devices.txt.


2.4.2. Device Arrangement

First you should put your IrDA devices in range. Though it might be possible that the Linux/IrDA service detects every new device automagically I only have good experience with the devices in range during the configuration process.

Keep your infrared devices together in a range below one meter and an angle of 30 degree. There has to be a direct line of sight between them. If this is not possible, you may use a mirror (an unused M$ CD should work quite good).


2.4.3. /etc/modules.conf

Add the following lines to your /etc/modprobe.conf (for kernel 2.4 /etc/modules.conf) file (attention: the actual filename may depend on your Linux distribution):

# IrDA over a normal serial port, or a serial port compatible IrDA port (SIR)
alias tty-ldisc-11 irtty

# IrCOMM (for printing, PPP, Minicom etc)
alias char-major-161 ircomm-tty     # if you want IrCOMM support

# IRLAN
# But currently the IrLAN protocol is no longer maintained
# by the Linux/IrDA core team.
alias irlan0 irlan

# To be able to attach some serial dongles
# 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

# To use the FIR driver. This applies only to the specific device!!!

#options nsc-ircc dongle_id=0x09	# NSC driver on a IBM Thinkpad laptop
#options nsc-ircc dongle_id=0x08	# HP Omnibook 6000
#alias irda0 nsc-ircc

# options smc-ircc ircc_irq= ircc_dma=
# alias irda0 smc-ircc

# options toshoboe max_baud=
# alias irda0 toshoboe

# options w83977af_ir io= io2= irq= qos_mtt_bits=
# alias irda0 w83977af_ir

# IrNET module...
alias char-major-10-187 irnet       # Official allocation of IrNET
Then do a depmod -a to update, and then all IrDA modules should be automagically loaded when you need them. Note for testing reasons you may load them manually, but please make sure not to load them twice. There might be some other entries necessary, if you want to use the irkbd features or an USB dongle. A template file is included in the irda-utils package.

Note: With Debian GNU/Linux however you shouldn't edit /etc/modules.conf directly, instead place the lines inside /etc/modutils/irda-utils and run update-modules afterwards. Running update-modules seems obsolete for 2.6 kernels.


2.4.4. /etc/irda

Have a look into the files in /etc/irda. Edit them to reflect your setup.


2.4.5. BIOS Configuration

Make sure your infrared port is enabled in the BIOS and check what interrupt and port address it uses. With some laptops it seems necessary to have Microsoft-Windows installed to be able to set BIOS parameters.

I have got reports, that on some laptops, when connected to a docking station, the infrared port was disabled .


2.4.6. Serial Port

Please decide first whether you want to set up Irda either in SIR or in FIR mode. It is recommended to start with SIR.


2.4.6.1. SIR

Choose the ttySx according to your SIR port. Hint: dmesg | grep tty (for details see the chapter Starting the IrDA Stack below).

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.


2.4.6.2. FIR

If you don't succeed with SIR (which seems a rare case) you may try FIR. First look up the BIOS. To avoid some conflicts with serial devices you should do setserial /dev/ttySx uart none. Note: never use setserial /dev/ttySx uart none, when setting up IrDA in SIR mode.

From Florian Lohoff You should also set "port 0x0 irq 0" otherwise you will see interesting effects if there is suddenly a different S1 e.g. by inserting a modem PCMCIA card. The serial driver will then touch the OLD ports without having acquired those which will cause the irda stuff to die/hang. This is a bug i havent been able to find in the serial driver but it definitly exists (Put a printk into the serial_out serial_in stuff).


2.4.7. Resource Conflicts: IRQ, IO

Is some cases IRQ conflicts may occur, especially conflicts with sound, PCMCIA or the hotplug system have been reported. Check cat /proc/interrupts to get some information about IRQ usage on your machine.


2.4.8. Starting IrDA

Most important, you must sync your disks!!! Maybe you have to reboot your machine. Have you read the disclaimer?

There are three sorts of low level drivers: SIR, FIR and dongle for machines without an in-built InfraRed port. To start with Linux/IrDA I recommend to use the SIR method.

Load the modules modprobe irda irtty. irattach /dev/ttyS1 -s to attach the IrDA device to the IrDA services. Check lsmod and dmesg.

irdadump should show all available IrDA devices in range now. Hint: If you are connecting different Linux boxes, you may use hostname YOUR_HOSTNAME to set a unique hostname for each computer.

On the "server" side do pppd /dev/ircomm0 LOCAL_IP:REMOTE_IP On the "client" side do pppd /dev/ircomm0 .

You may now test the connection with ping. And use all sorts of networking connections (ssh, NFS, ...) now.


Chapter 3. Specific Connections and IrDA - Protocols

3.1. Starting the IrDA Stack

There are three sorts of low level drivers: SIR, FIR and dongle.


3.1.1. Standard InfraRed - SIR

  • Try to find out which serial port is used by the IR device. You may do so by watching the output of dmesg. If serial support is modularized do an modprobe serial first. Look for an entry 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
    
    If this is not the case, you either don't have infrared support enabled in the BIOS or the SIR mode of your infrared device is not detected by the kernel. Currently I know only two laptop models with this effect, the HP OmniBook 800 and the Toshiba Libretto models. I am not sure whether PnP support effects the detection of the IR port. If you are unsure try it out and let me know the results. Maybe you can use FIR mode if SIR doesn't work.

  • In some situations you may have to use setserial /dev/ttyS<0-2> port 0xNNNN irq M to set the values for your infrared serial port, especially if the infrared port is a separate serial line. You usually don't need to change the values! For further information look into the FAQ section below.

  • If you don't use kerneld or kmod insert the irda module with modprobe irda.

  • Do lsmod. It should show the modules irda and irtty now.

  • A look into /var/log/messages should show the entry "Serial connection established" now.

  • Give irattach some time, e.g. seven seconds, to detect other IR devices. Then watch the output from the kernel that you will hopefully get in /var/log/messages. It should look like the following (I removed some lines, which were not related to Linux/IrDA):
    
Jan  2 12:57:26 japh kernel: ttyS00 at 0x03f8 (irq = 4) is a 16550A
    Jan  2 12:57:26 japh kernel: ttyS02 at 0x03e8 (irq = 4) is a 16550A
    Jan  2 12:57:26 japh kernel: Linux Support for the IrDA (tm) protocols (Dag Bra
    ttli)
    Jan  2 12:59:09 japh syslog: executing: 'echo 1 > /proc/sys/net/irda/discovery'
    Jan  2 12:59:09 japh syslog: Setting discovery to 1 exited with status 1
    Jan  2 12:59:09 japh syslog: + 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
    Jan  2 12:59:09 japh syslog: + 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
    Jan  2 12:59:09 japh syslog: Serial connection established.
    Jan  2 12:59:09 japh kernel: IrDA irda_device irda0 registered.
    Jan  2 13:01:22 japh syslog: executing: './drivers start '
    Jan  2 13:01:22 japh syslog: Serial connection established.
    Jan  2 13:01:42 japh syslogd: Printing partial message
    Jan  2 13:01:42 japh 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
    Jan  2 13:02:49 japh kernel: IrDA Discovered: japh
    Jan  2 13:02:49 japh kernel:     Services: Computer
    

  • Even more information you can get with cat /proc/net/irda/discovery .


3.1.2. Fast InfraRed - FIR

The IrDA(TM) standard knows three kinds of speeds:

  • SIR = Standard IrDA, up to 115kbps IrDA,

  • MIR = Medium Speed IrDA,

  • FIR = Fast IrDA (4Mbps),

  • VFIR = Very Fast IrDA(16Mbps), seems to become a future standard

Up to 115.200bps (SIR) many (probably all) infrared controllers work like a serial port and use a RZI (return to zero, inverted) modulation. Not every infrared controller supports 4Mps (FIR), up to 4Mbps they have to use 4PPM (4 pulse position) modulation technique. A list of supported FIR chips is included in /usr/src/linux/drivers/net/irda/Kconfig. You may start the FIR service by loading the according module. Linux/IrDA will probe your hardware then. More drivers are under development.

So what speeds can you expect? Using SIR, you should be able to get about 10 Kbytes/s. Using FIR (4Mbps) you can get over 300 Kbytes/s (if you are lucky).


3.1.3. Dongle Connection - Infrared Adapters for the Serial Port

A survey of supported dongles is included in /usr/src/linux/drivers/net/irda/Kconfig.

Dag Brattli wrote (modified by wh): "To use dongles you have to do something like this:

modprobe tekram         # or esi or actisys
irattach -d tekram      # or -d esi or -d actisys
modprobe is not necessary, if /etc/modules.conf is correct. As you can see, you must still use the -d option with irattach since it is possible to have two serial ports using different dongles at the same time (so the tty you are binding must know which dongle it is supposed to use). So if you have two dongles and two serial ports, you could do something like this:

modprobe tekram
modprobe esi
irattach /dev/ttyS0 -d esi &
irattach /dev/ttyS1 -d tekram &
PS: I would not try to turn the two dongles against each other, since I really don't know how the stack would react :-) ... Since I don't have any of these new ACTiSYS 220L+ dongles, I'm not able to test it. Since the new dongle has support for one extra speed (38400bps), you must specify the dongles differently with irattach so that the kernel knows which dongle you are using (and what QoS can be used):

irattach /dev/ttyS0 -d actisys     # for the 220L dongle
irattach /dev/ttyS0 -d actisys+    # for the 220L+ dongle
The current implementation of dongle support does not have any state associated with it, so its not possible to use both ACTiSYS dongles (220L and 220L+) at the same time (connected to two serial ports) for now. If someone needs to be able to do so, please mail me (Dag Brattli) and I will think about it!"

Note: When I tried to use an infrared modem (Swissmod 56Ki, manufactured by Telelink AG) connected to my laptop (IrDA works with Microsoft-Window$95 only, due to non-standard hardware) I had to remove the infrared support in the BIOS to get it working!

Dag Brattli: "It is now possible to use irport instead of irtty! I have moved all the dongle stuff out of irtty and into irda_device, so it will also be possible to attach dongles to irport. Need however to make a small user-space utility dongle_attach that can be used to attach dongles to a specific driver instance. BTW: irattach is still working as before, and you will not notice the difference even when attaching dongles to irtty (I've just redirected the dongle ioctl to irda_device). Irport may be interesting since you avoid one software interrupt (bh) level, and it's also forced to work in half duplex mode so you don't get any echo if the irda port itself don't have echo-cancellation (Girbil dongle and HP-4000 etc) ... To use it, you must supply the parameters to modprobe like this: modprobe irport io=0x3f8 irq=4, or whichever values you use. You can also add these parameters to /etc/modprobe.conf (kernel 2.6) or /etc/modules.conf (kernel 2.4) like this: options irport io=0x3f8 irq=4, but then you must remember to do a depmod -a and use modprobe irport instead of modprobe."

Alvin Loh: "Anyone with a ESI 9680C can use both parallax's and ESI's signalling scheme, meaning they can use Parallax's driver with ESI9680C to work. "


3.1.4. Dongle Connection - Infrared Adapters for the USB Port

Not every USB dongle does work. For details see the dedicated chapter below IrDA and USB.


3.1.5. Dongle Connection - Infrared Motherboard Adapter

Support for e.g. the ACTiSYS IR2000 dongle has been implemented.

From James I have this description about setting up the hardware: There are two configurations, a five pin in line connector and a 6 pin DIL (at the end of a 18 pin DIL header). Basically any IrDA compatible transceiver will work (I have a stack of old IRM3001 these are now obselete) you need to hook a capacitor (use a tantalum about ~1uF) between 5V and 0V near the transceiver and then connect everthing else up (RX->RX, TX->TX, 5V->5V, and 0V-0V). If you don't like soldering irons, lots of companies do sell IR modules for the 5 pin connectors that fit into a hole in your case.


3.2. Printer Connection

Prepare Linux/IrDA as described above. Especially check for the existence of /dev/irlpt* (if it doesn't exists do as root mknod /dev/irlpt0 c 161 16). Now you may perform a first and simple test. Try to write a small file to /dev/irlpt0 by cat FILE >/dev/irlpt0. Do not wonder about a bad format (the lines form sort of steps) this is just a first check. If this doesn't work please check the permissions of /dev/irlpt0. Watch whether the connection indicator of your printer shows activity, e.g. the green light above the InfraRed port of a HP 6P/MP comes on (lower left hand corner, near the paper tray).

The cat command will not produce formatted output, but is useful for testing. If it works, you may set up an IrDA capable printer depending on your printer system. See the documentation, e.g. the Printing-HOWTO from LinuxPrinting.org for detailed information.

With the Common Unix Printing System - CUPS use for example with a HP LaserJet 2100:

lpadmin -p IRDA_PRINTER_NAME -v parallel:/dev/irlpt0 -E -m de/hp2100_6.ppd.gz
To get a list of paths to your ppd files use lpinfo -m.

Of course other printing systems will also work, e.g. you may edit /etc/printcap and include irlpt0 as the printer device.

The better way is to change your /etc/printcap to use /dev/irlpt0 in addition or instead of /dev/lp1.

For easy printer setup you may use a printing software like APSFILTER, MagicFilter EZ-Magic (with RedHat there should also be a GUI for this purpose). Make a copy of /etc/printcap before.

Example for APSFILTER with a HP 6P (non-postscript, HP 6MP is with postscript). The two relevant questions are: "Do you have a (s)serial or a (p)arallel printer interface?" Answer "p" "What's the device name for your parallel printer interface?" Answer "/dev/irlpt0"

Restart the print daemon with kill -HUP <PID of lpd>. If you use another print daemon choose the according command.


3.3. LAN Connection - IrLAN

You might connect your Linux box using IrLAN to another network device such as a Linux box with IrLAN, a HP NetBeamer or a Microsoft-Windows95 box with Infrared Network Device support. But this protocol is no longer maintained by the Linux/IrDA core team.


3.4. HP NetBeamer Connection

As far as I know this device uses IrLAN. But currently this protocol is no longer maintained by the Linux/IrDA core team.


3.5. Palm III Connection - IrCOMM

  • PPP Rui Oliveira wrote: "This is just to let you know that with the latest IrCOMM patch (050998) of Takahide Higuchi, I managed to HotSync and establish a PPP connection between my Palm III and my Linux box. I'm using IRLink (from IsComplete) to redirect the serial port to ir. Communication with pilot-xfer (available from the "pilot-link" package at kpilot ) works flawlessly. Although I was able to establish a PPP connection, I'm still unable to fetch mail and do Web browsing. This is probably due to connection time-outs. I am checking this out. Please see the PPP-HOWTO for further information about PPP. I managed to establish an apparently robust connection between my Linux box and a Palm III. The pppd invocation I use is as follows:
    
   /usr/sbin/pppd /dev/ircomm0 57600 192.168.2.10:192.168.2.11
       proxyarp passive silent persist noauth local nodetach
    
    Over the PPP connection I used ping, ssh, and HTTP. Strange is however the fact that discovery must be enabled (maybe obsolete) . Otherwise, even with an active IrCOMM connection, the link goes down due to a IrLAP disconnect. The pilot-link tools (used for Linux/Palm synchronization) also ran flawlessly over IrCOMM via /dev/ircomm0." There are also reports about kpilot, though not working as flawlessly as pilot-xfer.

  • IrCOMM Jon Howell wrote: "I thought I'd try IrCOMM, since the Palm III can be made to reroute serial info to the IR port (using IrLink from IS/Complete, available at PalmCentral , and then you can run a terminal program (like PalmTelnet in serial mode) over IrDA. I can only assume it's using the IrCOMM protocol. I've tested this configuration between two Palm Pilots, but of course I can't know what the protocol running over the IR is." (1) Start HotSync on your Palm. You need the IrDA upgrade for the Palm to have IrCOMM support (2) Place the Palm in front of the dongle. (3) Start pilot-xfer -p /dev/ircomm0 -s <sync-dir> . And if you are lucky it will start syncing. If you start pilot-xfer before you start HotSync on the Pilot, you will _not_ be lucky! Maybe a terminal program like PalmTerm or MiniTerm (a former version of this HOWTO referred to it as MTerm) is also useful.

Wessel de Roode wrote: The Palmpilot is default locked on 57k. You can however if you write your own software for the Pilot, use the 115k line settings. I quote a part from the irlib.h:

---------- irlib.h from the SDK 3.0 from palmpilot -----
// Options values for IrOpen
#define irOpenOptBackground     0x80000000   // Unsupported background task use
#define irOpenOptSpeed115200    0x0000003F   // sets max negotiated baud rate
#define irOpenOptSpeed57600     0x0000001F   // default is 57600
#define irOpenOptSpeed9600      0x00000003
Peter Pregler reported: If the Palm enters the range of the irda-device a popup appears with the text "Transmission: waiting for sender"

Ron Choy answered: There is a software called ShutupIR that is supposed to help with this problem of annoying popup I haven't tried it but it looks like it would fix your problem.


3.6. Linux Terminal on Palm (Handspring Visor) via IR

by Chris Morris on Linux/IrDA list: In addition to using IrDA to hotsync my Handspring Visor I got my Handspring visor to work as a Linux text terminal via infrared last night. My computer is a Dell Inspiron 3800 (BTW I wracked my brains for weeks trying to get IR to work. The whole problem was caused by Linux looking at the wrong IRQ for ttyS3 . ). I am using Beam Sync for Visor V1.0b2 by Hacker Dude-san (in Japanese) and MiniTerm (a former version of this HOWTO referred to it as MTerm) by Shigeyuki Seko . On the laptop I have IrDA set to SIR mode and COM 3 via BIOS. I have to set /dev/ttyS3 to IRQ3 via setserial /dev/ttyS3 irq 3 on boot up. After boot up I do a:

/sbin/modprobe irda
/sbin/modprobe irtty
/sbin/modprobe ircomm
/sbin/ircomm-tty
/usr/sbin/irattach /dev/ttyS3 -s
cat /proc/net/irda/discovery shows the visor as IrComm Now /etc/mgetty+fax/mgetty.conf has to have these options: port ttyS3 direct y speed 9600 , faster maybe possible but only 9600 worked for me so far toggle-dtr n Then in /etc/inittab: palm:235:respawn: /sbin/mgetty ircomm0 After all of this I can start MiniTerm, issue a '/sbin/init q' then send a few <CR> from the Visor and I get a text termianl login. While composing this email I found a previously undiscovered website that seems most helpful: palm-ppp-mini


3.7. Psion 5 Connection

Andrew Chadwick wrote: A nifty way to check that the baud rates for SIR are set up properly (if you have a Psion Series 5) is to point the S5 at your Linux box's IR window and try to beam a file. While the beamer dialog's on the screen, the S5 will try to make an IrDA connection (even when it claims it can't find another IR machine). You should be able to do a cat > /dev/ttyS3 and if the serial parameters are right on both machines, you should see the words "Symbian EPOC" (machine ident) scroll past amidst the spew.

Fons Botman wrote: " Maybe someone with a Psion 5 would like to test this program. It emulates the protocol for the Psion 5 IR send and receive command for files on linux. You can now exchange files with simple commands. The transfer rate is 9.7 KBytes/sec on a 115KB SIR link for big files which is not bad methinks. It is beta, so be sure to backup the Psion first, I did get a soft reset once (no data loss). ;-)" I have put the source into the appendix.


3.8. Connecting from Linux to WinCE 2.11

Submitted by Arthur Tyde and Bryan Abshier of Linuxcare Inc.

This will tell you how to set up a masqueraded PPP connection via. IrDA from WinCE to a Linux based notebook computer. Once you are IP connected, the rest is up to you. We put this together as a guide for Sony notebook users with Casio E-100/105 PDA's, though the procedure should work for any WinCE 2.11 device with infrared capabilities talking to any notebook. Do all the Linux side testing signed on as root, standard warnings apply.

Configure WinCE Configure a network connection for your WinCE device. Go into "Connections" and create a "Direct Connection" Name it something meaningful, for device select "Infrared Port". Go into settings and change the baud rate to 115200, this is the max for WinCE. Go to TCP/IP settings and check "Use server-assigned IP address," and "Use software compression," and "Use IP header compression" Make sure "Use Slip," is unchecked. For Name Servers, make sure "Use server-assigned addresses" is checked. Go to Start, Settings, Communications, Identification and enter something for the Device Name. (I used "cetoy") You most likely already have these values set if you have synced with a Win9x desktop using Activesynch.

Configure Linux/IrDA Set up IrDA support on your notebook (described elsewhere) and get to the point where your notebook will discover an IrDA compliant device. A good sign is the irda0 device will show up when you execute ifconfig. It will not have an IP address, this is ok.

Setup the Connection Test the discovery by setting an IrDA device in range of your IR port, wait 5 seconds, and;

cat /proc/net/irda/discovery

For example, the Ericsson I888 World Phone with IR port enabled should immediately show something like this;


"name:I 888 WORLD   ,hint:0x9104,saddr:0x838470e5,daddr:0x152dceaa"
Your WinCE machine will not be discovered unless it's actively looking for a connection. So, if you want to test with WinCE position your device and double tap on the network icon you created in step 2, you should see something like this:


"name:mytoy,hint:0x8204,saddr:0x838470e5,daddr:0x00000b72"
The name displayed will be whatever value you have entered into the Start, Settings, Communications, Identification as the Device Name. At this point, with basic IrDA functioning- we can move on to establishing a PPP connection for WinCE. These scripts can also be used for serial cable connects. Create the following files and copy them into the directory indicated.

/usr/sbin/cebox.sh - make it executable

#!/bin/sh
pppd call cebox
Because Microsoft likes to break standards, you need the following chat script. This will feed WinCE the proper ASCII keywords it wants before allowing a PPP connection.

/etc/ppp/cebox.chat

TIMEOUT 3600
"CLIENT"    "CLIENT\c"
""      "SERVER\c"
The following file will allow you to specify the IP addresses, IR (or serial port if using a cable) device, DNS and so forth. I do not recommend you change the 192.IP addresses below. WinCE really has an affection for 192.168.55.100 because all the MS synch tools seem to have it hardcoded. DNS can be whatever you normally use.

/etc/ppp/peers/cebox

/dev/ircomm0 115200 crtscts
connect '/usr/sbin/chat -v -f /etc/ppp/cebox.chat'
noauth
local
192.168.55.101:192.168.55.100
ms-dns 10.2.0.1

Testing the connection Ok, now you can test the connection to make sure it all works. Reboot your machine, run irattach /dev/ttyS2 -s (/dev/ttyS2 being the serial port your BIOS sees the IR device as, if irattach is not running, start it) Align the IR ports, at the Linux command prompt type /usr/sbin/cebox.sh, and simultaneously press return to start cebox and double tap your connection icon in WinCE. You should get a happy message from WinCE reporting Connecting to Host, Device Connected, Authenticating User, User Authenticated and finally Connected. You should see something like this when you are connected:

irda0     Link encap:IrLAP  HWaddr 06:89:d0:58
      UP RUNNING NOARP  MTU:2048  Metric:1
      RX packets:246 errors:0 dropped:0 overruns:0 frame:0
      TX packets:251 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:8

ppp0      Link encap:Point-to-Point Protocol
      inet addr:192.168.55.101 P-t-P:192.168.55.100 Mask:255.255.255.255
      UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
      RX packets:10 errors:0 dropped:0 overruns:0 frame:0
      TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:10
The following script sets up IrDA, establishes a ppp connection with WinCE, and then sets up IP masquerading. It is provided as an example of how you can tie this all together. This is more or less a manual approach. You can get creative, start irattach at boot and stick a line in inittab to constantly look for a WinCE connection on the IR port. This will however, run down your batteries and limit your ability to access other IR gadgets. I just use the script below. Position the device, run wince and start communications on your PDA when the script tells you to.

/usr/local/bin/wince - make this executable

#!/usr/bin/perl
use strict;
#
# Enable IrDA, start ppp0 and set up WinCE masquerading
# A. Tyde - Linuxcare Inc.
#
print "\n-> Setting up IR infrastructure...\n";
system("killall irattach 2>/dev/null");
sleep 1;
system("/usr/sbin/cebox.sh");
print "   Start WinCE Serial or IR networking now!\n";
open(ECHO,">/proc/sys/net/ipv4/ip_forward") or die "Can not open /proc/sys/net/
ipv4/ip_forward";
print ECHO "1";
close (ECHO);
print "   Serving 192.168.55.100 to WinCE device...\n\n";
system("ipchains -F");
sleep 5;
system("ipchains -P forward DENY");
system("ipchains -A forward -s 192.168.55.100/32 -j MASQ");
exit 0;


3.9. Connecting from Linux to WinCE 3.0 (aka PocketPC)

This chapter is a courtesy of Stanislav Sokolov.

This section covers how to connect a PocketPC device to a Linux box. The information provided in section "Connecting from Linux to WinCE" (found also at CEwindows ) does not apply to PocketPC as Microsoft in one of there brighter moments removed support for direct IrDA connections from version 3.0 of WinCE. I used the document "Linux to Windows CE Connection" (found at The Gadgeteer ) as a starting point, but had to modify and simplify several aspects. This section will go as far as ping between PocketPC and Linux. You should be able to find many networking applications at PDAcentral, CAM or WinCEcity .

Here is the system I used:

  • Compaq iPAQ with PocketPC Version 3.0.9348 (I don't know if this would work for PocketPC 2002 as Microsoft likes changing standards from version to version).

  • On the Linux side was a Compaq LTE5250 laptop with Slackware Linux 7.1.

  • Kernel 2.4.19

  • PPP 2.4.1 (PPP must not be older than 2.4.0 when used with kernel 2.4.x)

On the PocketPC side go to Start -> Settings -> Connection -> Modem. Make a new connection, call it something meaningful (I use Linux-m), choose "Generic IrDA modem", set baud rate to 115200. Tap "Advanced". In "Port Settings" select 8-N-1-Hardware and check "Enter dialing commands manually". This is done so as PocketPC would not try to dial a phone number as we do not want it. The other two boxes should remain unchecked. In TCP/IP select "Use server-assigned IP address" uncheck "Use Slip", but check "Use software compression" and "Use IP header compression". In "name Servers" select "Use server-assigned addresses". Tap "ok" and "Next". You should not be asked for telephone number (if you are, just enter 1 and doublecheck that you actually selected manual dialing commands box in advanced section). Make sure that "Cancel call..." and "Wait for dial tone..." boxes are unchecked. We are now done with the PocketPC part.

On Linux we must first make sure that all the necessary modules are loaded. Here are the modules that were loaded and in use during a successful communication session:

Module                  Size  Used by    Not tainted
ircomm-tty             31040   2
ircomm                 13448   0  [ircomm-tty]
irtty                   7616   2
ppp_async               6688   1
ppp_generic            15740   3  [ppp_async]
slhc                    4592   1  [ppp_generic]
Make sure that ls -la /dev/ircomm* produces a similar output:

crw-------   1 root     root     161,   0 Nov 25 15:09 /dev/ircomm0
crw-r--r--   1 root     root     161,   1 Nov 22 19:30 /dev/ircomm1
Start irattach irattach /dev/ttyS2 -s

Now we have to enable a login terminal on the IrDA port. I used agetty (or your favorite getty variant) for that purpose. Add the following line to your /etc/inittab:

s3:2345:respawn:/sbin/agetty ircomm0 115200 vt100
save the file and activate it by restarting init:

init 2; sleep 3 ; init 3
Also prepare the following shell script that will perform the second phase of connection:

#!/bin/sh
/usr/sbin/pppd -detach noauth local lock 192.168.55.1:192.168.55.2 ircomm0 115200 &

Now the connection itself: Align the IR ports and on the PocketPC go to Start -> Programs -> Connections and tap the connection that you created (Linux-m). In the "Connect To" dialog that shows up leave everything unfilled and just tap on "Connect". "Manual Dialing Terminal" will show up. There you should see the login prompt for your Linux-box (If the login prompt does not show up at once, bring up the virtual keyboard and tap 'enter'). You do not need to login (though it is a bonus - speaking of the ultimate remote controller :)

On the Linux-box execute the pppd command as soon as some "garbage" shows up in the PocketPC's terminal, tap "File" -> "Continue". pppd should come with the following message:

Using interface ppp0
Connect: ppp0 <--> /dev/ircomm0
Cannot determine ethernet address for proxy ARP
local  IP address 192.168.55.1
remote IP address 192.168.55.2
And PocketPC should show a dialog with "Status: Connected". You can run ifconfig to check that ppp0 interface is up and running. ping 192.168.55.2 should produce something like that:

PING 192.168.55.2 (192.168.55.2): 56 data bytes
64 bytes from 192.168.55.2: icmp_seq=0 ttl=32 time=62.5 ms
64 bytes from 192.168.55.2: icmp_seq=1 ttl=32 time=310.0 ms
64 bytes from 192.168.55.2: icmp_seq=2 ttl=32 time=59.9 ms
64 bytes from 192.168.55.2: icmp_seq=3 ttl=32 time=59.8 ms
64 bytes from 192.168.55.2: icmp_seq=4 ttl=32 time=60.0 ms

--- 192.168.55.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 59.8/110.4/310.0 ms
RTT will depend on the distance and lighting conditions. When you tap "Disconnect" something like that will show up:

LCP terminated by peer
Modem hangup
Connection terminated.
Connect time 2.6 minutes.
Sent 1336 bytes, received 1274 bytes.

Now, if not all went that well, check the following:

  • getty is started. It will not start if /dev/ircomm0 is not configured. That is modprobe ircomm-tty should come up before getty is invoked.

  • "Enter dialing commands manually" is checked. PocketPC should not attempt to dial any number!

  • You have async PPP support in kernel. modprobe ppp_async loads successfully or you don't have PPP async compiled into kernel. Otherwise you will get the "Couldn't set tty to PPP discipline: Invalid argument" error message.

  • pppd should be setuid root: chmod u+s /usr/sbin/pppd.


3.10. Cellular Phone Connection

As far as I know some cellular phones use the IrCOMM standard, e.g. Ericsson SH888 and NOKIA 6110 (I'm not sure about the NOKIA 8110). Some cellular phones (Ericsson T68) use the IrOBEX standard or IrMC. For more and general information about Linux and cell phones see TuxMobil . You may use IrCOMM to set up a PPP modem connection and OpenOBEX to send or retrieve files (e.g. addressbook entries, logo, ringtones).


3.10.1. Generic Instructions

This chapter describes how to connect your mobile phone via IrDA with your Linux box. It is based on a report by Matthias Schmidt. It was tested with the following mobiles:

  • Ericsson T39m

  • Siemens S25

  • Siemens S35i

  • Siemens ME45

  • Nokia 6110

  • Nokia 6210

Configure the IrDA basics as described above (kernel configuration, /etc/modules.conf, irattach, PPP) (for detailed information about PPP see also the PPP-HOWTO. Now check whether your mobile phone was found:

# irdadump
xid:rsp be1eb736 > 08666644 S=6 s=4 SIEMENS S35 hint=9024 [ Modem IrCOMM IrOBEX ] (28)
# irdadump
xid:rsp be1eb736 > 35450000 S=6 s=4 Nokia 6100 hint=8101 [ PnP Telephony ] (28)
# irdadump
xid:rsp be1eb736 > 04489982 S=6 s=5 SIEMENS ME45 hint=b124 [ PnP Modem Fax IrCOMM IrOBEX ] (29)


3.10.1.1. PPP dial-up Software

3.10.1.1.1. minicom

There are several ways to connect to your ISP. The easiest (and sometimes the only) way is to use a terminal program like minicom.


3.10.1.1.2. wvdial

If you prefer more comfort, you can use wvdial. It's easy to configure and it works with a lot of roaming providers and the german Tante T. gh0st and me did some testing yesterday and we weren't able to connect to the dial-in server of the HRZ with wvdial. wvdial always failed with "Bad password", because the server respondend faster that the mobile softmodem could send the login and password strings. See the standard ppp config below. /etc/wvdial.conf:

[Dialer Defaults]
Modem = /dev/ircomm0
Baud = 9600
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Password = internet
Username = internet
Phone = 00393492002800
ISDN = 0
Modem Type = Analog Modem

[Dialer shh]
Init3 = ATM0


3.10.1.1.3. PPP Tools

Problems with wvdial (see explanation above)? IMHO the best way is to use the standard PPP tools . You can configure them via pppconfig, start with pon and stop connection with poff.

Example files for PPP with a connection named irda: /etc/ppp/pap-secrets

# username	connection-name	password
test	irda		test
/etc/ppp/peers/irda

hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/irda"
debug
/dev/ircomm0
9600
defaultroute
noipdefault
user test
remotename irda
ipparam irda
usepeerdns
/etc/chatscripts/irda

ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' 
ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
'' ATZ
# dial-in number of the ISP
OK-AT-OK ATDT<YOUR_ISP_PHONE_NUMBER>
CONNECT \d\c


3.10.1.2. Logos, Sounds, SMS, ...

If you get your mobile working via infrared, you can do some nice stuff with it. You can save your phonebook or your SMS, send SMS, put new logos (BMP format) on it, save the old logo to your harddisk and do the same with your ringtones (MIDI). To do all this nice things, you'll need the following:

  • a OBEX capable mobile phone, e.g. a Siemens mobile-phone

  • a working infrared connection

  • the scmxx tool

  • gscmxx (optional)

Bind your mobile phone to IrDA services
 
# irattach /dev/ttyS1 -s
IrDA: Registered device irda0

Check the connection

# irdadump
xid:cmd 9d5dcefa < ffffffff S=6 s=3 (14)
xid:cmd 9d5dcefa < ffffffff S=6 s=4 (14)
xid:rsp 9d5dcefa > 08666644 S=6 s=3 SIEMENS S35 hint=9024 [ Modem IrCOMM IrOBEX ] (28)

Show general information about your mobile phone

# scmxx -i
Accessing device /dev/ircomm0
OK, a modem device is present.
Vendor:         SIEMENS
Model:          S35i
Revision:       20
Serial (Phone): xxxxxxxxxxxxxxx
Serial (SIM):   xxxxxxxxxxxxxxx
SIM-ID:         xxxxxxxxxxxxxxxxxxxxx
Operator:       D2
SMS Server:     +491722270333
Charset:        GSM
Battery:        40%
Signal/BER:     -79 dBm/?
Time:           02/10/07,11:48:49
Readable Slots: bmp: 0-1, mid: 0, vcs: 1-30
Phonebooks:     FD, SM, ON, ME, LD, MC, RC, OW, MS, CD, BL, RD, CS
SMS storages:   SM

Save your phonebook to disk

# scmxx -g -PSM -f phonebook
Accessing device /dev/ircomm0
OK, a modem device is present.
Detected SIEMENS S35i
phonebook created.
Receiving: 1 2 3 4 5 6 7 8 9 [...] 
Received all gettable entries

Show your SMS (here in slot 3)

# scmxx -g -S3 -f -
Accessing device /dev/ircomm0
OK, a modem device is present.
Detected SIEMENS S35i
Looking for SMS of specified type...
Receiving incoming, read SMS from slot 3.
Slot: 3
From: xxxxxxxxxxxxxx
Date: 2002-10-03 23:11:47 (GMT+0)
SMSC number: xxxxxxxxxxxxxxxx
PDU type: SMS-DELIVER MMS
Data Coding Scheme: 7bit-GSM
Message length: 160
Message:
	xxxxxxxxxxxxxxxxxxxxxxxxxx

Save your current logo to disk

# scmxx -g -B0 -f logo.bmp
Accessing device /dev/ircomm0
OK, a modem device is present.
Detected SIEMENS S35i
Slot 0...
Receiving packet 1 of 5...
logo.bmp created.
Receiving packet 2 of 5...
Receiving packet 3 of 5...
Receiving packet 4 of 5...
Receiving packet 5 of 5...
File transfer complete.

Save your current ringtone to disk

# scmxx -g -M0 -f sound.mid
Accessing device /dev/ircomm0
OK, a modem device is present.
Detected SIEMENS S35i
Slot 0...
Receiving packet 1 of 1...
sound.mid created.
File transfer complete.


3.10.2. OBEX Connection

See the OpenOBEX chapter below. Detailed information about OBEX connections to mobile phones will follow soon hopefully. See also the Palm III section for information about setting up a connection.


3.10.3. Specific Mobile Phones

3.10.3.1. Motorola

Michael McConnell has posted an initial version of a guide to get the Motorola Timeport GSM phone and Linux-IrDA talking on his website.


3.10.3.2. Ericsson

Note for T39 users (maybe for T300, too). Please check the web page of Jean Tourrilhes , you will need to apply kernel patches and tweak /proc/sys/net/irda/max_tx_window

1. Configuration To start a communication session with /dev/ircomm0 , for instance, say:

dip -t
> port ircomm0
> term
Probably you may use cu or xc instead of dip, too cu -l /dev/ircomm0 or xc -l /dev/ircomm0. There are also reports about some efforts with the Ericsson GF768 and IR Modem DI 27.

Benny Amorsen wrote: The SH888 emulates an IRDA-port when you connect it using the serial cable. Why someone would think up something weird like that is beyond me, but that is the way you get it to work in Windows. Not that I ever managed to make it work in Windows, though.

Ales Dryak has send this survey (looks like a Debian/GNU Linux distribution, please modify your configuration accordingly). Mobile Ericsson SH888 ati1 = 980408 1035 PRGCXC125101:


mknod /dev/ircomm0 c 161 0
mknod /dev/ircomm1 c 161 1
2. /etc/conf.modules:

alias tty-ldisc-11 irtty
alias char-major-161 ircomm-tty
3. /etc/irda/drivers: irattach /dev/ttyS0 -s # (IrDA port in SIR mode) 4. /etc/chatscripts/sh888

<ABORT stuff>
"" \d\d\d\d\d\dATZE0
OK ATD<phone number to call)
CONNECT \d\c
5. /etc/ppp/peers/sh888

noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/sh888"
/dev/ircomm
115200
defaultroute
noipdefault
user <your username> # don't forget to add your password to chap secrets or chat script

A few seconds (app. 30) after executing pppd call sh888 I get connected to our Intranet/Internet having full IP connectivity (telnet, ftp, www, icmp tested). Futhermore I can connect to /dev/ircomm using minicom and play with AT command. Great! And looks stable!


3.10.3.2.1. Tools

Gerhard Gonter reported: Several members of the list are successfully using the Ericsson mobile phone SH888 with the Linux-IrDA software, usually to use it as a modem. The software is also quite useful to access other parts of the phone using AT commands. The built-in phonebook is an interesting target.

After A quick research on the Internet (FreshMeat, Deja, YAHOO), I did not find any phonebook tool for Linux (or another Unix). To solve that problem, I wrote a small Perl script and a related module. Since this now works acceptably well for me, I decided to wrap that up and release it at this early stage of development. The tarball can be retrieved here .

In the mailing list gsmlib was also recommended, though ... there was no way for me to use this over infrared, no connection with my sh888. Florian Lohoff reported: Works (kind of) with the S25. I needed to change a ifdef as it seems the S25 does not respond with CR LF. But setting a link from /dev/mobilephone -> /dev/ircomm lets me send SMS via the S25 without a problem. Phonebook backup does NOT work because the S25 does some silly responses to probably empty phonebooks.

The specifications for SMS messages and phone books can be downloaded free (of charge, not FSF free ;-) from ETSI. Search for GSM 07.07 (you might also want GSM 07.05). You have to register before downloading it. The standards are in Acrobat PDF format. The S25 supported commands are available on the Siemens websites as a PDF for free.

A survey of the AT commands for the SH888 is at Ericsson .


3.10.3.3. NOKIA

Carlos Vidal wrote: Correct me if I'm wrong, but it seems to me that Nokia telephones do not contain a genuine hardware modem, but something which is similar in principle to WinModems for PC. Whenever Nokia writes about modem communication, they use the name "Windows software modem" (or something similar). Which is actually backed up by the need to use special Nokia software for Windows (called Nokia Cellular Data Suite).

Joonas Lehtinen wrote: This is true with 61xx models. Models: 8810, 9000(i) and 9110 should work fine. (They have inbuilt modem). My Nokia 9000 reports IrCOMM with linux.

Some suggestion by Carlos Vidal carlos_at_tarkus.se : "I'm doing some tests trying to see how far can I get with my Nokia 6110 on Linux. I've just compiled gnokii-0.2.4 [ gnokii is a tool set for Nokia mobile phones connected via serial cable for Linux and *BSD , WH], but it doesn't work [please check current gnokii , the behaviour should have been improved, there is also useful documentation about IrDA connections to phones, WH]. As I have Nokia Data Suite I did the following connection:

Nokia 6110 <-- Nokia Cable --> PC/Linux <-- Null-modem cable --> PC/W95

In the PC/Linux I run the program snooper (by Jun-ichiro itojun Itoh , sorry couldn't find an URL maybe some other sniffer will do it also, e.g. sniffit, see also appendix about serial sniffers, WH) with small modifications in order to configure the serial port correctly.

Normally, if snooper has the correct baud rate, the phone and the PC/W95 should communicate as if there was no snooper in between. This worked pretty well when I cracked the protocol of my Minolta camera. The problem here is that the phone doesn't answer or hangs after a while.

It seems that the timing is quite important during the initial phase of the communication. The log I obtain is:


0>1: UUUUUUUUUUUUUUUUUUUUUUUU
line 0: LE *DTR *RTS ST SR CTS CD RI *DSR
line 1: LE *DTR *RTS ST SR CTS CD RI *DSR
0>1: UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
UUUUUUUUUUUUUUU\x1e\x00\x0c\x02\x00\x09\x00\x01\x00\x0d\x00\x00\x02\x01@\x00P\x
06
1>0: \x18\x00\x00\x00\xfc\x18\x00\x00\x00\x00\x00\x00\xc0\xf0
0>1: \x1e\x00\x0c\x02\x00\x09\x00\x01\x00\x0d\x00\x00\x02\x01@\x00P\x06
1>0: \x18\x00\x00\x00\x18\x00\x00\xc0\xf0\x18\x00\x00\x00\x00\x00\x00\xc0\xf0
0>1: \x1e\x00\x0cd\x00\x06\x00\x01\x00\x10\x01`\x13\x13
1>0: \x18\x00\x00\xf0\x00\x00\xfc
0>1: \x1e\x00\x0cd\x00\x06\x00\x01\x00\x10\x01`\x13\x13
0 is the PC/95 and 1 is the phone. The communication starts with a stream of 'U' (0x55) and with DSR/DTR on. The phone answers with '0x18 0x00 ...'. This dialog continues for a while as if both were deaf and finally the phone crashes and the only way to reset it is to remove the batteries!

I guess that what happens is that the phone is trying to find the correct baud-rate and fails because of the delays introduced by snooper. This probably has to do with some IrDA protocol used with also with the infrared connection."

Wessel de Roode "I managed to get the Discovery IR hint bits (with my Palm Pilot):


Discover:
0:xxxxxxxx:81.01
    01  IR_HINT_PNP     01  IR_HINT_TELEPHONY (IrMC ?)
    80  IR_HINT_EXT

Device info query:
\006Device\012DeviceName
    4e 6f 6b 69 61 20 36 31 30 30       Nokia 6100
I also managed to query the PNP device of the Nokia. It has one PNP device. It's PNPC100 which equalt a 9600 baud modem. I deleted the query, if somene can send me a hint to restore it. was somthing like IrDA:<dunno>:PNP:Comp#01 The same query with IrDA:<dunno>:PNP:CompCnt gives the number of PNP-devices are available in the Nokia. Which is here only one."

There are also reports about gsmlib for sending and receiving sms messages, updating address books etc). These functions are working, except for minor charset problems.


3.10.3.3.1. Recommended Tools

gnokii is a Linux/Unix tool suite and soon to be modem/fax driver for Nokia (GSM) mobile phones. Phones supported include 3110, 3810, 8110, 5110, 6110 and their derivatives.


3.10.3.4. Siemens

Configuration By Florian Lohoff: "Do it step by step - Get your irda working irattach /dev/ttySx etc. Then have a look at the /proc/net/irda/discovery whether you find something like this:


(flo@paradigm)~# cat /proc/net/irda/discovery
IrLMP: Discovery log:
nickname: SIEMENS S25, hint: 0x9024, saddr: 0x4286ce23, daddr: 0x04295741
Now load ircomm and ircomm-tty and normally(tm) you should be able to connect to the correct /dev/ircomm and you can easily dial and load/backup the phonebook etc ...", e.g. with minicom.

Timo Felbinger describes the connection between a Toshiba and a Siemens S25:

  • kernel 2.2.12 and patch-2.2.12-irda3, IrDA support in the kernel, ircomm and ircomm-tty as a module

  • mknod /dev/ircomm0 c 161 0

  • modprobe ircomm, modprobe ircomm-tty

  • start irattach with modprobe toshoboe in the start section of /etc/irda/drivers . Note: don't load toshoboe before the irattach, this may cause device or resource busy

  • after dip -t and the command port ircomm0 the S25 shows a connection. Note: the IR port of the S25 has to be activated of course, the distance between the two devices seems not critical.

  • After term the S25 behaves like the usual Hayes modem and can be used with the AT commands.

  • dial-out with pppd works out of the box.


3.10.3.4.1. Recommended Tools

SCMxx can copy files to and from a Siemens mobile phone and also delete stored files. Files can read from a given file or through stdin and stored to a given file or stdout. SMS can also be directly sent or received without storing in the mobile phone. SCMxx was tested with several mobile phones manufactured by Siemens (only S25 and later).


3.10.4. German e-plus

A note to German e-plus users:

Every e-plus contract (except Free&Easy) contains a PPP conncetion to the WWW (no separate registration necessary). This service is available around Germany under the phone number 123100. This worked also out of the box.

pppd configuration:


/dev/ircomm0
defaultroute
netmask 255.255.255.0
debug
mtu 552
crtscts
noauth
connect '/usr/sbin/chat -v -f /etc/ppp/eplus.chat'
chat script /etc/ppp/eplus.chat:


ABORT "BUSY"
ABORT "ERROR"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO ANSWER"
SAY "initializing modem..."
"" "AT"
"OK" "ATZ"
SAY "dialing..."
"OK" "ATDT123100"
SAY "waiting for CONNECT..."
"CONNECT" ""
SAY "connected!"
SAY ""
For the nameserver you may use 192.76.144.66 . Username or password are not necessary.


3.11. Digital Camera Connection

Markus Schill wrote: "Great that there are also other people who are interested in using the SONY DSC-F1 IR adapter under linux. Up to now I have only toyed around with the linux-irda software and the serial IR adapter from PuMa Technologies that came with the camera. This is the status. I am using linux 2.0.33 and the latest linux-irda... If I use:

modprobe irda
modprobe irtty
irattach /dev/ircomm0
the adapter starts talking to the camera. /var/log/messages says that SONY-DSC-F1 was found, but no service is started. (Please note, this probably doesn't apply to the 2.2.x kernel versions of Linux/IrDA, [WH]).

There are two programs for linux available that can be used for the communication with the camera via cable: (1) chotplay and (2) stillgrab. They both take a tty as commandline option, so I guess that they should work if the irtty layer of the protocol stack works correctly ... I have not looked at anything in the linux-irda code, yet!). I am not sure whether I understand the stack but shouldn't the irtty make the thing look like a normal tty? What service should be started. "

Dag Brattli wrote: "I'm not sure which application level protocol the camera uses, but it is possible that it implements the IrDA(TM) Infrared Transfer Picture Specification (IrTran-P). If you take a look at IrTran protocol , you will see that it is a protocol which is implemented above IrCOMM (not IrTTY!). IrTTY is something we use just to be able to talk to the Linux serial driver. "

The Kodak-Digital-Camera-HOWTO by David Burley now describes how to get IrDA working and implemented to get communications and to use the DigitalOS camera's with Linux and IrDA.


3.12. Microsoft-Windows and Linux/IrDA

3.12.1. Introduction

Why this? Unfortunately Linux users are not always supplied with the necessary hardware information. Sometimes it is possible to look at this information in Microsoft-Windows. Sometimes its even useful to connect the two. Linux could also provide occasional access point services to a Microsoft-Windows laptop of a friend dropping by.

Where to get it from? At MicroSoft in the directory /Windows95/downloads/contents/WURecommended/S_WUCommunications/W95IrDA/ you will find a support pack Infrared Transfer 2.0. It is a self-extracting archive W95IR.EXE with 331KB. Note: Microsoft seems to change the location of this file (and others) at random, the former URL is Microsoft Windows95 IrDA - Old

Microsoft(tm) has three versions of IrDA support for Windows95. The version number can be found in the "Software" icon in the Control Panel and the file infrared.inf.

Version 1.0 is still delivered with some hardware.

Version 2.0 is the version they currently offer at their web site. It is in the self-extracting file W95IR.EXE. The last time I looked (1999-02-21) it was 434KB and was found at W95IR.EXE . Their website is frequently changing, so do not be surprised to find the file (also) in another location or not at all.

Version 3.0 can/could be found in their downloadable Infrared development kit IRDDK30, but is mostly useful for developers. It is internally different from 2.0, it is based on "miniport" network drivers, just like the Linux version. It exists for some time and has some support for NT, but it clearly did not make it into the mainstream NT4.0 distributions. For 95 you are probably better off with 2.0. The choice may depend on the documentation of the drivers you get with your specific hardware.

The Microsoft website also used to contain a nice utility IrXfer, contained in the archive IRXFER.EXE, This is the Infrared Transfer utility, which uses an IrOBEX variant I think, it is referenced in the IrOBEX protocol description. The utility was freely downloadable, but I could not find it the last time. It is a nice graphical utility which can be used to transfer files over IrDA between computers.

With some machines, e.g. a HP Omnibook 800 it is necessary to use a vendor specific version of this package (for the HP Omnibook 800 you may find it on the recovery CD).

Especially the ..\windows\inf\*.inf files and the device manager are of interest to look for configuration details.

As far as I know Window$NT doesn't support IrDA(TM). About Window$98 I have heard there is no IrDA(TM) support yet. Countersys claims to sell an IrDA solution for NT4.0 to support their JetBeam product, Microsoft refers to them for it.

AFAIK:

  • Windows95 : use 2.0

  • Windows98 : delivered with 3.0 and IrXfer (works with Linux/IrDA, IrOBEX?)

  • WindowsNT4.0: no IrDA support directly by the system

  • Windows2000 : 3.0(+?) MicroSoft

    There are also some non M$ products available. Note: Some of them use proprietary infrared protocols:

  • CounterPoint: QuickBeam 1.15 (works with Linux/IrDA, IrOBEX?)

  • LapLink 7.5

  • CarbonCopy 32 4.0

  • pc ANYWHERE 7.5

  • Puma Technology: TRANXIT pro 4.0


3.12.2. Connection between Linux/IrDA and MS-Windows95 IrDA(TM)

You may use IrNET .


3.12.3. Communication between MS-Windows98 and Linux

Ha Duong Minh: Today I am delighted to report that ircp from the OpenOBEX project , works like a charm to transfer files between my Linux box and its Microsoft-Windows98 cousin. It can't be simpler: ircp file1, file2, ... to send or ircp -r [DEST] to receive files over IrDA.


3.12.4. Communication between MS-Windows2000/XP and Linux

IrCOMM2k is a driver by Jan Kiszka for Windows 2000 and XP. It emulates a serial port which can be used to exchange data with mobile devices. For example, some cellular phones are able to act as modems or fax devices. PDAs with infrared interface can be synchronized with the PC. IrCOMM2k is an Open Source project according to the terms of the GPL.


3.13. Linux to Linux Connection

3.13.1. Connection Methods

There should be four ways to get two Linux machines connected via Linux/IrDA.

  • Dag Brattli wrote about the IrOBEX support: "The awakened reader may wonder what prevents the beaming of files from Linux to Linux? Well, nothing!! (but I haven't tried that yet). This means that we now have a "simple" way of beaming files between Linux laptops. I think that this may be the "killer app" we all have been waiting for!" Try to "load_misc irobex at both ends, and then try irobex_app get on one of the machines and irobex_app put <file> on the other.".

  • Via Linux/IrDA network connection. But the IrLAN protocol is no longer maintained by the Linux/IrDA core team.

  • With IrCOMM support, in other words over a serial line, which could mean minicom, pppd, etc. If you want just now to use IrCOMM between Linux boxes, please add this line to /etc/conf.modules of _one_ box:
    
# set ircomm protocol engine to client-only mode
    options ircomm ircomm_cs=1
    
    Note: Don't add it to both boxes, or they cannot accept incomin