学院首页>操作系统>Linux>Red hat下搞定红外线/GPRS/WAP代理上网

Red hat下搞定红外线/GPRS/WAP代理上网

作者:sixth 来源:Linux8 添加时间:2006-5-26 13:44:17

  笔记本:IBM THINKPAD 570E
  手机: 三菱M320

  一、硬件设定。
  开机,按F1进BIOS,enable serial port,enable infrared。

  二、安装irda-utils0.9.14
  下载地址:http://sourceforge.net/project/showf...?group_id=5616
  解压--- -./configure ------ make all -----make install

  三、编辑红外脚本myirda
  vi myirda
  内容如下:

#!/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命令,应该有数据显示,否则红外设置不成功。

站内搜索