Linux USB Frequently Asked Questions

Linux USB Frequently Asked Questions

$Revision: 1.69 $, last updated on $Date: 2007/08/27 14:28:18 $ by $Author: gowdy $.

Getting Started

  1. How do I use my XXX USB device with Linux?
  2. How do I make sure the correct modules are loaded?
  3. Why doesn't /proc/bus/usb exist?
  4. What's the fastest way to get USB HotPlugging set up?
  5. Is my device supported?
  6. Does Linux talk to USB 2.0 devices?
  7. What "Host Controller Driver" should I use?

Information

  1. What is a good book on USB?
  2. What APIs are available to USB Device Drivers?
  3. Got any testing tips for Linux USB Device Drivers?
  4. Is it possible to boot off a USB Device?
  5. What is max_sectors and how should I use it?
  6. What are the sysfs structures for Linux USB?

Trouble Shooting

  1. How do I report a bug?
  2. How do I make USB be detected on my machine?
  3. I've upgraded and USB doesn't work on my machine anymore.
  4. Why doesn't usb-storage work in 2.2.x kernels?
  5. Why is /proc/bus/usb/devices empty?
  6. I get "device not accepting address";why doesn't USB work?
  7. How do I see the "USB Verbose Debug Messages"that I enabled in the kernel config?
  8. Why isn't usbmgr working correctly?
  9. Why do I only see one device from my multipurpose storage device?
  10. My device stopped working in 2.6.10, what can I do?
  11. Cdrecord fails with a "Cannot allocate memory" message.

Specific Hardware Problems

  1. How do I make USB work on my Sony Vaio laptop?
  2. My Asus motherboard doesn't work, or works with only one device
  3. My Epson printer doesn't print anything.
  4. My USB Palm device can't sync with pilot-link, why?
  5. How do I get my printer working?
  6. I'm having trouble using SANE 1.0.3 with my scanner.
  7. My Athlon system, with AMD-756, doesn't likelow speed devices.
  8. Why can't I write to my ZipCD 650 with cdrecord?
  9. PCChips M801 with SIS7001 USB Controller provides too little current.

Getting Started

Q: How do I use my XXX USB device with Linux?

A: You need to build a kernel with support for USB. Kernels since2.2.18have USB, although the2.4.xkernels are supported better.The Linux Kernel HOWTO will tell you how to build and installyour new kernel. You should then follow the USB Guide to setup yourdevice.

Q: How do I make sure the correct modules are loaded?

A: You can either manually configure/etc/conf.modules (or /etc/modules.confwith 2.4-ready versions of modutils) to load the modules you require likethis;

alias usb uhci
post-install uhci modprobe printer
post-install printer modprobe joydev
post-install joydev modprobe hid 

This makes sure the modules I need for my joystick and printer areloaded, if you modify your system startup to "modprobe usb".

Or ... a better way would be to set up the hotplugscripts; that sets things up to match your current hardware,instead of using a static configuration.And you may not even need to modify your system startup beyondtelling it to use /etc/rc.d/init.d/hotplug to start things.

Q: Why doesn't /proc/bus/usb exist?

A: If you've setup the hotplug scripts itshould be there, please report this to the user's mailinglist.

If you don't want to use those scripts you'll need to add the following line to your /etc/fstab;

none                    /proc/bus/usb           usbfs noauto         0 0

And mount this after the usbcore module has been loaded.

More information is available in theUSB Guide under "USB Device Filesystem".

In 2.2 and 2.4 kernels this directory should be created when youload usbcore, however there will be no content till you mountusbfs (the new name for usbdevfs). In 2.6 this directorywill remain empty till you load a host controller.

Q:What's the fastest way to get USB HotPlugging set up?

A:HotPlugging is a facility that can load and configuredrivers as you plug in your devices. The idea is thatyou should be able to just plug in your device and use it,even if that cuts into sales of Linux sysadmin bibles.It's not USB-specific; Cardbus hotplugging works the same way,and other kernel subsystems should be taking the same approach.

