⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 man-irattach-inc.sgml

📁 linux操作系统下的红外驱动的测试程序
💻 SGML
字号:
<!-- v0.1 wh 2001/03/26--><REFMETA><REFENTRYTITLE>irattach</REFENTRYTITLE><MANVOLNUM>8</MANVOLNUM></REFMETA><REFNAMEDIV><REFNAME>irattach</REFNAME>  <REFPURPOSE>binds the Linux-IrDA stack to a IrDA port </REFPURPOSE></REFNAMEDIV><REFSYNOPSISDIV><CMDSYNOPSIS> <COMMAND>irattach</COMMAND> <ARG>&lt;dev&gt;</ARG> <ARG><REPLACEABLE>-s</REPLACEABLE></ARG> <ARG><REPLACEABLE>-d dongle</REPLACEABLE></ARG> <ARG><REPLACEABLE>-v</REPLACEABLE></ARG> <ARG><REPLACEABLE>-h</REPLACEABLE></ARG></CMDSYNOPSIS></REFSYNOPSISDIV><REFSECT1><TITLE>DESCRIPTION</TITLE><PARA><COMMAND>irattach</COMMAND> binds the Linux-IrDA stack to an IrDAport. It configures the low level of the Linux-IrDA stack in thekernel. This step is usually necessary before you (or applications)can use the higher layer of the IrDA stack.</PARA><PARA>The <COMMAND>irattach</COMMAND> command loads the necessary Linux-IrDAdriver, which configures the IrDA hardware, and configures the IrDAstack to operate on the new IrDA port. Multiple IrDA ports can beactivated through multiple <COMMAND>irattach</COMMAND> commands.</PARA><PARA><COMMAND>irattach</COMMAND> by default uses the<OPTION>irtty</OPTION> driver which connects to the Linux TTYsubsystem and use the standard Linux serial driver. This works wellfor most machines and configurations, but limits the baud rate to115200bps (IrDA SIR mode). The mode of operation will work with mostFIR hardware (as found in laptops - they provide serial emulation) andmost serial dongles (provided the proper dongle type is specified),making it a safe choice. However, USB dongles and a few FIR hardwaredon't support serial emulation and can't be used with the<OPTION>irtty</OPTION> driver.</PARA><PARA><COMMAND>irattach</COMMAND> can also use one of the Linux FIR drivers(including USB dongle drivers) instead of the <OPTION>irtty</OPTION>driver. Most FIR drivers require proper configuration of moduleparameters (this is documented below). FIR drivers allow you to usehigher baud rates (generally up to 4Mbps). In general, Linux FIRsupport is not as stable and mature, due to lack of time anddocumentation.</PARA><PARA><COMMAND>irattach</COMMAND> must be run as root or installed setuidroot, as it requires root privileges. If you have compiled the IrDAstack as modules (recommended), then you will need to edit the<FILENAME>/etc/modules.conf</FILENAME> file.  See the &ir-howto; fordetails.</PARA></REFSECT1><REFSECT1><TITLE>OPTIONS</TITLE><PARA><OPTION>&lt;dev&gt;</OPTION> : this is the name of a TTY, an IrDAinterface or IrDA driver. <COMMAND>irattach</COMMAND> decides to usethe <OPTION>irtty</OPTION> driver or one of the FIR drivers based onthis argument.<ITEMIZEDLIST><LISTITEM><PARA><COMMAND>TTY name</COMMAND> : this is the serial port to be configuredusing the <OPTION>irtty</OPTION> driver, such as<OPTION>/dev/ttyS0</OPTION>. <COMMAND>irattach</COMMAND> will use the<OPTION>irtty</OPTION> driver, so only SIR will be available. You needto check your serial configuration or BIOS to know which serial portis the IrDA port that need to be passed to <COMMAND>irattach</COMMAND>.</PARA></LISTITEM><LISTITEM><PARA><COMMAND>interface name</COMMAND> : this is the device name of an IrDAinterface, such as <OPTION>irda0</OPTION>. <COMMAND>irattach</COMMAND>will use one of the FIR drivers (including USB dongle drivers). Theselected FIR driver must be loaded prior to the call to<COMMAND>irattach</COMMAND>, or the proper alias for the device namemust be set in <FILENAME>/etc/modules.conf</FILENAME>.</PARA></LISTITEM><LISTITEM><PARA><COMMAND>module name</COMMAND> : this is the name of an FIR drivermodule, such as <OPTION>nsc-ircc</OPTION> (see list below). All newIrDA interfaces created after loading the module will be configured,so this won't work if the module is already loaded. This feature isstill experimental.</PARA></LISTITEM></ITEMIZEDLIST></PARA><PARA><OPTION>-s</OPTION> : starts discovery of remote IrDA devices (note thatthe form "-s 1" is no longer supported)</PARA><PARA><OPTION>-v</OPTION> : shows version information (this happens, when no option is given, too)</PARA><PARA><OPTION>-h</OPTION> : shows help information.</PARA><PARA><OPTION>-d dongle</OPTION> : attaches an additional dongle driver to theIrDA port.</PARA><PARA>You need a dongle driver if you have an infrared device that connectsto your computer's serial port (normal 9-pin serial portconnector). These devices are called dongles, and can currently beused by any SIR driver (IrTTY or irport).  This option is notcompatible with FIR drivers, and only works with the irtty and irportdrivers.</PARA><PARA>The currently known (serial) dongles are:<ITEMIZEDLIST><LISTITEM><PARA><COMMAND>esi</COMMAND>        Extended Systems JetEye PC ESI-9680</PARA></LISTITEM><LISTITEM><PARA><COMMAND>tekram</COMMAND>     Tekram IrMate IR-210B dongle</PARA></LISTITEM><LISTITEM><PARA><COMMAND>actisys</COMMAND>    ACTiSYS IR-220L dongle</PARA></LISTITEM><LISTITEM><PARA><COMMAND>actisys+</COMMAND>   ACTiSYS IR-220L+ dongle</PARA></LISTITEM><LISTITEM><PARA><COMMAND>girbil</COMMAND>     Greenwich GIrBIL dongle</PARA></LISTITEM><LISTITEM><PARA><COMMAND>litelink </COMMAND>  Parallax LiteLink dongle & ExtendedSystems JetEye PC ESI-9680B</PARA></LISTITEM><LISTITEM><PARA><COMMAND>airport</COMMAND>    N.N.</PARA></LISTITEM><LISTITEM><PARA><COMMAND>old_belkin</COMMAND> Belkin (old) SmartBeam dongle or anydongle only capable of 9600 bauds</PARA></LISTITEM><LISTITEM><PARA><COMMAND>ep7211</COMMAND>     IR port driver for the Cirrus Logic EP7211processor (ARM based)</PARA></LISTITEM><LISTITEM><PARA><COMMAND>mcp2120</COMMAND>    Dongles based on the MCP2120 (Microchip)</PARA></LISTITEM><LISTITEM><PARA><COMMAND>act200l</COMMAND>    ACTiSYS Ir-200L dongles</PARA></LISTITEM><LISTITEM><PARA><COMMAND>ma600</COMMAND>      Mobile Action ma600 dongles</PARA></LISTITEM></ITEMIZEDLIST></PARA></REFSECT1><REFSECT1><TITLE>FIR DRIVER MODULES</TITLE><PARA>If you are one of the lucky people which have a FIR chipset or USBdongle that is supported by one of the Linux-IrDA drivers, you can use<COMMAND>irattach</COMMAND> with the interface name of the IrDA portto configure. You will need to configure<FILENAME>/etc/conf.modules</FILENAME> appropriately, with at least analias of <OPTION>irda0</OPTION> to the driver name, or load the drivermanually beforehand.</PARA><PARA>You don't strictly need to use <COMMAND>irattach</COMMAND> with FIRdrivers, you can use <COMMAND>modprobe</COMMAND> to load the driver,<COMMAND>ifconfig</COMMAND> to bring up the interface and set thevarious sysctl by hand, but <COMMAND>irattach</COMMAND> offer aconvenient way to do it.</PARA><PARA>Of course, you need to know which FIR driver applies to your hardware.You may use <COMMAND>findchip</COMMAND> to get information about theFIR chip. If this doesn't help, the &ir-howto; shows other means toretrieve these data.</PARA><PARA>Also, you often need to configure the <OPTION>Linux-serialdriver</OPTION> to ignore the IrDA port, otherwise both drivers willconflict. This can usually be done with<COMMAND>setserial /dev/ttySx uart none</COMMAND>.</PARA><PARA>The currently known FIR drivers are:<ITEMIZEDLIST><LISTITEM><PARA><COMMAND>ali-ircc</COMMAND>ALi FIR Controller Driver for ALi M5123(options: io, irq, dma).This driver supports SIR, MIR and FIR (4Mbps) speeds.This chipset is used by e.g.:</PARA><PARA>The ALi M5123 FIR Controlleris embedded in ALi M1543C, M1535, M1535D, M1535+, M1535D South Bridge.</PARA></LISTITEM><LISTITEM><PARA><COMMAND>irda-usb</COMMAND> IrDA-USB device driver, for USBdevices/dongles that comply with the official IrDA-USB classspecification. Note: USB 2.0 is not yet tested.(options: qos_mtt_bits int, description "Minimum Turn Time").This is used, for e.g.:</PARA><PARA>ACTiSYS ACT-IR2000U</PARA><PARA>KC Technology KC-180</PARA><PARA>Extended Systems XTNDAccess ESI-9685</PARA><PARA>Note that there is another USB driver for those devices called<COMMAND>ir-usb</COMMAND> which is NOT compatible with the IrDA stackand conflict with <COMMAND>irda-usb</COMMAND>. Because italways loads first, you have to remove <COMMAND>ir-usb</COMMAND> completely.</PARA><PARA>Devices based on the SigmaTel chip are not not compliant with theIrDA-USB class specification and therfore not supported by thisdriver.</PARA></LISTITEM><LISTITEM><PARA><COMMAND>nsc-ircc</COMMAND>NSC IrDA device driver (options: io, irq, dma, dongle_id, qos_mtt_bits).This chipset is used by e.g.:</PARA><PARA>IBM ThinkPad		dongle_id=0x09</PARA><PARA>HP OmniBook 6000	dongle_id=0x08</PARA></LISTITEM><LISTITEM><PARA><COMMAND>sa1100_ir</COMMAND>Infrared driver for devices based on the StrongARM SA1100 embeddedmicroprocessor (options: power_level, tx_lpm). This driver may support FIR on devices that can do it. This chipset is used by e.g.:</PARA><PARA>Samsung YOPY, COMPAQ iPAQ, SHARP Zaurus SL5000/5500</PARA></LISTITEM><LISTITEM><PARA><COMMAND>smc-ircc</COMMAND>SMC IrCC controller driver (options: ircc_dma, ircc_irq).This chipset is used by e.g.:</PARA><PARA>Fujitsu-Siemens Lifebook 635tSony PCG-505TX</PARA></LISTITEM><LISTITEM><PARA><COMMAND>w83977af_ir</COMMAND>Winbond W83977AF IrDA device driver(options: io, irq, qos_mtt_bits).This chipset is used by e.g.:</PARA><PARA>Corel NetWinder</PARA></LISTITEM><LISTITEM><PARA><COMMAND>toshoboe</COMMAND>Toshiba OBOE IrDA device driver, supports Toshiba Type-O IR chipset.(options: max_baud).This chipset is used by e.g.:</PARA><PARA>Toshiba Libretto 100CT., and many more old Toshiba laptops.</PARA></LISTITEM><LISTITEM><PARA><COMMAND>donauboe</COMMAND>is a new version of <COMMAND>toshoboe</COMMAND> and has better FIR supportand compability with the Donauoboe chip http://libxg.free.fr/lib-irda.html(options: ..).This chipset is used by e.g.:</PARA><PARA>Toshiba Libretto 100CT., Tecra 8100, Portege 7020 and many moreToshiba laptops.</PARA></LISTITEM><LISTITEM><PARA><COMMAND>vlsi_ir</COMMAND>VLSI 82C147 SIR/MIR/FIR device driverThis chipset is used by e.g.:</PARA><PARA>HP Omnibook 800</PARA><PARA>(options: ..).        <ITEMIZEDLIST>        <LISTITEM>        <PARA>        clksrc int, description "clock input source selection"        </PARA>        </LISTITEM>        <LISTITEM>        <PARA>        ringsize int array (min = 1, max = 2), description "tx, rx ringdescriptor size"        </PARA>        </LISTITEM>        <LISTITEM>        <PARA>        sirpulse int, description "sir pulse width tuning"        </PARA>        </LISTITEM>        <LISTITEM>        <PARA>        mtt_bits int, description "IrLAP bitfield representing min-turn-time"        </PARA>        </LISTITEM>        </ITEMIZEDLIST></PARA></LISTITEM></ITEMIZEDLIST></PARA></REFSECT1><REFSECT1><TITLE>EXAMPLES</TITLE><PARA>Attach the IrDA stack to the second serial port (integrated IrDA portusing serial emulation) and start discovery:<ITEMIZEDLIST><LISTITEM><PARA><COMMAND>irattach /dev/ttyS1 -s</COMMAND></PARA></LISTITEM></ITEMIZEDLIST></PARA><PARA>Attach the IrDA stack to the first serial port where you have anexternal ACTiSYS serial dongle and start discovery:<ITEMIZEDLIST><LISTITEM><PARA><COMMAND>irattach /dev/ttyS0 -d actisys+ -s</COMMAND></PARA></LISTITEM></ITEMIZEDLIST></PARA><PARA>Attach the IrDA stack to the first IrDA-USB dongle and start discovery:<ITEMIZEDLIST><LISTITEM><PARA><COMMAND>modprobe irda-usb ; irattach irda0 -s</COMMAND></PARA></LISTITEM></ITEMIZEDLIST></PARA><PARA>Attach the IrDA stack to the NSC FIR (4Mbps) device driver on a Thinkpadlaptop:<ITEMIZEDLIST><LISTITEM><PARA><COMMAND>modprobe nsc-ircc dongle_id=0x9 ; irattach irda0 -s</COMMAND>. </PARA></LISTITEM></ITEMIZEDLIST></PARA><PARA>Attach the IrDA stack to the NSC FIR (4Mbps) device driver on a Thinkpadlaptop:<ITEMIZEDLIST><LISTITEM><PARA><COMMAND>irattach irda0 -s</COMMAND>. </PARA><PARA>This assume that you have added the following entries to <FILENAME>/etc/conf.modules</FILENAME>:</PARA><PARA>options nsc-ircc dongle_id=0x09</PARA><PARA>alias irda0 nsc-ircc</PARA></LISTITEM></ITEMIZEDLIST></PARA></REFSECT1><REFSECT1><TITLE>CAVEATS</TITLE><PARA>The following hints are a very short introduction into theconfiguration of Linux/IrDA. If this doesn't helpread the &ir-tutorial; and/or the &ir-howto; .Before configuring Linux/IrDA make sure whether you want to configureSIR or FIR. It's recommended to try SIR first, unless your device isnot compatible with SIR (for example USB dongles).</PARA><PARA>To get the SIR "serial" devicehave a look into the BIOS. Then run <COMMAND>dmesg | grep tty</COMMAND>to get a survey of tty devices supported by your machine. Now try to choose the one, which is probably the IrDA device and use<COMMAND>irattach /dev/ttySx -s</COMMAND>.</PARA><PARA>If you don't succeed with SIR (which seems a rare case) you maytry FIR. First look up the BIOS. Then run <COMMAND>findchip</COMMAND>to get information about the IrDA controller chip. Use <COMMAND>setserial /dev/ttySx uart none </COMMAND> to avoid conflicts with the serial driver.Note: don't use <COMMAND>setserial</COMMAND> if you configure SIR.Now you may use <COMMAND>irattach</COMMAND>.</PARA><PARA>Finally <COMMAND>irdadump</COMMAND> should show at least your computeritself. If it doesn't start at the beginning.</PARA><PARA>This man page deal only with the low level of the IrDA stack (IrDAports and IrDA drivers). After this step is done, you usually need tosetup your favorite application to access the high level IrDA stack(via IrCOMM, IrLPT, IrNET, IrLAN or IrSOCK), which is documentedelsewhere.</PARA><PARA>This man page doesn't document the usage of the irport driver. Theirport driver support the same hardware as the irtty driver, but isconfigured like a FIR driver.</PARA></REFSECT1><REFSECT1><TITLE>DIAGNOSTICS</TITLE><PARA>This section currently contains the raw error messages from sourcecode only.</PARA><PARA>"ioctl(TIOCGETD): %m"</PARA><PARA>"irattach: tty: set_disc(%d): %s"</PARA><PARA>"tcsetattr: %m"</PARA><PARA>"Failed to open %s: %m"</PARA><PARA>"Couldn't get device fd flags: %m"</PARA><PARA>"Couldn't set device to non-blocking mode: %m"</PARA></REFSECT1><REFSECT1><TITLE>BUGS</TITLE><PARA>N.N.</PARA></REFSECT1><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:2sgml-indent-data:tsgml-parent-document:nilsgml-default-dtd-file:nilsgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -