Q1 - Question: I do not know anything about ports and irqs. What should I do?
Answer:
PART A: Hardware settings
- 1 Have a look at your hardware specs!!! If not available look at the support page of your vendor, or contact the support hotline. You might also find the information in one of the hardware surveys mentioned above.
- 2 Use a current BIOS. Usually available at the support page of your vendor.
- 3 Try setserial /dev/ttyS? -g -a | egrep 16550A. One of the shown devices is probably the one you are looking for. Usually it is the second one, but with no guarantee.
- 4 Note: What seems like an UART is physically the IrDA controller. For my HP Omnibook 800 this is the VLSI VL82C147 PCI - IrDA controller. These controllers should behave up to 115 200 bps like UART's. But sometimes it is very difficult to get the right configuration.
PART B: How to tell the kernel about the hardware settings
-4 cat /proc/ioports to see which ports are already in use.
-5 cat /proc/interrupts to see which interrupts are already in use.
-6 Make ports and interrupts available for use with the IR device, e.g. stop the pcmcia service or include a line like this in /etc/sysconfig/pcmcia: PCIC_OPTS="irq_list=3,4,5,7,9,10,12,14,15"
-7 Now try to guess what the right interrupt and port is. Use setserial /dev/ttySx irq M port 0xNNNN to tell the kernel. If there is more then one possible chance try them all (Note: As mentioned in the Serial-HOWTO you should not try irq 0, 1, 6, 8, 13, 14).
-8 If you were successful please send these parameters to the author, because I would like to include them in the IR hardware survey.
-9 Good luck.
It might also be necessary to fine tune the IR serial port with setserial, e.g., setserial /dev/ttyS0 spd_vhi (speed rate 115200).
Q2 - Question: For me, irattach hangs, but recognizes the printer. /var/log/messages shows that irattach found my HP LaserJet 6P.
Answer: The "hang" is normal for irattach. Everything is working right if you see the HP Laserjet show up in the log. "hang" means irattach is polling the IrDA-Devices for incoming connections. If you kill it with <CTRL C> the irattach program crashes and /dev/ttySx does not work anymore. The problem is within the irda module, and not with the irattach program. Rebooting is the only thing to do! Next time put irattach in the background by using irattach &. Stop it if necessary with killall irattach. Recommendation by Andreas Butz: To my knowledge, <CTRL Z> bg should work, too, but I haven't tried it in this specific case. Normally it has the exact same effect as appending & to a command.
Q3 - Question: I get a message like tcsetattr read/write error in /var/log/messages.
Answer: Caused probably by wrong /dev/ttyS* or wrong irq or port.
Q4 - Question: Every setting seems alright, because I get the appropriate messages. But it still does not work.
Answer: Move the devices to within 0.5 meter (1.5 feet). Check that only one application is using the infrared port. Check that both devices are using the same protocol, such as IrOBEX or IrCOMM.
Q5 - Question: I have downloaded the latest snapshot, and compiled it successfully under Linux 2.0.33 running on an IBM Thinkpad 560E. In the absence of any other IrDA machines to test with, is it safe to assume that once the module has been inserted and the syslog reports "irattach: Serial connection established.", is the IR really working, and will it start to respond once there is another machine with which to talk?
Answer by Dag Brattli: Sorry, this only means that irattach has done its part of the job, which is just to start the irda-tty. Maybe the message should have been different, but as I said, it tells that the serial connection between the irda-chip and the irda-driver is established.
Note: Support for IrDA on 2.0.x kernels has been discontinued. You are encouraged to switch to 2.2.x kernels and use the newest IrDA patches available at http://irda.sourceforge.net.
Q6 - Question: At startup modprobe -a checks /lib/modules/<KERNEL-VERSION>/net/irda.o and causes the messages: "IrLAP; Missing IrTTY /IrLMP Error no IrLAP connection" (in /var/log/messages and on the console).
Answer by Werner Heuser: Workaround for SYSTEM V style systems: Put a script named for example "ir_rmmod" containing
#!/bin/sh echo "$0 : remove irda module" rmmod irport.o rmmod irtty.o rmmod irda.o |
Q7 - Question by Ho Chin Keong: Is there other way of setting up communication between the 2 laptops besides setting up a LAN route between the two?
Answer by Dag Brattli: Yes and no! One of the IrDA standard, IrCOMM permits you to emulate a serial cable between two laptops, so you can use any application written for serial ports (terminals, PPP, slip, etc.). This is however not yet implemented in Linux/IrDA. The IrLPT (printer) support is actually a subset of IrCOMM, so some of it is working!
Q8 - Question by Ho Chin Keong: If I block the infrared path deliberately for more than 10 seconds, the connection could not re-establish. I have to kill the irattach and restart the whole procedure to start the infrared route. The connection could be maintained, however, if the blocking is less than 10 seconds. Is this part of the design or a bug? Is there any way whereby we can lengthen this time limit from 10 s to longer or infinitely?
Answer by Thomas Davis: This seems to be a bug in the primary side of the IrLAP/IrLMP code. It appears not to send the reset/disconnect notice all the way back up the stack. You'll notice it when IrLPT gets stuck in the query mode while you were trying to talk to a printer, and disconnected/interrupted it when it was handshaking. (and now, it shows up in the IrLAN portion)
Q9 - Pierre-Guillaume Raverdy asked: Should I update to IR lib on my palm and update the system to version 3.0.2?
Answer by Dag Brattli: You should not need to update your Pilot, but it should not do any harm to do so. It is however required if you want to use the IrCOMM library from IsComplete
Q10 - Pierre-Guillaume Raverdy asked: Also any simple source code (especially on the palm side) would be greatly appreciated.
Answer by Dag Brattli: Get the Pilot SDK from Palm. Unzip the examples.zip and take a look at the beamer application.
Q11 - Is there any IrDA support for BSD?
Answer: Linux/IrDA seems to be the only available GPL source yet.
Q12 - By Rui Oliveira: I am having a problem connecting a PalmIII to a Linux box with an Actisys 220L adapter. With a motherboard adapter (no brand but, I think, similar to the Actisys 210L) I simply redirect a pilot syncronization tool (pilot-xfer) to /dev/ttyS1 which has the ir adapter attached and, using IrLink in SIR mode, I can get the Linux box to talk with the PalmIII. Trying the above through a serial port with a serial-irda Actisys 220L adapter I can't get this to work. My question is :What happens if one just throws data into a serial port with a irda adapter?
Answer by Lichen Wang: In terms of hardware, IrDA SIR needs a serializer- deserializer, an encoder-decoder, and a transceiver. The UART that drives the COM port of any PC is a serializer-deserializer. In some PC, there is also an encoder-decoder which can be enabled or disabled by the BIOS. When it is disabled, the COM port is usable as an old COM port. When the encoder-decoder is enabled, usually the COM port is no longer usable but an IrDA port is now usable instead. Actisys IR-210 is a SIR transceiver and thus can be used if the PC has this kind of UART with an IrDA encoder-decoder and the BIOS has enabled it. Under this hardware configuration, you need to tell the Windows setup program that you have "standard infrared devices" and with "Built-in Infrared port on laptop or desktop". Actisys IR-220, on the other hand, includes both the encoder-decoder and the transceiver. It is designed to be used with a regular UART. If the UART in the PC has also the encoder-decoder built-in, you must use BIOS to disable that. Under either of this hardware configuration, you need to tell the Windows setup program that you have an "ACTiSYS" manufactured "ACT-IR220L Infrared Wireless Interface". To answer your question: In addition to throwing data at the serial port, you need to tell the UART and the encoder-decoder what data rate to use. In the case of a built-in encoder-decoder, when you set the data rate of the UART, the encoder-decode also get set correctly. In the case a separate encoder-decoder, you need to tell both of them the data rate separatly.
Q13 - If I try to make a connection, say telnet, it takes an incredibly long time for the login prompt to appear.
Answers by Renaud Baldura, Dag Brattli and Hee Thong: ... it's a DNS problem. The resolver times out trying to reverse-resolve the IP address of your incoming connection. I think just renaming /etc/resolv.conf to something else takes care of it. ... or add some static bindings in /etc/hosts for the machines you want to access in your ad-hoc network. That should avoid the DNS lookups. ... If both machines are in a private test environment, put the following line in the /etc/host.conf, order hosts, bind. This will make the machine check the /etc/host file before doing a DNS lookup. Remember to update the host file on both machines to reflect the IP and host names of the 2 machines.
Q14 - Question by David LaPorte: I was wondering if anyone has had any success getting the irda port on the Toshiba Tecra 740cdt working. ... I've read that it should show up at IRQ 11, ttyS2. Well, I have a PCMCIA modem which steals ttyS2 and the PCMCIA controller steals IRQ 11. Does anyone have any suggestions?
Answer by Dag Brattli: If you still have Win95 on your machine, you should go to the device manager and change the PnP setup for the IrDA port (something else than the stuff your're already using). You could for example move away ttyS1 (in Win95), so that it uses the values that the PCMCIA card is going to steal, and then use the settings from ttyS1 for ttyS2.
dagbnb ~/linux/test/ > cat /etc/sysconfig/pcmcia PCMCIA=yes PCIC=i82365 PCIC_OPTS="irq_list=7,9,10" CORE_OPTS= |