Linux Unwired [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Unwired [Electronic resources] - نسخه متنی

Edd Dumbill, Brian Jepson, Roger Weeks

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








8.3 Infrared Dongle


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 http://www.winic.com.tw/180), 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



Figure 8-4. Taking things into your own hands with an external IrDA adapter



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:

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

# /etc/init.d/irda stop

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

(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

Next, we modprobeed 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

A device name of
irdaX (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).

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-HOWTOl).

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-usbl.


/ 100