UbuntuHelp:IrdaHowto
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
目录
IBM Thinkpad T40 IRDA Howto
This document outlines how to get the IRDA working with Ubuntu 5.04 and the FIR driver. This procedure also works for Ubuntu Breezy development release colony 3.
Pre-requisites
1) Install the irda-utils package from the universe repository
sudo apt-get install irda-utils
2) Install the setserial package
sudo apt-get install setserial
3) Ensure infrared is enabled in your BIOS - if not, enable it and reboot.
Configuration
1) Modify /etc/default/irda-utils
sudo vi /etc/default/irda-utils
- change the line reading:
DEVICE="/dev/ttyS1"
- to:
DEVICE="irda0"
- then change the line reading:
SETSERIAL=""
- to:
SETSERIAL="/dev/ttyS1"
2) Edit /etc/modprobe.d/irda-utils
sudo vi /etc/modprobe.d/irda-utils
- add the following two lines to the end of the file:
alias irda0 nsc-ircc options nsc-ircc dongle_id=0x09
3) Edit /etc/modules
sudo vi /etc/modules
- add the ircomm-tty module to the modules to be loaded at boot time. Add the following line to the end of the file:
ircomm-tty
Use
Re-starting irda:
sudo /etc/init.d/irda-utils stop sudo /etc/init.d/irda-utils start
Loading the FIR IRDA driver:
sudo modprobe irda0
Loading the ircomm-tty module:
sudo modprobe ircomm-tty
Testing operation
Output from dmesg should look something like:
nsc-ircc, Found chip at base=0x02e nsc-ircc, driver loaded (Dag Brattli) IrDA: Registered device irda0 nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500 irlap_change_speed(), setting speed to 9600
If you put a mobile phone or something with an IR interface in front of the IR receiver on your laptop, the IR daemon should pick it up. You can confirm by running:
cat /proc/net/irda/discovery
Example output from this:
IrLMP: Discovery log: nickname: LGE U8xxx, hint: 0x9124, saddr: 0x00bfb934, daddr: 0x000034f6
Confirm the link is up using irdaping:
happy@nirvana:/etc/default$ sudo irdaping 0x000034f6 IrDA ping (0x000034f6 on irda0): 32 bytes 32 bytes from 0x000034f6: irda_seq=0 time=110.12 ms. 32 bytes from 0x000034f6: irda_seq=1 time=110.15 ms.
Another useful tool to see if things are up and running is irdadump.
User applications
Gnome Phone Manager (http://usefulinc.com/software/phonemgr/) works using IRDA to send/receive SMS messages via phones. It has been tested using a Nokia 6610 and LG U8138 phone via the setup as described in this document. Install this application from the universe repository:
sudo apt-get install gnome-phone-manager