随笔-118  评论-133  文章-4  trackbacks-0

    BIOS下红外接口默认关闭,而linux-2.6.17前没有pnp处理,需要进入BIOS下手动开始或对内核打补丁,详细请参考:
http://www.thinkwiki.org/wiki/How_to_make_use_of_IrDA


    在我使用的FC4上已经安装了irda-util,版本为0.9.16-7,然而系统自带的irda启动脚本不能正常启动irda接口,参考网上资料,采用以下启动脚本:
http://www.51nb.com/forum/thread-246611-1-1.html

#!/bin/sh
#Start up the IrDA process and load necessary modules
#
case "$1" in
  start)
    #Start IRDA
    echo -n "Starting up the IR modules"

    modprobe irda
    modprobe ircomm
    modprobe ircomm-tty
    irattach /dev/ttyS1 -s
   
    echo "Done."
    echo ""
    ;;

  stop)
    #KILL IRDA
    echo -n "Stopping IRDA and removing used modules"

    #Kill the irattach process and remove the modules
    killall -9 irattach
    rmmod ircomm-tty ircomm irda

    echo "Done."
    echo ""
    ;;

  *)
    echo "Usage:irdastart.sh{start|stop}"
    echo ""
    exit 1
   
    esac
    exit 0
保存
chmod 755 myirda
chmod 755 /dev/ircomm0
开启:
./myirda start
关闭:
./myirda stop

测试:
打开手机红外线,对准接收窗口,./myirda start,运行irdadump命令,应该有数据显示,否则红外设置不成功

正常情况下可以看到类似以下信息:
16:59:12.083873 xid:cmd 9044ea60 > ffffffff S=6 s=* localhost hint=4400 [ Computer LAN Access ] (25)
16:59:12.082870 xid:rsp 9044ea60 < 0000277b S=6 s=5 Nokia 6020 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27)


    下载openobex

./configure --enable-apps
make
make install


使用:
Sending from computer:
irobex_palm3 /path/to/file.xxx
 
Recieving to computer:
irobex_palm3



注:
    使用ubuntu的朋友可以参考这个贴子:
http://ubuntuforums.org/showpost.php?p=504374&postcount=2
posted on 2008-04-09 01:05 lfc 阅读(560) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。