个人工具

“UbuntuHelp:IrdaHowto”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/IrdaHowto}} {{Languages|UbuntuHelp:IrdaHowto}} == IBM Thinkpad T40 IRDA Howto == This document outlines how to get the IRDA working with Ubuntu 5....)
 
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/IrdaHowto}}
 
{{From|https://help.ubuntu.com/community/IrdaHowto}}
 
{{Languages|UbuntuHelp:IrdaHowto}}
 
{{Languages|UbuntuHelp:IrdaHowto}}
== IBM Thinkpad T40 IRDA Howto ==
+
#title Using IrDA infrared devices
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 ===
+
This document outlines how to get IrDA infrared connections working with Ubuntu 5.04 and the FIR driver. This procedure also works for Ubuntu Breezy development release colony 3. It is unknown if these instructions apply to later versions of Ubuntu.
1) Install the irda-utils package from the universe repository
+
 
+
<pre><nowiki>
+
sudo apt-get install irda-utils
+
</nowiki></pre>
+
 
+
2) Install the setserial package
+
 
+
<pre><nowiki>
+
sudo apt-get install setserial
+
</nowiki></pre>
+
 
+
3) Ensure infrared is enabled in your BIOS - if not, enable it and reboot.
+
 
+
=== Configuration ===
+
1) Modify /etc/default/irda-utils
+
 
+
<pre><nowiki>
+
sudo vi /etc/default/irda-utils
+
</nowiki></pre>
+
 
+
* change the line reading:
+
 
+
<pre><nowiki>
+
DEVICE="/dev/ttyS1"
+
</nowiki></pre>
+
 
+
* to:
+
 
+
<pre><nowiki>
+
DEVICE="irda0"
+
</nowiki></pre>
+
 
+
* then change the line reading:
+
 
+
<pre><nowiki>
+
SETSERIAL=""
+
</nowiki></pre>
+
 
+
* to:
+
 
+
<pre><nowiki>
+
SETSERIAL="/dev/ttyS1"
+
</nowiki></pre>
+
 
+
2) Edit /etc/modprobe.d/irda-utils
+
 
+
<pre><nowiki>
+
sudo vi /etc/modprobe.d/irda-utils
+
</nowiki></pre>
+
 
+
* add the following two lines to the end of the file:
+
  
 +
* Install the ''irda-utils'' and ''setserial'' packages from the Universe repository
 +
* Ensure that infrared/IrDA is enabled in your BIOS; if not, enable it and reboot. Your computer's BIOS manual should have instructions on enabling infrared.
 +
* Open a Terminal and type: <code><nowiki>sudo gedit /etc/default/irda-utils</nowiki></code>
 +
* Change the line reading <code><nowiki>DEVICE="/dev/ttyS1"</nowiki></code> to <code><nowiki>DEVICE="irda0"</nowiki></code>
 +
* Change the line reading <code><nowiki>SETSERIAL=""</nowiki></code> to <code><nowiki>SETSERIAL="/dev/ttyS1"</nowiki></code>
 +
* Save the file and then open the <code><nowiki>/etc/modprobe.d/irda-utils</nowiki></code> file.
 +
* Add the following two lines to the end of the file:
 
<pre><nowiki>
 
<pre><nowiki>
 
alias irda0 nsc-ircc
 
alias irda0 nsc-ircc
 
options nsc-ircc dongle_id=0x09
 
options nsc-ircc dongle_id=0x09
 
</nowiki></pre>
 
</nowiki></pre>
 
+
*#8 Save the file and then open the <code><nowiki>/etc/modules</nowiki></code> file.
3) Edit /etc/modules
+
* Add the following line to the end of the file: <code><nowiki>ircomm-tty</nowiki></code>
 
+
* Save the file and exit the text editor.
<pre><nowiki>
+
* To restart <code><nowiki>irda</nowiki></code>, open a Terminal and type:
sudo vi /etc/modules
+
</nowiki></pre>
+
 
+
* add the ircomm-tty module to the modules to be loaded at boot time. Add the following line to the end of the file:
+
 
+
<pre><nowiki>
+
ircomm-tty
+
</nowiki></pre>
+
 
+
=== Use ===
+
Re-starting irda:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/irda-utils stop
 
sudo /etc/init.d/irda-utils stop
 
sudo /etc/init.d/irda-utils start
 
sudo /etc/init.d/irda-utils start
 
</nowiki></pre>
 
</nowiki></pre>
 +
*#12 To load the FIR IRDA driver, type: <code><nowiki>sudo modprobe irda0</nowiki></code>
 +
* To load the the ircomm-tty module, type: <code><nowiki>sudo modprobe ircomm-tty</nowiki></code>
  
Loading the FIR IRDA driver:
+
=== Testing operation ===
  
<pre><nowiki>
+
Open a Terminal and type <code><nowiki>dmesg</nowiki></code>. The output from dmesg should be similar to the following:
sudo modprobe irda0
+
</nowiki></pre>
+
 
+
Loading the ircomm-tty module:
+
 
+
<pre><nowiki>
+
sudo modprobe ircomm-tty
+
</nowiki></pre>
+
 
+
=== Testing operation ===
+
Output from dmesg should look something like:
+
  
 
<pre><nowiki>
 
<pre><nowiki>
第106行: 第39行:
 
</nowiki></pre>
 
</nowiki></pre>
  
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:
+
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 this by typing the following in a Terminal:
  
 
<pre><nowiki>
 
<pre><nowiki>
第112行: 第45行:
 
</nowiki></pre>
 
</nowiki></pre>
  
Example output from this:
+
The following is example output from the previous command:
  
 
<pre><nowiki>
 
<pre><nowiki>
 
IrLMP: Discovery log:
 
IrLMP: Discovery log:
 
 
nickname: LGE U8xxx, hint: 0x9124, saddr: 0x00bfb934, daddr: 0x000034f6
 
nickname: LGE U8xxx, hint: 0x9124, saddr: 0x00bfb934, daddr: 0x000034f6
 
 
</nowiki></pre>
 
</nowiki></pre>
  
Confirm the link is up using irdaping:
+
You can confirm that the link is up by using <code><nowiki>irdaping</nowiki></code>:
  
 
<pre><nowiki>
 
<pre><nowiki>
happy@nirvana:/etc/default$ sudo irdaping 0x000034f6
+
$ sudo irdaping 0x000034f6
 +
 
 
IrDA ping (0x000034f6 on irda0): 32 bytes
 
IrDA ping (0x000034f6 on irda0): 32 bytes
 
32 bytes from 0x000034f6: irda_seq=0 time=110.12 ms.
 
32 bytes from 0x000034f6: irda_seq=0 time=110.12 ms.
第130行: 第62行:
 
</nowiki></pre>
 
</nowiki></pre>
  
Another useful tool to see if things are up and running is irdadump.
+
Another useful command to see if things are up and running is <code><nowiki>irdadump</nowiki></code>.
 
+
  
 
=== User applications ===
 
=== 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:
 
 
<pre><nowiki>
 
sudo apt-get install gnome-phone-manager
 
</nowiki></pre>
 
  
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
+
[http://usefulinc.com/software/phonemgr/ Gnome Phone Manager] works using IRDA to send/receive SMS messages via phones. It has been tested using a Nokia 6610 and LG U8138 phone using the procedure described in this document. Install the <code><nowiki>gnome-phone-manager</nowiki></code> package from the Universe repository in order to use Gnome Phone Manager.
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2007年11月22日 (四) 13:16的版本

  1. title Using IrDA infrared devices

This document outlines how to get IrDA infrared connections working with Ubuntu 5.04 and the FIR driver. This procedure also works for Ubuntu Breezy development release colony 3. It is unknown if these instructions apply to later versions of Ubuntu.

  • Install the irda-utils and setserial packages from the Universe repository
  • Ensure that infrared/IrDA is enabled in your BIOS; if not, enable it and reboot. Your computer's BIOS manual should have instructions on enabling infrared.
  • Open a Terminal and type: sudo gedit /etc/default/irda-utils
  • Change the line reading DEVICE="/dev/ttyS1" to DEVICE="irda0"
  • Change the line reading SETSERIAL="" to SETSERIAL="/dev/ttyS1"
  • Save the file and then open the /etc/modprobe.d/irda-utils file.
  • Add the following two lines to the end of the file:
alias irda0 nsc-ircc
options nsc-ircc dongle_id=0x09
    1. 8 Save the file and then open the /etc/modules file.
  • Add the following line to the end of the file: ircomm-tty
  • Save the file and exit the text editor.
  • To restart irda, open a Terminal and type:
sudo /etc/init.d/irda-utils stop
sudo /etc/init.d/irda-utils start
    1. 12 To load the FIR IRDA driver, type: sudo modprobe irda0
  • To load the the ircomm-tty module, type: sudo modprobe ircomm-tty

Testing operation

Open a Terminal and type dmesg. The output from dmesg should be similar to the following:

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 this by typing the following in a Terminal:

cat /proc/net/irda/discovery

The following is example output from the previous command:

IrLMP: Discovery log:
nickname: LGE U8xxx, hint: 0x9124, saddr: 0x00bfb934, daddr: 0x000034f6

You can confirm that the link is up by using irdaping:

$ 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 command to see if things are up and running is irdadump.

User applications

Gnome Phone Manager works using IRDA to send/receive SMS messages via phones. It has been tested using a Nokia 6610 and LG U8138 phone using the procedure described in this document. Install the gnome-phone-manager package from the Universe repository in order to use Gnome Phone Manager.