Make sure your kernel is up-to-date.Configure all your kernel USB facilities as modular,including support for both UHCI and OHCI host controllers(unless you're positive you know which type you have),and enable HOTPLUG.

Then, if your Linux distribution for some reason hasn'tincluded hotplug support, you canget the hotplug scripts release over at thelinux-hotplugproject and install it using the instructions there.

Q:Is my device supported?

A: You should be able to tell this from the working devicedatabase. If you're device isn't there you could ask on the Linux USB User/Help mailing list. Youshould include the kernel version you are using (including the namesof any patches you have applied) and the contents of the/proc/bus/usb/devices file while the device is plugged in.

Q:Does Linux talk to USB 2.0 devices?

A: Yes, in two ways.First the backward-compatible way:all high speed (480 Mbit/sec) devices can be usedat full speed (12 Mbit/sec) in all current Linux kernels.Second if you have the EHCI driver, and a USB 2.0host controller (EHCI, currently available as add-on PCI cards)then you can use these devices at high speed.EHCI support is available in the Linux 2.6 kernels,and also in 2.4.19 kernels.(The 2.4.19 code should handle USB disks nicely, but formore complete USB 2.0 support, use 2.6 instead.)At this writing the EHCI driver is labeled "experimental".

Q:What "Host Controller Driver" should I use?

A: That answer comes in two stages.

First,you need to know what kind of USB "Host Controller" hardware you have.Mainstream hardware has one of three kinds, named after the hardwareregister-level "Host Controller Interface" (HCI) they implement.The first one was Intel's "Universal" HCI (UHCI).That type of controller doesn't do very much in hardware,which makes the software do more work (and need more memory).Most controllers on Intel or Via chipsets use UHCI.The second kind of USB 1.1 host controller was organizedby Compaq and several other companies, and had fewer"Intellectual Property" restrictions.That was called the "Open" HCI (OHCI), and does quite a bitmore of USB in hardware.Learning that two kinds of register interface was one too many,USB 2.0 defined just one, with much less legal encumbrance.The third, and newest, kind is the "Enhanced" HCI (EHCI),and is the only kind used to talk to high speed devices.You can tell which kind you have by output oflspci -v|grep HCI:

00:02.2 USB Controller: Silicon Integrated Systems [SiS] 7001 (rev 07) (prog-if 10 [OHCI])
00:02.3 USB Controller: Silicon Integrated Systems [SiS] 7001 (rev 07) (prog-if 10 [OHCI])
00:0b.0 USB Controller: NEC Corporation USB (rev 41) (prog-if 10 [OHCI])
00:0b.1 USB Controller: NEC Corporation USB (rev 41) (prog-if 10 [OHCI])
00:0b.2 USB Controller: NEC Corporation USB 2.0 (rev 01) (prog-if 20 [EHCI])
00:0f.0 USB Controller: VIA Technologies, Inc. USB (rev 50) (prog-if 00 [UHCI])
00:0f.1 USB Controller: VIA Technologies, Inc. USB (rev 50) (prog-if 00 [UHCI])
00:0f.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 51) (prog-if 20 [EHCI])
00:11.0 USB Controller: OPTi Inc. 82C861 (rev 10) (prog-if 10 [OHCI])

Second,you need to know what Host Controller Driver (HCD) to use.There's only one Linux EHCI driver, ehci-hcd.(If you use it, you'll also need to use an OHCI or UHCI driver.)On 2.5 and later kernels, there's also only oneOHCI driver (ohci-hcd)and one UHCI driver (uhci-hcd).On 2.4 and earlier kernels, the names are different.And while there's only one OHCI driver (usb-ohci),you probably have a choice of two UHCI drivers,usb-uhci and the "alternate (JE)" driver uhci.You probably need to load those drivers as modules, in whichcase lsmod will tell you whether it'salready there or not.If you don't have a modular build, it's harder to tell whatis working unless you mount usbfs and look at/proc/bus/usb/devices to see whetherit lists a root hub for each host controller you have.

