个人工具

“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....)
 
 
(未显示同一用户的6个中间版本)
第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.
+
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.
 
+
Working in FIR mode with (k)ubuntu 8.10 - Toshiba laptop, smsc-ircc device with "no" BIOS setting for IrDA. Setup is similar. See smsc-ircc2.
=== Pre-requisites ===
+
<ol><li>Install the ''irda-utils'' and ''setserial'' packages from the Universe repository
1) Install the irda-utils package from the universe repository
+
</li><li>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.
 +
</li><li>Open a Terminal and type: <code><nowiki>sudo gedit /etc/default/irda-utils</nowiki></code>
 +
</li><li>Change the line reading <code><nowiki>DEVICE="/dev/ttyS1"</nowiki></code> to <code><nowiki>DEVICE="irda0"</nowiki></code>
 +
</li><li>Change the line reading <code><nowiki>SETSERIAL=""</nowiki></code> to <code><nowiki>SETSERIAL="/dev/ttyS1"</nowiki></code>
 +
</li><li>Save the file and then open the <code><nowiki>/etc/modprobe.d/irda-utils</nowiki></code> file.
 +
</li><li>Add the following two lines to the end of the file:</li></ol>
  
 
<pre><nowiki>
 
<pre><nowiki>
sudo apt-get install irda-utils
+
alias irda0 nsc-ircc
 +
options nsc-ircc dongle_id=0x09
 
</nowiki></pre>
 
</nowiki></pre>
 
+
1.#8 Save the file and then open the <code><nowiki>/etc/modules</nowiki></code> file.
2) Install the setserial package
+
<ol><li>Add the following line to the end of the file: <code><nowiki>ircomm-tty</nowiki></code>
 +
</li><li>Save the file and exit the text editor.
 +
</li><li>To restart <code><nowiki>irda</nowiki></code>, open a Terminal and type:</li></ol>
  
 
<pre><nowiki>
 
<pre><nowiki>
sudo apt-get install setserial
+
sudo /etc/init.d/irda-utils stop
 +
sudo /etc/init.d/irda-utils start
 
</nowiki></pre>
 
</nowiki></pre>
 +
1.#12 To load the FIR IRDA driver, type: <code><nowiki>sudo modprobe irda0</nowiki></code>
 +
<ol><li>To load the the ircomm-tty module, type: <code><nowiki>sudo modprobe ircomm-tty</nowiki></code></li></ol>
  
3) Ensure infrared is enabled in your BIOS - if not, enable it and reboot.
+
----
 
+
=== smsc-ircc2 ===
=== Configuration ===
+
1. smsc-ircc2 is configured as a module in the (k)ubuntu 2.6.27-9-generic kernel.
1) Modify /etc/default/irda-utils
+
2. Install irda-utils and setserial packages.
 +
3. Open a terminal and type (using nano editor).
  
 
<pre><nowiki>
 
<pre><nowiki>
sudo vi /etc/default/irda-utils
+
sudo nano  /etc/modprobe.d/irda-utils
 
</nowiki></pre>
 
</nowiki></pre>
 
+
edit - add line:
* change the line reading:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
DEVICE="/dev/ttyS1"
+
alias irda0 smsc-ircc2
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Ctrl-X then Y then Return to save. Then:
* to:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
DEVICE="irda0"
+
sudo nano /etc/default/irda-utils
 
</nowiki></pre>
 
</nowiki></pre>
 
+
edit - as follows:
* then change the line reading:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
SETSERIAL=""
+
DEVICE="irda0"
 +
SETSERIAL="/dev/ttyS0"
 +
SMCINIT="no"
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Save as before. Then:
* to:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
SETSERIAL="/dev/ttyS1"
+
sudo nano /etc/init.d/irda-setup
</nowiki></pre>
+
</nowiki></pre>  
 
+
edit - under: FIR="smsc-ircc2"; - edit:
2) Edit /etc/modprobe.d/irda-utils
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
sudo vi /etc/modprobe.d/irda-utils
+
OPTIONS="--ignore-install ircc_dma=3 ircc_irq=3 ircc_fir=0x130 ircc_sir=0x3f8"
 
</nowiki></pre>
 
</nowiki></pre>
 +
Save as before.
 +
4. Start IrDA as in the first section. However, following subsequent bootups, IrDA may be started and stopped in a terminal, as follows.
  
* add the following two lines to the end of the file:
+
Start IrDA:
 
+
 
<pre><nowiki>
 
<pre><nowiki>
alias irda0 nsc-ircc
+
sudo irattach irda0 -s
options nsc-ircc dongle_id=0x09
+
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Stop IrDA:
3) Edit /etc/modules
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
sudo vi /etc/modules
+
sudo killall irattach
</nowiki></pre>
+
</nowiki></pre>  
 
+
Modules ircomm, ircomm-tty, etc may be loaded as required. Testing operation is the same as below. Outputs will vary of course.
* add the ircomm-tty module to the modules to be loaded at boot time. Add the following line to the end of the file:
+
NOTE: Invoking smcinit or setting to "yes" in /etc/defaults/irda-utils prevents operation of the smsc-ircc device. It is only useful to probe the device using the -v (verbose) option.
 
+
----
<pre><nowiki>
+
ircomm-tty
+
</nowiki></pre>
+
 
+
=== Use ===
+
Re-starting irda:
+
 
+
<pre><nowiki>
+
sudo /etc/init.d/irda-utils stop
+
sudo /etc/init.d/irda-utils start
+
</nowiki></pre>
+
 
+
Loading the FIR IRDA driver:
+
 
+
<pre><nowiki>
+
sudo modprobe irda0
+
</nowiki></pre>
+
 
+
Loading the ircomm-tty module:
+
 
+
<pre><nowiki>
+
sudo modprobe ircomm-tty
+
</nowiki></pre>
+
 
+
 
=== Testing operation ===
 
=== Testing operation ===
Output from dmesg should look something like:
+
Open a Terminal and type <code><nowiki>dmesg</nowiki></code>. The output from dmesg should be similar to the following:
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
nsc-ircc, Found chip at base=0x02e
 
nsc-ircc, Found chip at base=0x02e
第105行: 第82行:
 
irlap_change_speed(), setting speed to 9600
 
irlap_change_speed(), setting speed to 9600
 
</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 this by typing the following in a Terminal:
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:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
cat /proc/net/irda/discovery
 
cat /proc/net/irda/discovery
 
</nowiki></pre>
 
</nowiki></pre>
 
+
The following is example output from the previous command:
Example output from this:
+
 
+
 
<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>
 +
You can confirm that the link is up by using <code><nowiki>irdaping</nowiki></code>:
 +
<pre><nowiki>
 +
$ sudo irdaping 0x000034f6
  
Confirm the link is up using irdaping:
 
 
<pre><nowiki>
 
happy@nirvana:/etc/default$ 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.
 
32 bytes from 0x000034f6: irda_seq=1 time=110.15 ms.
 
32 bytes from 0x000034f6: irda_seq=1 time=110.15 ms.
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Another useful command to see if things are up and running is <code><nowiki>irdadump</nowiki></code>.
Another useful tool to see if things are up and running is irdadump.
+
 
+
 
+
 
=== 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:
+
[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.
 
+
<pre><nowiki>
+
sudo apt-get install gnome-phone-manager
+
</nowiki></pre>
+
 
+
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年12月16日 (二) 19:05的最新版本

  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. Working in FIR mode with (k)ubuntu 8.10 - Toshiba laptop, smsc-ircc device with "no" BIOS setting for IrDA. Setup is similar. See smsc-ircc2.

  1. Install the irda-utils and setserial packages from the Universe repository
  2. 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.
  3. Open a Terminal and type: sudo gedit /etc/default/irda-utils
  4. Change the line reading DEVICE="/dev/ttyS1" to DEVICE="irda0"
  5. Change the line reading SETSERIAL="" to SETSERIAL="/dev/ttyS1"
  6. Save the file and then open the /etc/modprobe.d/irda-utils file.
  7. 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.

  1. Add the following line to the end of the file: ircomm-tty
  2. Save the file and exit the text editor.
  3. 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

  1. To load the the ircomm-tty module, type: sudo modprobe ircomm-tty

smsc-ircc2

1. smsc-ircc2 is configured as a module in the (k)ubuntu 2.6.27-9-generic kernel. 2. Install irda-utils and setserial packages. 3. Open a terminal and type (using nano editor).

sudo nano  /etc/modprobe.d/irda-utils

edit - add line:

alias irda0 smsc-ircc2

Ctrl-X then Y then Return to save. Then:

sudo nano /etc/default/irda-utils

edit - as follows:

DEVICE="irda0"
SETSERIAL="/dev/ttyS0"
SMCINIT="no"

Save as before. Then:

sudo nano /etc/init.d/irda-setup

edit - under: FIR="smsc-ircc2"; - edit:

OPTIONS="--ignore-install ircc_dma=3 ircc_irq=3 ircc_fir=0x130 ircc_sir=0x3f8"

Save as before. 4. Start IrDA as in the first section. However, following subsequent bootups, IrDA may be started and stopped in a terminal, as follows.

Start IrDA:

sudo irattach irda0 -s

Stop IrDA:

sudo killall irattach

Modules ircomm, ircomm-tty, etc may be loaded as required. Testing operation is the same as below. Outputs will vary of course. NOTE: Invoking smcinit or setting to "yes" in /etc/defaults/irda-utils prevents operation of the smsc-ircc device. It is only useful to probe the device using the -v (verbose) option.


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.