home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 1: Linux / CD1.iso / doc / HOWTO / IR-HOWTO < prev    next >
Text File  |  1998-10-14  |  29KB  |  925 lines

  1.   Linux IR HOWTO
  2.   Werner Heuser, <r2d2c3po@zedat.fu-berlin.de>
  3.   v1.2, 24 August 1998
  4.  
  5.   An introduction to Linux and infrared devices and how to use the soft¡
  6.   ware provided by the Linux/IR project. This package uses IrDA (TM)
  7.   compliant standards. Because IrDA (TM) is a trademark the project is
  8.   named Linux/IR. IrDA (TM) is an industrial standard for infrared wire¡
  9.   less communication, and most laptops sold today are equipped with an
  10.   IrDA compliant infrared transceiver. IrDA serial ports let you commu¡
  11.   nicate with devices such as printers, modems, fax, LAN, and other lap¡
  12.   tops. Speed ranges from 2400bps to 4Mbps.
  13.   ______________________________________________________________________
  14.  
  15.   Table of Contents
  16.  
  17.  
  18.   1. Introduction
  19.  
  20.   2. Prerequisites
  21.  
  22.   3. Compilation
  23.  
  24.   4. Configuration
  25.  
  26.      4.1 General Configuration
  27.      4.2 Printer Connection Setup
  28.      4.3 LAN Connection Setup
  29.      4.4 Dongle Connection Setup
  30.      4.5 Palm III Connection Setup
  31.      4.6 Window$95 and Linux/IR
  32.      4.7 Fast InfraRed (FIR)
  33.      4.8 Miscellaneous Devices
  34.      4.9 Configuration Tool
  35.  
  36.   5. GUI (by Dag Brattli)
  37.  
  38.   6. Troubleshooting
  39.  
  40.   7. FAQ
  41.  
  42.   8. Known Bugs
  43.  
  44.   9. Hardware Overview (Link)
  45.  
  46.   10. Revision History
  47.  
  48.   11. Copyright and Disclaimer
  49.  
  50.  
  51.  
  52.   ______________________________________________________________________
  53.  
  54.  
  55.   1.  Introduction
  56.  
  57.   This document was written depending on the "How to use" part of the
  58.   Linux/IR project homepage http://www.cs.uit.no/~dagb/irda/howto.html.
  59.   The information is updated to the ``linux-irda-1998-08-20'' snapshot.
  60.  
  61.   What is the part of the author? Since I am not a programmer, I try to
  62.   be a compilator of the material provided by the Linux/IR core team,
  63.   the Linux/IR mailing list and other sources. Also I try to add some
  64.   work of my own, e.g. a ``configuration tool''.
  65.  
  66.  
  67.   For those which would like to follow the cutting edge of the Linux/IR
  68.   Project there is a CVS repository at
  69.   http://www.cs.uit.no/~dagb/irda/linux/irda/
  70.  
  71.   Companies and developers who are interested in joining this efforts
  72.   should contact the Linux/IR project at
  73.   http://www.cs.uit.no/~dagb/irda/howto.html or me at
  74.   <r2d2c3po@zedat.fu-berlin.de>.
  75.  
  76.   This document is included in the LINUX DOCUMENTATION PROJECT
  77.   http://sunsite.unc.edu/LDP.
  78.  
  79.   The latest version of this document is available at
  80.   http://userpage.fu-berlin.de/~r2d2c3po/ir_howto.cgi
  81.  
  82.   Thanks to:
  83.  
  84.   ╖  The Linux/IR core team.
  85.  
  86.   ╖  The members of the Linux/IR mailing list.
  87.  
  88.   ╖  The writers of the other HOWTOs which give me many inspirations.
  89.  
  90.   ╖  The developers of the SGML-Tools.
  91.  
  92.   Please feel free to contact me for comments or questions. I know this
  93.   material is not finished or perfect, but I hope you find it useful
  94.   anyway.
  95.  
  96.   <Werner Heuser>
  97.  
  98.  
  99.   2.  Prerequisites
  100.  
  101.  
  102.   ╖  BIOS
  103.  
  104.      Make sure your IrDA-Port is enabled in the BIOS and what irq and
  105.      port it uses, depending on the specification of your machine.
  106.  
  107.   ╖  Kernel
  108.  
  109.      - Make sure you use kernel 2.0.x (at the moment there is no support
  110.      for 2.1.x). If unsure try ``uname -r''.
  111.  
  112.      - You should have proc file system support in the kernel.
  113.  
  114.      - Also serial support.
  115.  
  116.      - I am not sure wether there has to be parallel port support for
  117.      using a printer with IR.
  118.  
  119.      - Networking support for use with IR ethernet devices.
  120.  
  121.      - Make sure you have module support in your kernel! Test it e.g.
  122.      with ``lsmod''.
  123.  
  124.      - Matt Francis wrote: "I notice that some of the modules appear to
  125.      want not only module support (as noted on the webpage), but  also
  126.      misc user device support.".
  127.  
  128.  
  129.   ╖  modutils
  130.  
  131.      Make sure you use modutils 2.x.x by ``insmod --version''.
  132.  
  133.   ╖  Shared Library
  134.  
  135.      The shared library libc.so.5 and the loader ld-linux.so.1 has to be
  136.      available.
  137.  
  138.   ╖  Security
  139.  
  140.      Most important, you must 'sync' your disks!!! (have you read the
  141.      disclaimer ?).
  142.  
  143.   ╖  Miscellaneous
  144.  
  145.      Other useful progs: APSFILTER, EZ-Magic, MagicFilter or some like
  146.      this  for the printer configuration.
  147.  
  148.  
  149.   3.  Compilation
  150.  
  151.  
  152.   ╖  Use the latest source snapshot available at
  153.      http://www.cs.uit.no/~dagb/irda/snapshots
  154.  
  155.   ╖  Untar the package with ``tar xvzf linux-irda-<VERSION>''. I
  156.      recommend to do this in /usr/src.
  157.  
  158.   ╖  Edit the Makefile if you are using module versions, want proc file
  159.      system support (2.0.x only), and if you want printer server or LAN
  160.      server support.
  161.  
  162.   ╖  Uncomment #USE_PROC. This is optional but highly recommended for
  163.      debugging purposes.
  164.  
  165.   ╖  Do a ``make depend''.
  166.  
  167.   ╖  Do a ``make clean'' (only necessary if you compile more than one
  168.      time).
  169.  
  170.   ╖  Do a ``make install'' (brings all the modules and irattach into the
  171.      right place).
  172.  
  173.   ╖  For latest improvements look into the FAQ section below.
  174.  
  175.   ╖  What Makefile options are available:
  176.  
  177.   ╖  MODVERSIONS: You will only need this if you have defined
  178.      CONFIG_MODVERSIONS=y in /usr/src/linux/.config (Loadable module
  179.      support).
  180.  
  181.   ╖  USE_PROC: If you want proc filesystem support (2.0.x only).
  182.  
  183.   ╖  USE_SYSCTL: No description available.
  184.  
  185.   ╖  ESI_DONGLE: For use with Extended System Inc. dongle
  186.      (experimental).
  187.  
  188.   ╖  PRINTER_SERVER: No description available.
  189.  
  190.   ╖  LAN_SERVER: No description available.
  191.  
  192.   ╖  Both PRINTER_SERVER and LAN_SERVER are mutually exlusive !!!
  193.  
  194.  
  195.   4.  Configuration
  196.  
  197.  
  198.  
  199.   4.1.  General Configuration
  200.  
  201.  
  202.   ╖  First you should put your IR devices in range. Though it is maybe
  203.      possible that the IR service detects every new device automagically
  204.      I only have good experience with the devices in range during the
  205.      configuration process.
  206.  
  207.   ╖  Keep your IR devices together in a range below one meter and an
  208.      angle of 30░. There has to be a direct connection. If this is not
  209.      possible, you may use a mirror (an unused M$ CD should work quite
  210.      good).
  211.  
  212.   ╖  Remove any current print jobs with ``lprm "*"''.
  213.  
  214.   ╖  Add "alias tty-ldisc-8 irtty" to /etc/conf.modules.
  215.  
  216.   ╖  Run ``depmod -a''.
  217.  
  218.   ╖  If it is not in the specs, ``setserial -g -a /dev/ttyS?'' should
  219.      give you an overview about which devices may include the IrDA-Port.
  220.      Probably this is one with a 16550 UART.
  221.  
  222.   ╖  Use ``setserial /dev/ttyS<0-2> irq 0xNNNN port M'' to set the
  223.      values for your IR serial port (if you need it, especially when the
  224.      IR port is at a separate serial line you usually don't need to
  225.      change the values). For further info look into the FAQ section
  226.      below.
  227.  
  228.   ╖  Run ``irattach /dev/ttyS<0-2>''. If kerneld is running this will
  229.      load the proper modules.
  230.  
  231.      There are eight modules:
  232.  
  233.   ╖  irda.o, main module controls the IR connections in general
  234.  
  235.   ╖  irport.o, "You should not use irport.o, this is a FIR replacement
  236.      for irtty.o. irport is not finished and should probably not be used
  237.      by anyone yet! Dag Brattli"
  238.  
  239.   ╖  irtty.o, I suppose this supports the IrTTP layer
  240.  
  241.   ╖  irlan_client.o, network module (client)
  242.  
  243.   ╖  irlan_server.o, network module (server)
  244.  
  245.   ╖  irlpt_client.o for printer connections (client)
  246.  
  247.   ╖  irlpt_server.o for printer connections (server)
  248.  
  249.   ╖  irobex.o Palm III support
  250.  
  251.   ╖  If you don't use ``kerneld'' insert irda.o with ``modprobe
  252.      irda.o''.
  253.  
  254.   ╖  Do ``lsmod''. It should show the irda.o module.
  255.  
  256.   ╖  Give irattach some time, e.g. seven seconds, to detect other IR
  257.      devices. Then watch the output from the kernel hopefully, you get
  258.      it in /var/log/messages. It should look like the following:
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.      Apr  5 06:42:12 ZAPPEL kernel: Linux IrDA v0.1 Sat Dec 13 14:54:04 1997 (Dag Brattli)
  266.      Apr  5 06:42:12 ZAPPEL kernel: IrLPT, $Revision: 1.20 $/$Date: 1998/03/08 15:52:10 $ (Thomas Davis)
  267.      Apr  5 06:42:12 ZAPPEL syslog: Serial connection established.
  268.      Apr  5 06:42:19 ZAPPEL kernel: IrDA Discovered: HP LaserJet 6P
  269.      Apr  5 06:42:19 ZAPPEL kernel:     Services: PnP Compatible Printer <7>Informing LPT service user
  270.  
  271.  
  272.  
  273.   4.2.  Printer Connection Setup
  274.  
  275.  
  276.   ╖  If you don't use ``kerneld'' do a ``modprobe irtty.o''.
  277.  
  278.  
  279.   ╖  Do a ``modprobe irlpt_client.o''.
  280.  
  281.  
  282.   ╖  Check the modules with ``lsmod''. This should show: irda.o, irtty.o
  283.      and irlpt_client.o
  284.  
  285.  
  286.   ╖  ``cat /proc/misc''. Gives you the "minor device-number" . It is the
  287.      first number in the line with irlpt0.
  288.  
  289.  
  290.   ╖  ``su'' to root, and do ``mknod /dev/irlpt0 c 10 <minor device-
  291.      number>''.  Note: Something like ``./MAKEDEV irlpt0'' is not
  292.      possible yet.
  293.  
  294.  
  295.   ╖  Try to write a small file to /dev/irlpt0 by ``cat FILE
  296.      >/dev/irlpt0'' (do not wonder about a bad format this is just a
  297.      first check). For me this doesn't not always work, but I couldn't
  298.      find out why not.
  299.  
  300.  
  301.   ╖  The better way is to change your /etc/printcap to use /dev/irlpt0
  302.      in addition or instead of /dev/lp0. See Printing-HOWTO for detailed
  303.      information.
  304.  
  305.  
  306.   ╖  For easy printer setup you may use such a printing software like
  307.      APSFILTER, MagicFilter EZ-Magic (with RedHat there should also be a
  308.      GUI for this purpose). Make a copy of /etc/printcap before.
  309.  
  310.  
  311.   ╖  Example for APSFILTER with a HP 6P (non-postscript, HP 6MP is with
  312.      postscript). The two relevant questions are:
  313.  
  314.      "Do you have a (s)serial or a (p)arallel printer interface?" answer
  315.      "p".
  316.  
  317.      "What's the device name for your parallel printer interface?"
  318.      answer with /dev/irlpt0.
  319.  
  320.  
  321.   ╖  Restart the print daemon with ``kill -HUP <PID of lpd>. If you use
  322.      another print daemon choose the according command.
  323.  
  324.  
  325.   ╖  Watch wether the connection indicator of your printer shows
  326.      activity, e.g. the green light above the IR port of a HP 6P/MP
  327.      comes on (lower left hand corner, near the paper tray).
  328.  
  329.  
  330.  
  331.   ╖  I couldn't get to manage printjobs larger than approximately 10
  332.      pages yet. But maybe this depends on the memory size of my
  333.      hardware, which is 16MB. There seems to be a problem with the
  334.      software too, Thomas Davis wrote: I will "... limiting the irlpt,
  335.      so it won't eat memory when you send a large print file.".
  336.  
  337.   4.3.  LAN Connection Setup
  338.  
  339.  
  340.   ╖  The following I couldn't test yet because I don't have a HP-NetBeam
  341.      or something like that. If you can make suggestions please let me
  342.      know.
  343.  
  344.  
  345.   ╖  Dag Brattli wrote: "If you want to use IrLAN you must ``modprobe
  346.      irlan_client'' before ``ifup irlan0''. I had to remove the
  347.      request_module() stuff since that needed a process context which I
  348.      don't have in the kernel. "
  349.  
  350.  
  351.   ╖  Run ``ifconfig irlan0 up <ip_address> netmask <ip_netmask>'' to
  352.      configure it with IP-address and other parameters. If the protocol
  353.      is still running you may start communicating. It is possible to use
  354.      RedHat's netcfg to do this, since it makes it very easy. Next time
  355.      you only need to do ``/sbin/ifup irlan0''.
  356.  
  357.  
  358.   ╖  Test the network device by pinging to it. For detailed information
  359.      about further setup see the NET3-HOWTO.
  360.  
  361.  
  362.   ╖  Do not forget to add a route, e.g. ``route add default gw
  363.      <ip_gateway>'' or ``route add -host irlan0''.
  364.  
  365.  
  366.   ╖  Ping to another IP now.
  367.  
  368.  
  369.   ╖  For testing reasons I recommend only to use one laptop and one IR
  370.      ethernet device in the same room. If there are problems look which
  371.      different modes for the IR ethernet device are possible. Try them.
  372.  
  373.   4.4.  Dongle Connection Setup
  374.  
  375.   The only supported dongle (serial motherboard adapter) now is the
  376.   Extended Systems Inc. ESI JetEye. For the Tekram IRmate dongle,
  377.   technical information is strongly needed. Make sure you have the
  378.   define ESI_DONGLE uncommented in the Makefile. This couldn't be tested
  379.   yet, because I don't have an ESI JetEye. So please send me your
  380.   experiences.
  381.  
  382.  
  383.   4.5.  Palm III Connection Setup
  384.  
  385.  
  386.   ╖  Palm III -> Linux
  387.  
  388.      1) Terminal 1> ``irattach /dev/ttyS<x>''
  389.  
  390.      2) Terminal 2> ``load_misc irobex''
  391.  
  392.      3) Terminal 3> Start ``irobex_app'' in the irobex directory.
  393.  
  394.      4) Beam something from your Palm III.
  395.  
  396.      5) If everything is successful, you can take a look at a new file
  397.      that has been created in the directory you started irobex_app. This
  398.      file will be named after the object you just transfered.
  399.  
  400.  
  401.   ╖  Linux -> Palm III
  402.  
  403.      This should be also possible.
  404.  
  405.  
  406.   ╖  Linux < -- > Linux
  407.  
  408.      Dag Brattli wrote: "The awakened reader may wonder what prevents
  409.      the beaming of files from Linux to Linux? Well, nothing!! (but I
  410.      haven't tried that yet). This means that we now have a "simple" way
  411.      of beaming files between Linux laptops. I think that this may be
  412.      the "killer app" we all have been waiting for!"
  413.  
  414.      Try to "``load_misc irobex'' in both ends, and then try
  415.      ``iroabex_app get'' on one of the machines and ``irobex put
  416.      <file>'' on the other.".
  417.  
  418.  
  419.   4.6.  Window$95 and Linux/IR
  420.  
  421.   Why this? Unfortenately Linux users are not always supported with
  422.   necessary hardware information. Sometimes it is possible to look at
  423.   this informations in Window$95.
  424.  
  425.   Where to get? At http://www.microsoft.com/windows95/info/irda.htm you
  426.   will find a support pack "Infrared Transfer 2.0". It is a self-
  427.   extracting archive ``W95IR.EXE'' with 331KB.
  428.  
  429.   With some machines e.g. a HP Omnibook 800 it is neccessary to use a
  430.   vendor specific version of this package (e.g. for the HP Omnibook 800
  431.   you may find it at the recovery CD).
  432.  
  433.   Especially the ..\windows\inf\*.inf files and the device manager are
  434.   of interest to look for configuration details.
  435.  
  436.   There are also some non M$ products available. Note: Some of them use
  437.   proprietary IR protocols:
  438.  
  439.  
  440.   ╖  CounterPoint: QuickBeam 1.15
  441.  
  442.   ╖  LapLink 7.5
  443.  
  444.   ╖  CarbonCopy 32 4.0
  445.  
  446.   ╖  pc ANYWHERE 7.5
  447.  
  448.   ╖  Puma Technology: TRANXIT pro 4.0
  449.  
  450.   Connection between Linux/IR and Window$95 IrDA
  451.  
  452.   For the moment it should only be possible to get a network connection
  453.   between to PC's (e.g. no ``getty''). If you have setup Infrared
  454.   Transfer 2.0, you will find an IrDA network device in the <Network
  455.   Device Section>. But I couldn't get a working connection yet. Maybe it
  456.   is also possible to use the IrOBEX protocol. But I guess the necessary
  457.   software is only provided with a Palm III.
  458.  
  459.   Takahide Higuchi <thiguchi@pluto.dti.ne.jp> provided an experimental
  460.   patch for IrCOMM support. It is available for download from
  461.   http://www.pluto.dti.ne.jp/ thiguchi/irda/ With this patch you can
  462.   send or receive short messages between a linux box and a terminal
  463.   program on a win95 laptop! But he thinks that some programs (like
  464.   pppd) would fail because many ioctls are not implemented at this time.
  465.  
  466.  
  467.   4.7.  Fast InfraRed (FIR)
  468.  
  469.   The IrDA(TM) standard knows three kinds of speeds:
  470.  
  471.   - SIR = Standard up to 115kbps IrDA,
  472.  
  473.   - MIR = Medium Speed IrDA,
  474.  
  475.   - FIR = Fast IrDA (4mbps)
  476.  
  477.   Up to 115.200bps usually the IrDA controller works like a serial port.
  478.   Up to 4Mbps it works in "FIR mode". But note: "SIR is used to
  479.   negotiate the session. No SIR, no session. " (Thomas Davis).
  480.  
  481.   Linux/IR doesn't officially support FIR yet. Thomas Davis wrote: "The
  482.   irport module is currently used for FIR support; the only chipsets to
  483.   be supported at this time are SMC and TI. SMC is currently in CVS; TI
  484.   is not. ".
  485.  
  486.   For latest improvements see Linux/IR homepage
  487.   http://www.cs.uit.no/~dagb/irda/irda.html , the Linux/IR mailing list
  488.   archiv at http://bolowsky.ita.chalmers.se/linux-ir/ and in my hardware
  489.   overview http:/userpage.fu-berlin.de/~r2d2c3po/ir_misc.cgi.
  490.  
  491.   4.8.  Miscellaneous Devices
  492.  
  493.   IrDA(TM) capable devices you may not only find in the above mentioned
  494.   machines, but in digital cameras, phones, PDA's and others too. The
  495.   support by Linux/IR is still under development. You may see the latest
  496.   status at the Linux/IR homepage
  497.   http://www.cs.uit.no/~dagb/irda/irda.html , in the Linux/IR mailing
  498.   list archive at http://bolowsky.ita.chalmers.se/linux-ir/ and in my
  499.   hardware overview http:/userpage.fu-berlin.de/~r2d2c3po/ir_misc.cgi.
  500.  
  501.   4.9.  Configuration Tool
  502.  
  503.   If you like you may use my configuration tool for these steps:
  504.  
  505.  
  506.   ╖  General Configuration
  507.  
  508.   ╖  Printer Connection Setup
  509.  
  510.   ╖  LAN Connection Setup
  511.  
  512.   ╖  Dongle Connection Setup, not yet ready
  513.  
  514.   ╖  Palm III Configuration, not yet ready
  515.  
  516.   How to use the configuration tool:
  517.  
  518.   ╖  Download the text file irconfig from http://userpage.fu-
  519.      berlin.de/~r2d2c3po/irconfig.
  520.  
  521.   ╖  Put it in the same directory as all the other Linux/IR programms.
  522.  
  523.   ╖  Do a ``chmod a+x irconfig''.
  524.  
  525.   ╖  Maybe you have to edit the first line #!/bin/sh according to your
  526.      system.
  527.  
  528.  
  529.   ╖  You have to be "root" to use the script.
  530.  
  531.   ╖  Start the script with ``./irconfig''.
  532.  
  533.   ╖  You may edit the first part of the script if necessary.
  534.  
  535.   ╖  You have also this options ``./irconfig [ start|stop|test <tty>
  536.      <port> <irq> ]''.
  537.  
  538.   5.  GUI (by Dag Brattli)
  539.  
  540.   If you want to try out a little GUI, you can try to run "ircp.pl". You
  541.   will need the Perl-GTK+ module ( http://www.gnome.org) to make it run.
  542.   The GUI is far from finished, so don't expect to much :-)
  543.  
  544.   6.  Troubleshooting
  545.  
  546.   If you encounter problems. Try the following:
  547.  
  548.  
  549.   ╖  Read the FAQ section below.
  550.  
  551.   ╖  Look into /var/log/messages and /var/log/kern.
  552.  
  553.   ╖  Do a ``dmesg''.
  554.  
  555.   ╖  Look into the different files in /proc/irda.
  556.  
  557.   ╖  Look into the mailing list archiv at
  558.      http://bolowsky.ita.chalmers.se/linux-ir/, wether your problem is
  559.      already known.
  560.  
  561.   ╖  Ask in the Linux/IR mailing list.
  562.  
  563.   ╖  It is also possible to debug the code. But I don't know how to do
  564.      this. If you want to use SKB debug code, you may edit irda.h and
  565.      change /include/linux/skbuff.h (see revision history 10-2-98).
  566.  
  567.   ╖  For problems with the irda.o module there is maybe an utility in
  568.      the modules package ``kdstat'' helpful. But I was not able to try
  569.      this.
  570.  
  571.   7.  FAQ
  572.  
  573.  
  574.   ╖  Q1 - Question: I do not know anything about ports and irqs. What
  575.      should I do?
  576.  
  577.   ╖  Answer:
  578.  
  579.  
  580.      PART A: Hardware settings
  581.  
  582.      - 1  Have a look into your specs !!! If not available look at the
  583.      support page of your vendor, or contact the support hotline. Or
  584.      maybe you find the information in the hardware overview mentioned
  585.      below.
  586.  
  587.      - 2  Use a current BIOS. Usually available at the support page of
  588.      your vendor.
  589.  
  590.      - 3  Try ``setserial /dev/ttyS? -g -a | egrep 16550A''. One of the
  591.      shown devices is probably the one you are looking for. Usually it
  592.      is the second one, but with no guarantee.
  593.  
  594.      - 4  Note: What seems like an UART is physically the IrDA
  595.      controller. For my HP Omnibook 800 this is the VLSI VL82C147 PCI -
  596.      IrDA controller. These controllers should behave up to 115 200 bps
  597.      like UART's. But sometimes it is very difficult to get the right
  598.      configuration.
  599.  
  600.      PART B: How to tell the hardware settings to the kernel
  601.  
  602.      -4  ``cat /dev/ioports'' to see which ports are already in use.
  603.  
  604.      -5  ``cat /dev/interrupts'' to see which interrupts are already in
  605.      use.
  606.  
  607.      -6  Make ports and interrupts available for use with IR device,
  608.      e.g. stop the pcmcia service or include a line like this in
  609.      /etc/sysconfig/pcmcia: PCIC_OPTS="irq_list=3,4,5,7,9,10,12,14,15"
  610.  
  611.      -7  Now try to guess what the right interrupt and port is. Use
  612.      ``setserial /dev/ttySx irq M port 0xNNNN'' to tell the kernel. If
  613.      there is more then one possible chance try them all (Note: As
  614.      mentioned in the Serial-HOWTO you should not try irq 0, 1, 6, 8,
  615.      13, 14).
  616.  
  617.      -8  If you were successful please send the useful parameters to the
  618.      author, because I would like to include them into the hardware
  619.      overview.
  620.  
  621.      -9  Good luck.
  622.  
  623.      P.S. : You may also try my little ``configuration script''. But it
  624.      is still not perfect yet.
  625.  
  626.      Also it is maybe necessary to finetune the IR serial port with
  627.      setserial , e.g. ``setserial /dev/ttyS0 spd_dvi'' (speed rate
  628.      115200).
  629.  
  630.  
  631.  
  632.   ╖  Q2 - Question: Where to get more information?
  633.  
  634.   ╖  Answer: To join the Linux-IrDA mailing list, send a mail to linux-
  635.      irda-request@list.uit.no with "subscribe" in the email body. Use
  636.      linux-irda@list.uit.no to post a message. You are welcome to use
  637.      this mailing list for posting questions, answers, bug-reports,
  638.      patches, suggestions and comments.
  639.  
  640.  
  641.   ╖  Q3 - Question: Is there a mailing list archive?
  642.  
  643.   ╖  Answer: Svante Soermark put up an archive of this list at
  644.      http://bolowsky.ita.chalmers.se/linux-ir/. Right now it only
  645.      includes messages from 16 march 1998 when he signed on, but if
  646.      someone sends him a more complete archive he will put it up.
  647.  
  648.  
  649.   ╖  Q4 - Question: For me, ``irattach'' hangs, but recognizes the
  650.      printer. /var/log/messages shows that irattach found my HP LaserJet
  651.      6P.
  652.  
  653.   ╖  Answer: The "hang" is normal for irattach. Everything is working
  654.      right if you see the HP Laserjet show up in the log. "hang" means
  655.      irattach is polling the IrDA-Devices for incoming connections. If
  656.      you kill it with <CTL C> the irattach program crashes and
  657.      /dev/ttySx does not work anymore. The problem is within the irda
  658.      module, and not with the irattach program. Rebooting is the only
  659.      thing to do! Next time put irattach in the background by using
  660.      ``irattach &''. Stop it if necessary with ``killall irattach''.
  661.   ╖  Q5 - Question: I get a message like tcsetattr read/write error in
  662.      /var/log/messages.
  663.  
  664.   ╖  Answer: Caused probably by wrong /dev/ttyS* or wrong irq or port.
  665.  
  666.  
  667.   ╖  Q6 - Question: Every setting seems alright, because I get the
  668.      appropriate messages. But it still does not work.
  669.  
  670.   ╖  Answer: Move the devices to within about .5 meter (1.5 feet). Check
  671.      that only one application is using the infrared port. Check that
  672.      both devices are using the same protocol, such as IrDA.
  673.  
  674.  
  675.   ╖  Q7 - Question: "... It appears that after about 30 seconds or so,
  676.      the irda module is removed (or at least the cleanup code is
  677.      called). Is this the expected behavior? "
  678.  
  679.   ╖  Thomas Davis wrote: "It's kerneld removing the irda module,
  680.      thinking it's idle ... " To solve the problem " ... uncomment the
  681.  
  682.      #include <linux/module.h>
  683.  
  684.      place the following line in front of the #include:
  685.  
  686.      #define __NO_VERSION__
  687.  
  688.      so you should see:
  689.  
  690.      #define __NO_VERSION__
  691.  
  692.      #include <linux/module.h>
  693.  
  694.      and find the line:
  695.  
  696.      /* MOD_INC_USE_COUNT */
  697.  
  698.      remove the comments; find
  699.  
  700.      /* MOD_DEC_USE_COUNT */
  701.  
  702.      and remove the comments.
  703.  
  704.      Recompile, and kerneld will now leave the module in memory for you,
  705.      while you have irattach running." - I suppose it is the file
  706.      irlpt.c which has to be edited.
  707.  
  708.  
  709.   ╖  Q8 - Question: I have downloaded the latest snapshot, and compiled
  710.      it successfully under Linux 2.0.33 running on an IBM Thinkpad 560E.
  711.      In the absence of any other IrDA machines to test with, is it safe
  712.      to assume that once the module has been inserted and the syslog
  713.      reports "irattach: Serial connection established.", is the IR
  714.      really working, and will it start to respond once there is another
  715.      machine with which to talk?
  716.  
  717.   ╖  Answer by Dag Brattli: Sorry, this only means that irattach has
  718.      done its part of the job, which is just to start the irda-tty.
  719.      Maybe the message should have been different, but as I said, it
  720.      tells that the serial connection between the irda-chip and the
  721.      irda-driver is established.
  722.  
  723.  
  724.   ╖  Q9 - Question: At startup-time ``modprobe -a'' checks
  725.      /lib/modules/<KERNEL-VERSION>/net/irda.o and causes the messages:
  726.      "IrLAP; Missing IrTTY /IrLMP Error no IrLAP connection" (in
  727.      /var/log/messages and on the console).
  728.  
  729.   ╖  Answer by Werner Heuser: Workaround for SYSTEM V style systems: Put
  730.      a script named for example "ir_rmmod" containing
  731.  
  732.  
  733.        ______________________________________________________________________
  734.        #!/bin/sh
  735.        echo "$0 : remove irda module"
  736.        rmmod irport.o
  737.        rmmod irtty.o
  738.        rmmod irda.o
  739.        ______________________________________________________________________
  740.  
  741.  
  742.  
  743.  
  744.   in the startup process (/etc/init.d and a symbolic link name for exam¡
  745.   ple "S100ir_rmmod" in /etc/rc3.d to "ir_rmmod"). Note the place for
  746.   "sh". For BSD style systems try the corresponding approach.
  747.  
  748.  
  749.   ╖  Q10 - Question by Ho Chin Keong: I have commented MODVERSIONS in
  750.      the Makefile, else doing "make" will give me complains. Is this
  751.      alright?
  752.  
  753.   ╖  Answer by Dag Brattli: Yes, you will only need the MODVERSIONS flag
  754.      if you have defined CONFIG_MODVERSIONS=y in /usr/src/linux/.config:
  755.  
  756.  
  757.        ______________________________________________________________________
  758.        # Loadable module support
  759.        #
  760.        CONFIG_MODULES=y
  761.        CONFIG_MODVERSIONS=y
  762.        CONFIG_KMOD=y
  763.        ______________________________________________________________________
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.   ╖  Q11 - Question by Ho Chin Keong: Is there other way of setting up
  771.      communication between the 2 laptops besides setting up a LAN route
  772.      between the two?
  773.  
  774.   ╖  Answer by Dag Brattli: Yes and no! One of the IrDA standard, IrCOMM
  775.      permits you to emulate a serial cable between two laptops, so you
  776.      can use any application written for serial ports (terminals, ppp,
  777.      slip, etc.). This is however not yet implemented in Linux/IR. The
  778.      IrLPT (printer) support is actually a subset of IrCOMM, so some of
  779.      it is working!
  780.  
  781.  
  782.   ╖  Q12 - Question by Ho Chin Keong: If I block the infra red path
  783.      deliberately for more than 10 seconds, the connection could not re-
  784.      establish. I have to kill the irattach and restart the whole
  785.      procedure to start the infrared route. The connection could be
  786.      maintained, however, if the blocking is less than 10 seconds. Is
  787.      this part of the design or a bug? Is there any way whereby we can
  788.      lengthen this time limit from 10 s to longer or infinitely?
  789.  
  790.   ╖  Answer by Thomas Davis: This is seems to be a bug in the primary
  791.      side of the IrLAP/IrLMP code. It appears not to send the
  792.      reset/disconnect notice all the way back up the stack.You'll notice
  793.      it when IrLPT gets stuck in the query mode, and you was trying to
  794.      talk to a printer, and disconnected/interrupted it when it was
  795.      handshaking. (and now, it shows up in the IrLAN portion)
  796.  
  797.  
  798.   ╖  Q13 - Question by Paul VanderSpek: What success has anyone had with
  799.      getting a Linux <--> Linux application working?
  800.  
  801.   ╖  Answer by Dag Brattli: Yes, but that is some time ago, and I know
  802.      that the IrLAN <--> IrLAN setup is broken when you want to use
  803.      Linux in both ends. I will try to fix this in the next snapshot.
  804.  
  805.      If you would really like to try this out now, you could to fix the
  806.      "static" code in functions:
  807.  
  808.      irlmp_get_discovery_response() and irlmp_discovery_request() in
  809.      irlmp.c so that LAN support is published to the peer (change the -
  810.      line into the + line) in both functions.
  811.  
  812.      ___________________________________________________________________
  813.      -irlmp->discovery_rsp.hint[0] = COMPUTER | EXTENSION;
  814.      +irlmp->discovery_rsp.hint[0] = COMPUTER | LAN | EXTENSION;
  815.       irlmp->discovery_rsp.hint[1] = OBEX;
  816.      ___________________________________________________________________
  817.  
  818.  
  819.  
  820.   Insert irlan_client on the first machine and irlan_server on the
  821.   second.
  822.  
  823.  
  824.   8.  Known Bugs
  825.  
  826.   If you find a bug, please send a bug-rapport to the mailing list,
  827.   including dmesg(8) output, and which linux version, and hardware you
  828.   are using. Thank you!
  829.  
  830.   1.The remote device suddenly stops accepting frames, and the link goes
  831.   down. If the link does not come back up again, the only thing to do is
  832.   to break irattach, rmmod irda, and start all over again.
  833.  
  834.   2.The machine suddenly freezes! (deallocation of non-allocated memory,
  835.   forgotten timers, non valid pointers etc ...). Haven't had this
  836.   problem in a long time, so maybe the problem is gone?
  837.  
  838.   3.The irattach program crashes when you break it with ctrl-c, and
  839.   /dev/cuaX does not work anymore. The problem is within the irda
  840.   module, and not with the irattach program. Rebooting is the only thing
  841.   to do!
  842.  
  843.  
  844.   9.  Hardware Overview (Link)
  845.  
  846.   I put together an overview about IR capable hardware (laptops, PDAs,
  847.   printers, cameras, phones, adapters, dongles and others) and how it is
  848.   working with Linux, at http:/userpage.fu-
  849.   berlin.de/~r2d2c3po/ir_misc.cgi
  850.  
  851.  
  852.   10.  Revision History
  853.  
  854.  
  855.   ╖  v0.1 to v0.4a, 19 March 1998 to 4 August 1998, drafts, not included
  856.      in the LDP
  857.  
  858.  
  859.   ╖  v1.0, 14 August 1998, release to the LDP
  860.  
  861.   ╖  v1.1, 18 August 1998, added info about IrCOMM patch by Takahide
  862.      Higuchi, minor changes
  863.  
  864.   ╖  v1.2, 24 August 1998, updated to ``linux-irda-1998-08-20''
  865.      snapshot, added FIR section and revision history, minor changes
  866.  
  867.  
  868.   11.  Copyright and Disclaimer
  869.  
  870.   Copyright ⌐ 1998 by Werner Heuser This document may be distributed
  871.   under the terms set forth in the LDP license at
  872.   http://sunsite.unc.edu/LDP/COPYRIGHT.html .
  873.  
  874.   The information in this document is correct to the best of my
  875.   knowledge, but there's a always a chance I've made some mistakes, so
  876.   don't follow everything too blindly, especially if it seems wrong.
  877.   Nothing here should have a detrimental effect on your computer, but
  878.   just in case I take no responsibility for any damages incurred from
  879.   the use of the information contained herein.
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.