If you don't have one of those host controllers, you may needto consult more platform-specific documentation. There arehost controllers that appear on custom busses and don't use thestandard register interfaces; they'll show up in /proc/bus/usb/devices if theydon't need additional setup.And there are also gadgets (such as PDAs running Linux onStrongARM SA-1100 processors) that act as usb devicesinstead of hosts.Those might have only "function" drivers, perhapsnetworking IP-over-USB or emulating a serial link.

Information

Q: What is a good book on USB?

A: I have only read one, and thought it was very poor. Isuggest that you get the specifications fromhttp://www.usb.org,which are at no cost, are quite readable (as specifications go),and are up to date.

Q: What APIs are available to USB Device Drivers?

A: See the kerneldoc ("make htmldocs" in the root of your kernel),which should be relatively complete in current 2.6 kernels.There is also the Programming Guidefor Linux USB Device Drivers, which is less current (even for 2.4kernels) and in some cases describes behavior specific to the usb-uhci driver.(Note that in the 2.5 and later kernels, usb-uhci has been obsoleted.)

Q: Got any testing tips for Linux USB Device Drivers?

A:One basic thing is to make sure you make sure there are no dependencieson particular host controller hardware or drivers. You may be ableto verify this with only one additional USB PCI card, and a USB 2.0hub; borrow or own this hardware if you're maintaining a driver.Hardware differences show up particularly with error handling, sodo what you can to make your driver break on each kind of controller.

Another is to make sure you test unplugging the device.That's a common way for driver bugs to panic kernels, andthere are at least three different scenarios to test:driver unused, driver in use but inactive, and driver active.You may findthis testing information pageto be useful.

Q: Is it possible to boot off a USB Device?

A:There are (at least) three things you need for this to beable to happen.

  1. BIOS Support to boot from USB
  2. Kernel support for USB Storage (including SCSI)
  3. A patch to delay boot process

The first of these is something outside your control, either your BIOSsupports it or not. However, you could put your kernel and initrd on afloppy and then use a USB root file system to get around this.

In your boot kernel or initial RAM disk you need to include supportfor all the needed items to support using a USB disk. These aredocumented in the Linux USB User Guide.

You also need to patch this kernel to delay when it tries to openthe root file system, as the USB subsystem takes longer than isallowed to initialise and make the device available to thekernel. You'll find a patch suitable for 2.2 and 2.4 here (although the 2.4 patch could be put ininit/do_mounts.c:mount_block_root() instead of fs/super.c which wouldbe cleaner). A patch may be added to kernels later than 2.4.20 (latestcurrent released version as I type this) to remove the need for thispatch, but this hasn't happened yet.

Some external references are available here and here.

Q: What is max_sectors and how should I use it?

