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 |
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).
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 tekram modprobe esi irattach /dev/ttyS0 -d esi & irattach /dev/ttyS1 -d tekram & |
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 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. "
Not every USB dongle does work. For details see the dedicated chapter below IrDA and USB.
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.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |