| Red Hat Documentation |
2.3. Linux/IrDA-Utils2.3.1. Compilation
A recommendation from Bjoern Hansson <Bjorn.Hansson@signal.uu.se>: If make depend fails on stdef.h and stdarg.h just add -I/usr/lib/gcc-lib/i586-linux/egcs-2.90.29/include/ or the according path for your system to the SYS_INCLUDES line in Makefile. To compile irdadump and irdaping (which are not necessary to get Linux/IrDA to work) you probably to tweek the source a little: 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:
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 linux/irda.h ." Though I never succeeded to compile all utilities without errors, I recommend to use at least the latest packages of libtool, m4, autoconf, and automake if you want to compile irdadump, irdaping, etc. 2.3.2. Precompiled PackagesNOKUBI Takatsugu provides an unofficial irda-utils Debian package (needs libc2.1). This package is part of the Potato Debian release. Also Mandrake 6.1, Redhat 6.1 and SuSE 6.1 contain RPM packages of irda-utils. 2.3.3. Contents of Linux/IrDA-Utils2.3.3.1. irmanagerThe irmanager is user-space daemon that is inspired and quite similar to the cardmgr used in the PCMCIA distribution. For example, if IrLMP discovers a remote device with IrLAN provider capabilities and no local IrLAN client has registered, then IrLMP will send an event to the IrManager and make it modprobe the module required. When application level clients are ready for communication and user-space configuration, they can also notify IrManager about this, so that it can execute the right script. For example will IrLAN send the event EVENT_IRLAN_START when the data channel is ready for exchanging Ethernet frames. When IrManager receives this event, it will execute /etc/irda/network start <devname> to configure the network interface. If you use the RedHat variant of it, it will in turn execute /sbin/ifup<devname> . 2.3.3.2. irattachUsually irattach is started by irmanager. irattach attaches an IrDA capable tty to the basic services of Linux/IrDA. If kerneld or kmod are running, the modules irda and irtty are loaded automatically, if not you have to load them by hand in that order. It is recommended to start irattach in the background. To stop irattach just kill the process. 2.3.3.3. load_miscA Perl script which loads a Linux/IrDA module and builds the according device in /dev using mknod. 2.3.3.4. /etc/irdaConfiguration files, e.g. contains the serial port of the SIR driver:
You should at least configure the IR driver drivers:
2.3.3.5. irdapingThis is a program similar to ping(8). It sends IrDA test frames (added some userdata which contains the frame number and the time the frame was sent). You can also change the size of the frame by using the -s option. You must supply an IrDA device address, and not an IP address. You have to be able to get that device address by some method irdadump? Here is one output sample (pinging an ACTiSYS IR-100M):
2.3.3.6. 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 irdadump (instead of tcpdump). This will make debugging MUCH easier. Linux-2.2 implements the BPF (Berkeley Packet Filter), so its possible to filter out exactly the frames you want to see. Note: You probably have to be root for using irdadump . CONFIG_PACKET has to be enabled in the kernel. If compiled as a module you might load the module manually. irdadump has been converted into a library, so it can be used from GUI applications as well. 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.
2.3.3.7. gnobexGNOME GUI for using the IrOBEX protocol, to connect to Palm III. 2.3.3.8. irkbdSupport for infrared keyboard (and mouse?) protocol IrKBD. 2.3.3.9. irdalibLinux/IrDA library. 2.3.3.10. obexPlease compile irdalib before compiling obex. Contains irobex_test, irobex_receive and irobex_palm3 . And obex_tcp which makes it possible to use OBEX over TCP/IP. 2.3.3.11. findchipfindchip can be used to detect the type of FIR chip. |
|
© 2001 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Y2K statement : Contact Red Hat |