A:For USB Mass Storage devices (that is, devices which use theusb-storage driver) max_sectors controls the maximum amount of datathat will be transferred to or from the device in a single command.As the name implies this transfer length is measured in sectors, wherea sector is 512 bytes (that's a logical sector size, not necessarilythe same as the size of a physical sector on the device). Thus forexample, max_sectors = 240 means that a single command will nottransfer more than 120 KB of data.

Linux 2.6 gives you the ability to see and to change themax_sectors value for each USB storage device, independently.Assuming you have a sysfs filesystem mounted on /sys and assuming/dev/sdb is a USB drive, you can see the max_sectors value for/dev/sdb simply by running:

        cat /sys/block/sdb/device/max_sectors

and you can set max_sectors to 64 by running (as root):

        echo 64 >/sys/block/sdb/device/max_sectors

Values should be positive multiples of 8 (16 on the Alpha andother 64-bit platforms). There is no upper limit, but you probablyshouldn't make max_sectors much bigger than 2048 (corresponding to 1MB, which is quite a lot).

In general, increasing max_sectors will improve throughput since itmeans that larger amounts of data can be transferred in a singlecommand with no need for being split up among multiple commands. Ofcourse this is subject to diminishing returns when max_sectors is verybig. More importantly, it's true only up to a point. Many deviceshave limits on the amount of data they can transfer, and if you try toexceed that limit you will most likely crash the device.

The default value of 240 works well with most devices. If you'renot running at USB 2.0's high speed (480 Mb/s) there's no reason toincrease max_sectors. If you are running at high speed and yourdevice can take it, feel free to go as high as you like. Note thatwith many devices there isn't much penalty for using asmaller-than-optimum value unless you set max_sectors to somethingreally low! Go ahead and experiment to find what value worksbest with your hardware.

Some devices can only transfer 64 KB or less at a time. The mostnotable example is the suite of USB-IDE adapters made by GenesysLogic. According to their technical support staff transfers should belimited to 32 KB (max_sectors = 64), and usb-storage automaticallysets max_sectors to this value when it detects a Genesys Logic device.However people have had no trouble using 64 KB transfers (max_sectors= 128), and that's what Windows uses. You can always increase thevalue above 64 using sysfs, but don't go beyond 128 as Genesys Logicdevices are known to fail when transferring more than 64 KB.

Q: What are the sysfs structures for Linux USB?

A: For example the directory will have something like:

 
# ls  /sys/bus/usb/devices/
1-0:1.0      1-1.3        1-1.3.1:1.0  1-1:1.0
1-1          1-1.3.1      1-1.3:1.0    usb1

The names that begin with "usb" refer to USB controllers. Moreaccurately, they refer to the "root hub" associated with eachcontroller. The number is the USB bus number. In the example thereis only one controller, so its bus is number 1. Hence the name"usb1".

"1-0:1.0" is a special case. It refers to the root hub'sinterface. This acts just like the interface in an actual hub analmost every respect; see below.

All the other entries refer to genuine USB devices and theirinterfaces. The devices are named by a scheme like this:

	bus-port.port.port ...

In other words, the name starts with the bus number followed by a'-'. Then comes the sequence of port numbers for each of theintermediate hubs along the path to the device.

For example, "1-1" is a device plugged into bus 1, port 1. Ithappens to be a hub, and "1-1.3" is the device plugged into port 3 ofthat hub. That device is another hub, and "1-1.3.1" is the deviceplugged into its port 1.

The interfaces are indicated by suffixes having this form:

	:config.interface

That is, a ':' followed by the configuration number followed by '.'followed by the interface number. In the above example, each of thedevices is using configuration 1 and this configuration has only asingle interface, number 0. So the interfaces show up as;

	1-1:1.0		1-1.3:1.0		1-1.3.1:1.0

A hub will never have more than a single interface; that's part ofthe USB spec. But other devices can and do have multiple interfaces(and sometimes multiple configurations). Each interface gets its ownentry in sysfs and can have its own driver.

Trouble Shooting

Q: How do I report a bug?

A:First make sure that it's a bug that hasn't yet been fixed.Try reproducing this with the most current stable kernel(and if that doesn't work, then the latest pre-release version)to see if the bug is still "alive".If it's fixed already, keep using that kernel!Otherwise, once you've verified that the bug is still munching away,post a good description of it to the right Linux-USB mailing list.Avoid reporting problems except with kernels fromkernel.org;for vendor/distro kernels, use your vendor/distro support channels.

In addition to the information required in/usr/src/linux/REPORTING-BUGS, it also helpsenormously if you provide the output of/proc/bus/usb/devicesor the output of lsusb -v.(The "lsusb" output is far more detailed and informative.)Also, say what kind of host controller you're using, includingthe chip vendor.(It's usually EHCI, OHCI or UHCI, withvendors like Intel, NEC, NVidia, VIA, and so on.If there's any question,just include lspci -v output.)If you are having problemswith your host controller being recognised, includeoutput of lspci -v(at least for PCI based host controllers).If it is supposed to be UHCI, ithelps to know whether interrupts are being generated every second. You shouldsend this information to the user/helpmailing list.

Because USB is a specialized data transfer protocol stack, sometimesit can be helpful to use hardware debugging tools like USB sniffers.While low-end sniffers might cost only $US400, more functionalones can easily run over $US25K.If you have access to such equipment, please mention it.Information from such tools can be the difference between being ableto solve your problem, and just having to blame it on smallmalicious mythological evildoers.

If you have access to both OHCI and UHCI host controllers, pleasetry to reproduce your problem with both kinds of controller.If the problem comes up using EHCI, try to reproduce it usingone of the other controller drivers (e.g. by rmmod ehci-hcd).Since these use different HCDs, they may behave differently insome situations. The reason might be a device drivers assumingsome HCD-specific behavior, or an HCD not doing the right thing.

If by this point you haven't already found and fixed theproblem, then you have several places to report the bug.These include your Linux vendor, and mailing listsincluding linux-usb-users, linux-usb-devel,and linux-kernel.Remember, always say what kernel version you're usingincluding summarizing any custom patches you're running. If your bug report includes a patch,the USB developers list is the best wayto get it evaluated and/or merged.

If you are using Linux 2.4, don't expect communityassistance unless you first upgrade to a recent 2.6 kernel.If you're using any kernel that old, you should probably have some sortof vendor support agreement to handle issues that come up.If you are using UHCI on a 2.4 kernel,try to reproduce the problem with the "other"UHCI host controller driver (HCD).There are currently two UHCI drivers, which don't always behave the same:usb-uhci and uhci (the "alt" or "JE" driver).If you find that you have a workaround, please still report the problem!And make sure you say which HCD(s) you're using.

Q: How do I make USB be detected on my machine?

A: If you are sure that you actually have a suitable hardware setup,look for a BIOS option that could be applicable. It might be labelledas USB, or it might be more obscure, discussing Plug-n-Play, orhaving options for various types of operating systems. You may needto try various combinations.Unless you rely on a USB keyboard or mouse during booting, it's probablysafest to disable support for those in your BIOS; lots of BIOS writersseem to get that wrong, making trouble when Linux tries to take over USB.

Q: I've upgraded and USB doesn't work on my machine anymore.

A: If you have an SMPmotherboard with BIOS set to MPS 1.4, try MPS 1.1.Some SMP motherboards need a "noapic" boot option.

Q: Why doesn't usb-storage work in 2.2.x kernels?

A: There are many changes to the SCSI subsystem in 2.4 which meansthe back-port is unlikely to fully functional. Therefore the usb-storageparts of the back-port are not supported.

Q: Why is /proc/bus/usb/devices empty?

A: Most likely because you didn't configure your systemwith a USB host controller: uhci ("alt"), usb-ohci, or usb-uhci.The simplest way to set up is to build these as dynamically linkedkernel modules, and use the hotplug scripts (above).You can statically link those drivers, if you make sure you've gotthe right one(s) for your hardware!

Q: Why doesn't USB work at all? I get "device not accepting address".

A:This can be one of several problems:

  • High speed devices sometimes have problems with cables used toconnect them. They're more sensitive to signal quality issues thanolder usb 1.1 full or low speed devices.If the device works OK at full speed on the same system,after you "rmmod ehci-hcd",this is likely the problem you're seeing.There are a lot of things you can do to change signal quality.
    • Use a different cable. Some are even marketed specifically foruse with high speed devices. Most USB 1.1 cables work just fine athigh speed, but the one you're using might be an exception(maybe it's been damaged).
    • Switch to a different USB connector on your computer.Back panel connectors are often right on the motherboard, with muchcare taken to preserve signal quality.A front panel connector probably doesn't use cabling designed withUSB in mind; and its cable could be damaged by bending, baking orsomething else even when it's not routed through the power supply.
    • Use an external high speed hub. Those hubs have signalconditioning circuitry that may cover up certain flaws.
    • Make sure your device is using its own external power supply,or that its battery is fully charged.
    You might be able to get the same device to workat high speed on a different machine.
  • You may have some problem with your PCI setup that'spreventing your USB host controller from getting hardware interrupts.(Current Linux 2.6 kernels will actually tell you when they noticethis problem; see the "dmesg" output.)When Linux submits a request, but never hears back from the controller,this is the diagnostic you'll see.To see if this is the problem, look at /proc/interrupts to seeif the interrupt count for your host controller driver ever goes up.If it doesn't, this is the problem:either your BIOS isn't telling the truth to Linux(ACPI sometimes confuses these things, or setting the expected OS towindows in your BIOS), orLinux doesn't understand what it's saying.
  • Sometimes a BIOS fix will be available for your motherboard,and in other cases a more recent kernel will have a Linux fix.You may be able to work around this by passing thenoapic boot option to your kernel, or (when you're using anadd-in PCI card) moving the USB adapter to some other PCI slot.If you're using a current kernel and BIOS, report this problem to theLinux-kernel mailing list, with details about your motherboard and BIOS.

Various users have had success with some specific strategy. I'vecollectioned their notes here.

Q: How do I see the "USB Verbose Debug Messages"that I enabled in the kernel config?

A: There are two ways to see these messages, which are shown thesame way that other kernel debug messages are shown. You can usedmesg, or syslog.

It's easiest to use the dmesg command to see the kernel debugmessages. This accesses a fixed size "ring buffer", so that older messagesget overwritten by newer ones. So it's good for seeing messages that don'toops or hang your system, so long as they're recent enough.If you are tracking a problem that oopses or hangs your system,you'll either want to make the dmesg output go to the console,so you can see what happened before the oops/hang, or use syslog.

The syslog mechanism is slightly harder to use,because you have to set it up yourself by configuring/etc/syslog.conf to save the messages.I usually set it up so kern.debug messages get saved tothe /var/log/kernel file, and then clean it up by handwhen it gets too big.If you're setting it up for the first time, you may want to rebootto make sure everything acts as you expect ... or at least, tokill -HUP the syslog daemon so it rereads its config file.Syslog will usually not be able to save the last few messages beforean oops or a hang, since it takes time to read the dmesg output andsave it.

Those two mechanisms will show you the kernel messages that are printedwith KERN_DEBUG or, in the USB subsystem, with the dbg()macro when #define DEBUG is done before<linux/usb.h> is included.Much USB-related code will automatically enable this ifCONFIG_USB_DEBUG is set in kernel config, butsome drivers will need to be manually tweaked to define DEBUG.

Q: Why isn't usbmgr working correctly?

A:This application was an addition toold SUSE Linux distributions, and has beenobsolete for some years now.You should be using thehotplug scripts.

Q: Why do I only see one device from my multipurpose storage device?

A:Some distributions (notably Red Hat) turn off the kerneloption CONFIG_SCSI_MULTI_LUN. This prevents usb-storage fromautomatically detecting all the devices in your removable storagedevice. You can either recompile your kernel with this option enabledor (if your distribution supports this) add the following line to/etc/modules.conf;

options scsi_mod max_scsi_luns=15

If you do not want to do this for all SCSI devices then you cantell the kernel to scan for a specific device using;

echo >/proc/scsi/scsi "scsi add-single-device 0 0 0 1"

The first zero is the host id (so it is zero if this is your first"SCSI" adapter, check "cat /proc/scsi/scsi" to see which is your USBStorage device), the second the channel (which for usb-storage shouldalways be zero I believe), the third is the target (which again isalways 0 for usb-storage) and the last is the LUN. LUN 0 is the onlyone probed if this kernel option is off, so you'd need to repeat thiscommand as root for every media type your device accepts increasingthe LUN number.

Q: My device stopped working in 2.6.10, what can I do?

A:In the 2.6.10 kernel the method of enumerating devices waschanged to follow a similar algorithm as Windows (while the standardallows both many devices require the Windows method). It seemssome devices do not like this new method though. If you have startedhaving a problem since this kernel with some of your devices you mightwant to use the option "old_scheme_first=y" with the usbcoremodule.

Q: Cdrecord fails with a "Cannot allocate memory" message.

A:This might be caused by a max_sectorslimitation. For certain USB mass-storage devices (most notably the USB-IDEadapters made by Genesys Logic) usb-storage automatically sets max_sectorsto 64, which corresponds to a maximum transfer length of 32 KB. Howevercdrecord doesn't know about this maximum length and has no good way to findout, so it uses its default transfer length, which is 63 KB. The result isthat data transfers fail and nothing can be written to the disc.

You can see if this is the case by checking the max_sectors value. Ifit is, there are two ways of solving the problem.

First, you can try increasing max_sectors to 128, corresponding to 64 KB.usb-storage sometimes is overly conservative and sets the value lower thanit needs to be. In particular, the Genesys Logic adapters seem to workjust fine with max_sectors = 128, even though engineers from that companyhave claimed differently.

Second, if you prefer not to fiddle with kernel settings, you can simplytell cdrecord to reduce its transfer size to 32 KB. The command-line optionto use is ts=32k and it is described in the man page forcdrecord.

Specific Hardware Problems

Q: How do I make USB work on my Sony Vaio laptop?

A:You may need to turn off the BIOS option for Plug-n-Play operatingsystem support on some models of Vaio. Then USB should work fine,although you may have problems with using the modem. This is onlyneeded on some models. This solution also worked on the Gateway 2000 Solo5150 notebook.

Q: My Asus motherboard doesn't work, or works with only one device

A: Some early Asus P2B-DS and P2B-D motherboards have a designflaw that means that the chipset doesn't get sufficient voltage. Isuggest returning the motherboard. Alternatively, check the Asuswebsite athttp://www.asus.com.tw/supportnews/english/mainboard/p2bx/17695.htmlfor a hardware solution.

Q: My Epson printer doesn't print anything.

A: Many Epson printers (the 740 does not) need a special set of characters sent tothe printer for it to use the USB interface. You can do this using auniprint - stcany.upp - ghostscript combination, by inserting an extrainitialisation string in the -dupBeginPageCommand part of stcany.upp.The string is

00 00 00
1b01 40 45 4a 4c 20 31 32 38 34 2e 34 0a
40 45 4a 4c 20 20 20 20 20 0a

Q: My USB Palm device can't sync with pilot-link, why?

A: The Palm OS 4.0 devices changed their hotsync protocol.Currently only coldsync works properly with these kinds ofdevices. pilot-link versions since 0.11.4 work with most devices.

Q: How do I get my printer working?

A: There is a good article on this at this web site http://www.justlinux.com/nhf/Hardware/Getting_USB_and_Your_Printer_Working.html.

Q: I'm having trouble using SANE 1.0.3 with my scanner.

A: Version 1.0.1 of SANEseems to work better, you should try that. Youalso might want to look at theLinuxUSB scanner FAQ.

Q: My Athlon system, with AMD-756, doesn'tlike low speed devices.

A: Athlon systems using some early versions of the AMD-756chip (up to sometime before May 2000) have a USB bug.It affects handling of low speed devices (such as somemice and keyboards) when they're connected to the root hub.Recent 2.4.x kernels (such as 2.4.5) have AMD's workaround;upgrade your kernel.

Q: Why can't I write to my ZipCD 650 withcdrecord?

A: You need to have a version of cdrecord of at least 1.10a4.

Q: PCChips M801 with SIS7001 USBController provides too little current.

A: A user reported this. If this is the case then using a powered hub shouldhelp.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当调用wx.getUserProfile接口太频繁时,会触发报错信息"wx.getUserProfile too frequently"。这是因为微信对于某些接口实施了限频机制,包括wx.getUserProfile在内。 为了避免这个错误,可以优化代码逻辑,将用户微信信息进行缓存,在一段时间内都从缓存中获取。由于用户昵称和头像的更新频率不高,这样的缓存策略是可行的。 此外,还可以参考以下错误用法和正确用法示例来避免频繁调用wx.getUserProfile接口: - 错误用法:在Page的onShow方法中调用wx.getUserInfo接口。正确用法是在App的onLaunch方法中调用,以避免频繁调用接口。 - 错误用法:使用setInterval定时调用wx.getSetting接口。正确用法是在需要获取地理位置时,先调用wx.getSetting接口获取用户授权信息,然后根据用户授权情况再决定是否调用wx.getLocation接口。 通过优化代码逻辑,并遵循正确的接口调用方式,可以有效避免触发"wx.getUserProfile too frequently"的报错信息。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [小程序API调用问题](https://blog.csdn.net/github_38928905/article/details/124703762)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [wx.getUserProfile too frequently 问题](https://blog.csdn.net/weixin_64051447/article/details/131685946)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值