8.3 Infrared Dongle

 <  Day Day Up  >  

If you don't have built-in infrared support, or if you can't get the built-in infrared to work, use an infrared dongle. If your dongle is compatible with the USB and IrDA specifications, it should just work. We tested the WINIC W-USB-180 IrDA dongle (http://www.winic.com.tw/180.htm), which is available in the U.S. from MadsonLine (http://www.madsonline.com/).

The most compelling reason to use an external dongle is the awkward placement of infrared ports on devices. Figure 8-3 shows how we had to position an HP iPaq upside down to use it with the ThinkPad's built-in IrDA port. Figure 8-4 shows a much more relaxed positioning using the W-USB-180..

Figure 8-3. Awkward infrared port placement
figs/luw_0803.gif
Figure 8-4. Taking things into your own hands with an external IrDA adapter
figs/luw_0804.gif

At the time of this writing, support for USB infrared dongles was experimental. We suggest you compile the latest kernel available in the series you are using and configure irda-usb as a module ( CONFIG_USB_IRDA ). You should also disable ir-usb , which conflicts with irda-usb . See "IrDA in the Kernel" earlier in this chapter


We got the W-USB-180 adapter to work by following these steps:

  1. We stopped irda , just in case it had been started earlier:

     #  /etc/init.d/irda stop  
  2. We disabled the ir-usb module, which appears in some recent kernels and conflicts with the driver that we should be using, irda-usb :

     #  cd /lib/modules/  #  find . -name ir-usb.o  #  cd ./2.4.21-166-default/kernel/drivers/usb/serial/  #  mv ir-usb.o ir-usb.o.unused  
  3. (Optional.) If you've already plugged in the dongle in the ir-usb module may have already claimed it. You can convince that module to release the dongle with this command (you may have to run it more than once if there are some other dependencies that prevent the modules from unloading):

     #  rmmod ircomm-tty ircomm irtty ir-usb irda-usb irda  
  4. Next, we modprobe ed the irda-usb module, and dmesg showed that the device irda0 had come up (the actual device name may vary on your system):

     #  modprobe irda-usb  #  dmesg  grep irda  usb.c: registered new driver irda-usb IrDA: Registered device irda0 
  5. A device name of irda X (where X is some number) indicates that you've loaded the IrDA device as a network device. So, instead of putting the pathname to a device (such as /dev/ttyS2 ) in your IrDA configuration file, you should put just the device name alone. For example, under Debian 3.0r1, we set IRDADEV=irda0 in /etc/irda.conf (for a list of some Linux distributions and the IrDA configuration files used by each, see the Debian entry in Section 8.2 earlier in this chapter).

  6. After this, we rebooted, but we could have also started IrDA support with /etc/init.d/irda start .

For more information on using infrared dongles with Linux, including serial port dongles, see the sections on dongles in the Linux Infrared HOWTO (http://www.tuxmobil.com/Infrared-HOWTO/Infrared-HOWTO.html).

For specific details on using USB dongles, see the IrDA and USB section of the Linux Infrared HOWTO at http://www.tuxmobil.com/Infrared-HOWTO/infrared-howto-s-irda-usb.html.

 <  Day Day Up  >  


Linux Unwired
Linux Unwired
ISBN: 0596005830
EAN: 2147483647
Year: 2004
Pages: 100

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net