# IrDA alias tty-ldisc-11 irtty alias char-major-161 ircomm-tty
depmod -a
to update, and then ircomm
should be automagically loaded when you need it. Here is what you need in /dev:
dagbnb /usr/src/ > ll /dev/ir* crw------- 1 dagb 161, 0 Aug 25 20:13 /dev/ircomm0 crw-rw-rw- 1 root 161, 1 Jun 18 13:44 /dev/ircomm1 crw-rw-rw- 1 root 161, 16 Jun 18 13:44 /dev/irlpt0 crw-rw-rw- 1 root 161, 17 Jun 18 13:44 /dev/irlpt1
irattach
from that file. The files are:
Makefile network* network.redhat* serial drivers network.opts obex printer
depmod -a
.
Dag Brattli wrote: " IrManager [...].is a user-space daemon that is inspired and quite similar to the cardmgr used in the PCMCIA distribution.
The IrManager will receive events from the kernel level side of the protocol stack. When the IrManager receives an event it can execute shell commands and scripts, so I have added the /etc/irda directory which will contain such scripts. [...]
For example, if IrLMP discovers a remote device with IrLAN provider capabilities and no local IrLAN client has registered, then IrLMP will send an event to the IrManager and make it "modprobe" the module required. [...]
When application level clients are ready for communication and user-space configuration, they can also notify IrManager about this, so that it can execute the right script. For example IrLAN will send the event EVENT_IRLAN_START when the data channel is ready for exchanging Ethernet frames. When IrManager receives this event, it will execute /etc/irda/network start <devname>
to configure the network interface. This network script is actually the same as used by the PCMCIA code and since I'm using the Redhat variant of it, it will in turn execute /sbin/ifup <devname>
.
So by using the IrManager, I "only" have to do this when I start the stack:
irattach /dev/ttyS2 & irmanager -d 1 # -d 1 means: start discovery process
irlan_client
. When the connection is up and ready, it will ask it to execute /etc/irda/network start eth0. When the connection is broken, it will again ask it to take down the interface using /etc/irda/network stop eth0
.[...]
That's all to get it working if you are using Redhat. If you are using some other distribution which doesn't have /sbin/ifup, then you better copy /etc/pcmcia/network.opts to /etc/irda/network.opts or configure the file yourself.
If you want to use the IrLAN server, you will still have to modprobe irlan_server
before you start the irmanager
_without_ -d 1
.
And just like the cardmgr
, you will (if you want to) get the beeps when the connection is up and running and when it is disconnected!!!
I hope that we can add such scripts for all the other clients/services that need user level configuration. It would be really cool to have a /etc/irda/printer script for configuring IrDA(TM) capable printers. So if you get in range of an IrDA(TM) capable printer, then IrManager should load the irlpt_client
module, and also configure the other stuff that needs to be done for using this printer.
I also hope that we can use the config
file for configuring IrDA(TM) ports and device drivers. Something like:
Device Drivers module "irtty" script="irattach /dev/ttyS2" module "smc_ircc" irq=11 port=0x34f
irmanager
receives the following events for a device <dev> it will currently do:
EVENT_IRLAN_START, start and configure the device using /sbin/ifup <dev>
EVENT_IRLAN_STOP, close the device using /sbin/ifdown <dev>
This can however be easily changed by the user, if this is not what is the prefered behaviour.
There are three sorts of low level drivers: SIR, dongle and FIR. If the right driver is detected by the kernel you get a message like:
IrDA irda_device irda0 registered.
dmesg
. If serial support is modularized do an insmod 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
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.
kerneld
or kmod
insert the irda module with modprobe irda
.lsmod
. It should show the modules irda
and irtty
now.Serial connection established
" now.irmanager -d1
, which will start the necessary programs, such as irattach
.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 Brattli) 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
cat /proc/net/irda/discovery
.
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 irmanager -d 1 # irattach -d tekram # or -d esi or -d actisys
-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 &
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
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 insmod
like this: insmod 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 insmod
."
Support for the ACTiSYS IR2000 dongle has been implemented in a file called pc87108 which you can either compile into the kernel or insmod/modprobe
to insert the module:
irmanager -d 1 modprobe pc87108
modprobe pc87108
into the /etc/irda/drivers file (I think).
From James <james@esc.cam.ac.uk> 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.
The IrDA(TM) standard knows three kinds of speeds:
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).