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

📄 c122.html

📁 usb develop guide
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//Norman Walsh//DTD DocBook HTML 1.0//EN"><HTML><HEAD><TITLE>How to get USB devices working under Linux</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet"><LINKREL="HOME"TITLE="The Linux USB sub-system"HREF="book1.html"><LINKREL="UP"TITLE="Using the Linux USB sub-system"HREF="p13.html"><LINKREL="PREVIOUS"TITLE="USB Device Drivers"HREF="x119.html"><LINKREL="NEXT"TITLE="USB Device Filesystem"HREF="x173.html"></HEAD><BODY><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">The Linux USB sub-system</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="x119.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x173.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="CHAPTER"><H1><ANAME="AEN122">Chapter 2. How to get USB devices working under Linux</A></H1><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="c122.html#AEN124">Basic USB Configuration</A></DT><DT><AHREF="x173.html">USB Device Filesystem</A></DT><DT><AHREF="x194.html">USB Human Interface Device (HID) Configuration</A></DT><DT><AHREF="x291.html">USB Scanner Support</A></DT><DT><AHREF="x319.html">USB Audio Support</A></DT><DT><AHREF="x332.html">USB Modem Support</A></DT><DT><AHREF="x342.html">Printer Support</A></DT><DT><AHREF="x356.html">USB Serial Converter support</A></DT><DT><AHREF="x370.html">USB Cameras</A></DT><DT><AHREF="x405.html">USB and Digital Still Cameras</A></DT><DT><AHREF="x498.html">Mass Storage Devices</A></DT><DT><AHREF="x532.html">USS720 driver</A></DT><DT><AHREF="x551.html">DABUSB driver</A></DT><DT><AHREF="x555.html">PLUSB Prolific USB-Network driver</A></DT><DT><AHREF="x573.html">NetChip 1080-based USB Host-to-Host Link</A></DT><DT><AHREF="x588.html">USB ADMtek Pegasus-based device support</A></DT><DT><AHREF="x597.html">USB Diamond Rio500 support</A></DT><DT><AHREF="x601.html">D-Link USB FM radio support</A></DT></DL></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN124">Basic USB Configuration</A></H1><P>You need a late version kernel. Kernel versions 2.2.7 and latercontain the USB code. You should, in an ideal world, be running thecurrent 2.4.0-test kernel, ideally with any pre-patches for the nextkernel. The current 2.2.x kernels do contain some USB code, but itis less well supported, and development is patchy.USB code is in fairly earlydevelopment, so the changes between each version (and the bugs) tendto change fairly fast. Support on the mailing list for anything exceptthe lastest version is scant at best.</P><P>The user assistance mailing list is <TTCLASS="EMAIL">&#60;<AHREF="mailto:linux-usb-users@lists.sourceforge.net">linux-usb-users@lists.sourceforge.net</A>&#62;</TT>. To subscribe or unsubscribe, go to <AHREF="http://lists.sourceforge.net/mailman/listinfo/linux-usb-devel"TARGET="_top">http://lists.sourceforge.net/mailman/listinfo/linux-usb-devel</A></P><P>You need to configure USB into your kernel. Use of <TTCLASS="USERINPUT"><B> makemenuconfig </B></TT> is recommended.  Under <TTCLASS="USERINPUT"><B> USBsupport</B></TT>, you need to select <TTCLASS="USERINPUT"><B>Support forUSB</B></TT>. You also need to select either <TTCLASS="USERINPUT"><B>UHCI (IntelPIIX4, VIA, ...) support</B></TT>, <TTCLASS="USERINPUT"><B>UHCI AlternateDriver (JE) support</B></TT> or<TTCLASS="USERINPUT"><B>OHCI-HCD (Compaq, iMacs, OPTi, SiS, ALi, ...) support</B></TT>. Which one you select is dependent on whatkind of motherboard or adapter you have. Intel and Via motherboards,and Via-based adapters are UHCI, and you can use either of the twoUHCI drivers - there seems to be little user visible differencebetween them. Ali and SiS chipsets, Compaq and NECmotherboards, iMacs and any adapter using Opti chips (just about allof them) are OHCI, and you should use OHCI-HCD. If you do not knowwhat kind of controller to choose, check your motherboarddocumentation.  You can also look at <TTCLASS="FILENAME">/proc/pci</TT>for a hint - if the USB entry is of the form 0xHHHH, where HHHH arehex digits (e.g. something like <TTCLASS="USERINPUT"><B>I/O at 0xe400</B></TT>),then it is UHCI. If it is of the form <TTCLASS="USERINPUT"><B>32 bit memory at0xHH000000</B></TT>, where HH are hex digits (e.g. something like<TTCLASS="USERINPUT"><B>32 bit memory at 0xee000000</B></TT>), then it is OHCI.Failing that, just try both.</P><P>Always build in the Preliminary USB device filesystem. Leaving this outwill make resolving problems almost impossible, and is essential ifyou need to check that your kernel is configured correctly, andyour USB devices are being recognised correctly.</P><P>You also need to select whichever devices you want to use, for example<TTCLASS="USERINPUT"><B>USB Human Interface Device (HID) support</B></TT> for a USB keyboard, mouse,joystick, tablet or gamepad, <TTCLASS="USERINPUT"><B>USB Scanner support</B></TT> forcertain scanners, <TTCLASS="USERINPUT"><B>USB Audio support</B></TT> for USBspeakers, <TTCLASS="USERINPUT"><B>USB Modem (CDC ACM) support</B></TT> fora POTS or ISDN modem, <TTCLASS="USERINPUT"><B>USB Printer support</B></TT>for a USB printer, <TTCLASS="USERINPUT"><B>USB Serial Converter support</B></TT>(with the appropriate subordinate options) for some serial port type devices,<TTCLASS="USERINPUT"><B>USB CPiA Camera support</B></TT> for cameras based on theVision CPiA chipset, <TTCLASS="USERINPUT"><B>USB IBM (Xirlink) C-it Camera support</B></TT> for camera based on the IBM camera chipset,<TTCLASS="USERINPUT"><B>USB OV511 Camera support</B></TT> for camerasbased on OmniVision's OV511 chipset, <TTCLASS="USERINPUT"><B>USB Kodak DC-2xx Camerasupport</B></TT> for downloading images from Kodak's DC-200 seriescameras, <TTCLASS="USERINPUT"><B>USB Mass Storage support</B></TT> formass storage devices,<TTCLASS="USERINPUT"><B>USS720 parport driver</B></TT> for certain parallel portadapters, <TTCLASS="USERINPUT"><B>DABUSB driver</B></TT> for an experimentalDigital Audio Broadcast receiver and <TTCLASS="USERINPUT"><B>PLUSB Prolific USB-Networkdriver</B></TT> for certain USB to USB type connections.You should be able to use modules, kernel only, or split modules andkernel code.</P><P>USB hubs are automatically supported. Some devices may stop and startworking between kernel versions. Remember that you are usingexperimental code. Devices not listed in this document are not workingat the time of writing, although developers are always welcome tocontribute to the current codebase. </P><P>Rebuild the kernel and the modules (if you configured to build as modules),and install the new kernel and the new modules. Reboot the system. If you needinstruction on how to do this, refer to the<AHREF="http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html"TARGET="_top">Linux Kernel HOWTO</A>.</P><P>If you are using modules, you need to load the following modules:<P></P><UL><LI><P><TTCLASS="FILENAME">usbcore.o</TT></P></LI><LI><P><TTCLASS="FILENAME">usb-uhci.o</TT>, <TTCLASS="FILENAME">uhci.o</TT>or <TTCLASS="FILENAME">usb-ohci.o</TT></P></LI></UL>and any driver modules, such as<TTCLASS="FILENAME">scanner.o</TT> or <TTCLASS="FILENAME">printer.o</TT>.</P><P>Inspect the kernel logs.If there isn't anything that could be USB related,likely causes are use of the wrong driver (UHCI when you neededOHCI or OHCI when you needed UHCI), not physically installingthe hardware, a BIOS configuration that disables USB or stuffing upthe configuration or installation of the kernel.</P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="x119.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="book1.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x173.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">USB Device Drivers</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="p13.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">USB Device Filesystem</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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