May
2
本文旨在记录如何在Ubuntu下配置红外设备并通过红外设备发送/接收文件
如何配置和测试: 转自 https://help.ubuntu.com/community/IrdaHowto (Felix修改了一点点)
如何使用ircp: felix自己写的。
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.
1. Install the irda-utils and setserial packages from the Universe repository
sudo apt-get install irda-utils setserial
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"
Change the line reading SETSERIAL="" to SETSERIAL="/dev/ttyS1"
5. open the /etc/modprobe.d/irda-utils file.
Add the following two lines to the end of the file:
6. Open the /etc/modules file.
Add the following line to the end of the file: ircomm-tty
7. To restart irda, open a Terminal and type:
8. To load the FIR IRDA driver, type: sudo modprobe irda0
9. To load the the ircomm-tty module, type: sudo modprobe ircomm-tty
Testing operation (测试)
if you successfully configed irda, type: ifconfig , you'll see irda0
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.
Using Operation (使用)
程序1: ircp
type: sudo apt-get install openobex-apps to get "ircp"
type: man ircp to see how to use ircp
ircp -r (waiting to receive files)
ircp filename (send filename)
程序2: irobex_palm3
irobex_palm3 FILENAME (send filenam)
irobex_palm3 (wait to receive, save at current dir)
程序3: irxfer
irxfer (wait to receive, save at current dir)
irxfer FILENAME
程序4: obexftp
这个程序牛B,自己细看使用方法吧(obexftp --help),下面列出几个
obexftp -i --put FILENAME
obexftp -i -l
obexftp -i --get FILENAME
felix的dopod 586w可以受到ircp和irobex_palm3发送的文件,但是586w发送文件的时候ircp不能接收,irobex_palm3 可以接收
转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php 。
如何配置和测试: 转自 https://help.ubuntu.com/community/IrdaHowto (Felix修改了一点点)
如何使用ircp: felix自己写的。
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.
1. Install the irda-utils and setserial packages from the Universe repository
sudo apt-get install irda-utils setserial
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"
Change the line reading SETSERIAL="" to SETSERIAL="/dev/ttyS1"
5. 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
options nsc-ircc dongle_id=0x09
6. Open the /etc/modules file.
Add the following line to the end of the file: ircomm-tty
7. To restart irda, open a Terminal and type:
引用
sudo /etc/init.d/irda-utils stop
sudo /etc/init.d/irda-utils start
sudo /etc/init.d/irda-utils start
8. To load the FIR IRDA driver, type: sudo modprobe irda0
9. To load the the ircomm-tty module, type: sudo modprobe ircomm-tty
Testing operation (测试)
if you successfully configed irda, type: ifconfig , you'll see irda0
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.
Using Operation (使用)
程序1: ircp
type: sudo apt-get install openobex-apps to get "ircp"
type: man ircp to see how to use ircp
ircp -r (waiting to receive files)
ircp filename (send filename)
程序2: irobex_palm3
irobex_palm3 FILENAME (send filenam)
irobex_palm3 (wait to receive, save at current dir)
程序3: irxfer
irxfer (wait to receive, save at current dir)
irxfer FILENAME
程序4: obexftp
这个程序牛B,自己细看使用方法吧(obexftp --help),下面列出几个
obexftp -i --put FILENAME
obexftp -i -l
obexftp -i --get FILENAME
felix的dopod 586w可以受到ircp和irobex_palm3发送的文件,但是586w发送文件的时候ircp不能接收,irobex_palm3 可以接收
欢迎扫码关注:
转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php 。