|
from small one page howto to huge articles all in one place
poll results
Last additions:
May 25th. 2007:
|

.
You are here: Network->Infrared Devices
Copyright © 2000-2003 Werner Heuser
Copyright (c) 2000-2003 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".
$Date: 2003/06/16 13:57:15 $ Abstract
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 its status is still experimental, so please don't expect every feature working straight. AFAIK Linux/IrDA is the _only_ open source IrDA implementation currently available.
Remote Control (RC) via infrared is the aim of the Linux Infrared Remote Control - LIRC project, and also described in this HOWTO.
About the Document and the Author
Better red, than dead.
--
Unknown AuthorEss
This document is based on the
How to use 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 - LDP
.
The latest version of this document is available at
TuxMobil-HOWTOs.
You may find my Linux-Mobile-Guide (the former Laptop-HOWTO) and
the Linux-Ecology-HOWTO there also.
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>
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.
Chapter 1. About the Linux/IrDA Project
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 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 at Linux/IrDA Project or me at <wehe_at_tuxmobil.org>.
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.
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.
Warning
Some caveats in the documentation have been caused by changes of the following
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.
You should always use current Kernel, irda-utils and documentation.
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.
Chapter 2. Getting Started
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.
Use the latest source of irda-utils available at Linux/IrDA
Project. Also recommended is the 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
NOKUBI Takatsugu provides an irda-utils Debian package . This package
is part of the Potato Debian release. 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.
Contents of Linux/IrDA-Utils
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.
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
Makes it possible to try and ping a remote device using IrDA test
frames. Not all devices implements support for test frames. This is a
program similar to ping(8). It sends IrDA test frames (added some
userdata which contains 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
From : 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.
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.
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.
A collection of programs which uses IrDA sockets.
File transfer program for exchanging files with your Psion PDA.
This directory contains the configuration files, e.g. for the
serial port of the SIR driver irda.conf.
For first testing you should configure the SIR IrDA driver.
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.
e-Squirt is a simple protocol for sending URLs over the IrDA medium.
This allows for interaction with CoolTown enabled devices.
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.
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.
Please read the Kernel-HOWTO to get more information about the
compilation process. Get the latest patches from
Linux/IrDA Project
or the Linux/IrDA mailing list archives.
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)
Make sure you use kernel 2.4.x sources. If unsure about your kernel
version try uname -r.
Get the latest kernel patch from the Linux/IrDA project . Or from the
Alan Cox kernel series . Put it into /usr/src
or where else your
kernel sources live and apply something like (replace
patch-2_2.0-irdaXXX with the actual file name):
cd /usr/src
tar xvzf patch-2_2.0-irdaXXX.tar.gz
cd linux
patch -p1 -l < ../patch-2_2.0-irdaXXX
For latest drivers maybe experimental support has to be enabled
CONFIG_EXPERIMENTAL.
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:
make dep && make all && make modules
&& make install && make modules_install
If you get really strange errors, then try to rebuild from scratch
after a make clean.
The following is from ../linux-2.4.3/Documentation/Configure.help
with some modifications by me.
Please consult the latest available kernel
documentation for current information and new drivers.
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.
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.
Note: donauboe is a new version of
toshoboe better FIR support
and compatibility with Donauoboe chip from
lib-irda
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>
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.
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).
Add the following lines to your /etc/conf.modules file:
# 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 into 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 and run
update-modules afterwards.
Have a look into the files in /etc/irda.
Edit them to reflect your setup.
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 connected to a docking station the infrared
port was disabled on some laptops.
Please decide first whether you want to set up Irda either in SIR or
in FIR mode. It is recommended to start with 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.
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).
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.
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
There are three sorts of low level drivers: SIR, FIR and dongle.
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 .
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.
Currently there are two FIR chips supported: NationalSemiConductor NSC
PC87108 e.g. used in IBM Thinkpad 560X and Winbond W83977AF (IR) FIR
chip e.g. used in the Corel Netwinder PC. 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).
Dongle Connection - Infrared Adapters for the Serial Port
The currently supported dongles are the Extended Systems Inc. ESI-9680
JetEye, the Tekram IRmate 210B, the ACTiSYS IR220L and 220L+, the
Greenwich GIrBIL. dongle.
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
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/conf.modules 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. "
Dongle Connection - Infrared Adapters for the USB Port
Not every USB dongle does work. For details see the dedicated
chapter below IrDA and USB.
Dongle Connection - Infrared Motherboard Adapter
Support for the ACTiSYS IR2000 dongle has been implemented in a file
called pc87108 which you can either compile into the kernel or
modprobe pc87108 to insert the module
or insert modprobe pc87108
into the /etc/irda/drivers file (I think).
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 conpatible 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.
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.
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 currently this protocol is no longer maintained
by the Linux/IrDA core team.
As far as I know this device uses IrLAN.
But currently this protocol is no longer maintained
by the Linux/IrDA core team.
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.
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
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.
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;
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.16 |