|
|
||
|
||
|
|
| Red Hat Documentation |
4. Linux/IrDA-Utils
4.1 Compilation
A recommendation from Bjoern Hansson <Bjorn.Hansson@signal.uu.se>: If To compile Dag Brattli: " The problem is that I'm including kernel header files which conflicts with the libc header files. So why do I need to include kernel header files? Well, the libc/glibc header files does not know that much about IrDA (yet). The reason is just that IrDA is quite new. I could have just defined the stuff in the program itself, but then people would be able to compile the stuff even if the definitions had changed in the kernel. I think its better that you get a compile error than some possible strange behaviour. If you don't want to wait until I figure out how to solve this stuff, you can just remove the linux header files and define the constants in your program yourself:
#define PF_IRDA 23 #define AF_IRDA PF_IRDA #define ARPHRD_IRDA 783 #define ETH_P_IRDA 0x0017 All the stuff above should not be changed, so it is probably safe to just hardcode them. I'll change the programs so they just includes the normal header files, and then defines these constants only if the header files didn't know about them. It should however be safe to include Though I never succeeded to compile all utilities without errors, I recommend to use at least the latest packages of
4.2 Precompiled PackagesNOKUBI Takatsugu provides an unofficial irda-utils Debian package (needs libc2.1). Efforts are on the way to include this package into the next Debian release, codename Potato.
4.3 Contents of Linux/IrDA-Utils
irmanagerThe
irattachUsually
load_miscA Perl script which loads a Linux/IrDA module and builds the according device in /dev using
/etc/irdaConfiguration files, e.g. contains the serial port of the SIR driver:
drivers network network.opts obex You should at least configure the IR driver drivers:
#! /bin/sh
#
# drivers
#
# Initialize and shutdown IrDA device drivers.
#
# This script should be invoked with two arguments. The first is the
# action to be taken, either "start", "stop", or "restart".
#
action=$1
device=$2
case "${action:?}" in
start)
irattach /dev/ttyS2 # The third serial port is an IrDA port
# irattach /dev/ttyS0 -d esi # Attach a ESI dongle to the first serial port
# insmod pc87108 # If your machine as a pc87108 FIR chipset
;;
stop)
killall irattach # ... or something. Currently not used
;;
restart)
/sbin/ifconfig ${device:?} down up
;;
esac
irdapingThis is a program similar to Here is one output sample (pinging an ACTiSYS IR-100M):
dagbnb /home/dagb/linux/irda-utils/irdaping/ # ./irdaping 0xf7be8388 IrDA ping (0xf7be8388): 32 bytes 32 bytes from 0xf7be8388: irda_seq=0 time=102.466003 ms. 32 bytes from 0xf7be8388: irda_seq=1 time=102.202003 ms. 32 bytes from 0xf7be8388: irda_seq=2 time=102.170998 ms. 32 bytes from 0xf7be8388: irda_seq=3 time=101.633003 ms. 4 packets received by filter
irdadumpOne advantage of implementing IrDA device drivers as network device drivers is that you should be able to attach sniffers to the device (or actually the packet type). That way, it is possible to use a really handy utility called Note: You probably have to be root for using Here is a sample output of a small session between Linux and a Palm III. This log shows that the local irobex layer is not responding, so the Palm III sends a disc frame.
dagbnb /home/dagb/linux/irda-utils/irdadump/ # ./irdadump 20:18:15.305711 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=0 20:18:15.385597 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=1 20:18:15.465568 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=2 20:18:15.545953 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=3 20:18:15.625574 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=4 20:18:15.705575 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=5 20:18:15.785601 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=255,info=Linux 20:18:18.075526 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=0 20:18:18.225498 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=1 20:18:18.375495 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=2 20:18:18.526355 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=3 20:18:18.675614 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=4 20:18:18.676364 xid:rsp:saddr=0x05c589 > daddr=0xb50c14b,S=6,s=4 20:18:18.765506 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=5 20:18:18.927221 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=255,info=Palm III 20:18:18.975796 snrm:cmd,ca=0xfe,pf=1 20:18:18.976534 ua:rsp,ca=0x58,pf=1 20:18:18.977145 ua:rsp,ca=0x58,pf=1 20:18:19.585627 rr:rsp,ca=0x58,nr=0,pf=1 20:18:19.585810 rr:rsp,ca=0x58,nr=0,pf=1 20:18:19.606413 i:cmd,ca=0x58,nr=0,ns=0,pf=1 20:18:19.606582 rr:rsp,ca=0x58,nr=1,pf=1 20:18:19.627708 rr:cmd,ca=0x58,nr=0,pf=1 20:18:19.627871 i:rsp,ca=0x58,nr=1,ns=0,pf=1 20:18:19.650571 disc:cmd,ca=0x58,pf=1 20:18:19.650736 ua:rsp,ca=0x58,pf=1 20:18:21.165524 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=0 20:18:21.315608 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=1 20:18:21.315793 xid:rsp:saddr=0x05c589 > daddr=0xb50c14b,S=6,s=1 20:18:21.395499 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=2 20:18:21.545516 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=3 20:18:21.695500 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=4 20:18:21.845840 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=5 20:18:22.007222 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=255,info=Palm III 20:18:22.056143 snrm:cmd,ca=0xfe,pf=1 20:18:22.056310 ua:rsp,ca=0xc8,pf=1 20:18:22.056381 ua:rsp,ca=0xc8,pf=1 37 pacckets received by filter
gnobexGNOME GUI for using the IrOBEX protocol, to connect to Palm III.
irkbdSupport for infrared keyboard (and mouse?) protocol IrKBD.
irdalibLinux/IrDA library.
obexPlease compile
Next Previous Contents |
|
|