Re: [Libusbx-devel] Major problems using libusbx on CentOS 5

2014-01-25 Thread Alan Stern
erences are shared between a parent and a child, there should be no problem. Alan Stern -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Cri

Re: [Libusbx-devel] Isochronous support via libusbk backend problem

2014-01-16 Thread Alan Stern
s will still be sent at the right times. With interrupt transfers, an error will cause up to two retries, delaying not just the one piece of data but also everything following it. Of course, this usually doesn't matter. T

Re: [Libusbx-devel] [libusbx] Fix super-speed isoc packet size (#163)

2013-12-12 Thread Alan Stern
end of section 5.6.3 in the USB-2.0 spec, it says: All device default interface settings must not include any isochronous endpoints with non-zero data payload sizes (specified via wMaxPacketSize in the endpoint descriptor). Alternate interface settings may spec

Re: [Libusbx-devel] RPi silently dropping 1KiB chunks from the middle of a large bulk read

2013-10-28 Thread Alan Stern
s > improved enormously with successive Raspbian releases. I'll buy a couple of > other hubs and see if they're any better, but as to my original fear that > this is some systemic problem with my code that will affect other platforms > in time: I suspect those fears are unfou

Re: [Libusbx-devel] RPi silently dropping 1KiB chunks from the middle of a large bulk read

2013-10-27 Thread Alan Stern
//github.com/makestuff/flcli/tree/20131026 > https://github.com/makestuff/libfpgalink/tree/20131026 > https://github.com/makestuff/libusbwrap/tree/20131026 > > My main goal is to eliminate the possibility that it's me doing something > si

Re: [Libusbx-devel] Compatibility with libusb-compat

2013-09-09 Thread Alan Stern
On Mon, 9 Sep 2013, Xiaofan Chen wrote: > On Sat, Sep 7, 2013 at 11:36 PM, Alan Stern wrote: > > Slightly off the original topic but perhaps still relevant... > > > > There are several Linux programs using libusb-0.1 that don't work with > > libusb-compat. The

[Libusbx-devel] Compatibility with libusb-compat

2013-09-07 Thread Alan Stern
uding the underlying file descriptor -- these programs might suddenly start working. (Note that doing this would require adding a function to the libusb-1.0 API for retrieving the low-level file descriptor.) Anybody feel like implementing this? Alan Stern

Re: [Libusbx-devel] RFC: Add libusb_get_vendor_n_product_string function

2013-08-09 Thread Alan Stern
he "flaming-curses" variety favored by certain people. > long it may take for them to have any kind of effect, if any. I doubt most of them will ever have any effect. But who knows? Alan Stern -- Get

Re: [Libusbx-devel] RFC: Add libusb_get_vendor_n_product_string function

2013-08-08 Thread Alan Stern
I added a blanket quirk for _all_ devices with those vendor IDs. (The vendors in question were Nokia, Nikon, Pentax, and Motorola, and the bug was that the devices would return the total number of data blocks they contained when

Re: [Libusbx-devel] RFC: Add libusb_get_vendor_n_product_string function

2013-08-07 Thread Alan Stern
On Wed, 7 Aug 2013, Pete Batard wrote: > On 2013.08.06 14:57, Alan Stern wrote: > > I agree, it does need to change. This means putting more pressure on > > manufacturers, not on the users. > > And how else are you going to put pressure on manufacturers? I wish I knew.

Re: [Libusbx-devel] RFC: Add libusb_get_vendor_n_product_string function

2013-08-06 Thread Alan Stern
at's not the kind of world I want to live in. > As long as no one asks for change, nothing will ever change. Go ahead and complain. I'll support you, and no doubt a bunch of other people will to. But I'm not willing to stop adding support for hardware that people already own

Re: [Libusbx-devel] RFC: Add libusb_get_vendor_n_product_string function

2013-08-05 Thread Alan Stern
; favour in the long run, because it basically tells manufacturers that > it's perfectly fine to ignore Linux altogether. That kind of attitude doesn't work out in the real world. It only leads to people ignoring you. You can afford to do that sort of thing if you have Microsoft

Re: [Libusbx-devel] RFC: Add libusb_get_vendor_n_product_string function

2013-08-04 Thread Alan Stern
rward to telling users: "Libusb doesn't work with your device because it crashes when we send it this request for information which we don't really need"? Alan Stern -- Get your SQL database under ve

Re: [Libusbx-devel] RFC: Add libusb_get_vendor_n_product_string function

2013-08-03 Thread Alan Stern
On Sat, 3 Aug 2013, Pete Batard wrote: > On 2013.08.03 21:18, Alan Stern wrote: > > I agree with Hans. In-library caching should be done on-demand, not > > whenever a new device is enumerated. > > > > If the program asks the library for a string descriptor, t

Re: [Libusbx-devel] RFC: Add libusb_get_vendor_n_product_string function

2013-08-03 Thread Alan Stern
henever a new device is enumerated. If the program asks the library for a string descriptor, the back end can get the descriptor from the OS's cache, if one is available. Or it can talk to the device. That's up to the back end. But if the program doesn't ask for a string descrip

Re: [Libusbx-devel] [libusbx] Mac OSX: libusbx crashes when unplugging a device (1.0.16) (#121)

2013-07-23 Thread Alan Stern
x27;t accept any more transfers for that device. Maybe the code already does this; I haven't looked. Alan Stern -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with ap

Re: [Libusbx-devel] [libusbx] Mac OSX: libusbx crashes when unplugging a device (1.0.16) (#121)

2013-07-22 Thread Alan Stern
On Sun, 21 Jul 2013, Nathan Hjelm wrote: > On Jul 21, 2013, at 8:11 PM, Alan Stern wrote: > > > On Sun, 21 Jul 2013, Nathan Hjelm wrote: > > > >> A little more detail about what is happening in this case. When the > >> device gets di

Re: [Libusbx-devel] [libusbx] Mac OSX: libusbx crashes when unplugging a device (1.0.16) (#121)

2013-07-21 Thread Alan Stern
ceived, but leave the transfers intact. They will soon fail all by themselves, and the OS completion callbacks can be handled in the usual way. After all the transfers are gone, then it will be safe to finish the disconnection procedure. Alan Stern

Re: [Libusbx-devel] Bulk transfer queueing order problem

2013-05-29 Thread Alan Stern
to your program as soon as the first KB has been sent out. Then it would require two more IN transfers on the bus: one for the programs second IN request and one to buffer for later. This would explain what you observe. Alan Stern --

Re: [Libusbx-devel] Linux sysfs usb descriptors file has broken configuration length handling

2013-05-19 Thread Alan Stern
On Sun, 19 May 2013, Hans de Goede wrote: > Hi, Greg, Alan, All, > > On 05/18/2013 06:17 PM, Greg KH wrote: > > On Sat, May 18, 2013 at 12:14:08PM -0400, Alan Stern wrote: > >> On Sat, 18 May 2013, Hans de Goede wrote: > >>> But the sysfs descriptors file will

Re: [Libusbx-devel] Linux sysfs usb descriptors file has broken configuration length handling

2013-05-18 Thread Alan Stern
.wTotalLength, where as > userspace only sees the length advertised by > the rawdescriptors, which may be different, and when > it is userspace will this have no idea where the next > descriptor starts. > > I believe the proper way to fix this is to make the > sysfs code de

Re: [Libusbx-devel] How libusb(x) know which interface to talk to

2013-03-30 Thread Alan Stern
On Sat, 30 Mar 2013, Wander Lairson Costa wrote: > 2013/3/29 Alan Stern : > > On Fri, 29 Mar 2013, Wander Lairson Costa wrote: > > > >> Dear all, > >> > >> I have a (kind of dumb) question regarding libusb_bulk_transfer and > >> libusb_interrup

Re: [Libusbx-devel] How libusb(x) know which interface to talk to

2013-03-29 Thread Alan Stern
ace > they will send/receive data to/from? They _do_ receive interface-related information in their parameters: the endpoint address. Each endpoint belongs to a single interface. Alan Stern -- Own the Future-Inte

Re: [Libusbx-devel] Huawei 3G USB + archlinux arm

2013-03-08 Thread Alan Stern
71 generally means that the device failed to respond. Perhaps the USB cable was disconnected, or the firmware crashed. Alan Stern -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): En

Re: [Libusbx-devel] WinUSB Pipe Policy ALLOW_PARTIAL_READS and USBD_SHORT_TRANSFER_OK

2013-01-24 Thread Alan Stern
ffering the data sent by the device (which can be longer than the requested amount), and then giving the remaining data to the client in response to the next read request. This feature is not available on Linux, or presumably on other platforms. I don't see any reason why libusb or libusbx should s

Re: [Libusbx-devel] Apple USB HID Driver limitation

2012-12-25 Thread Alan Stern
On Tue, 25 Dec 2012, Xiaofan Chen wrote: > On Tue, Dec 25, 2012 at 12:28 AM, Alan Stern > wrote: > > (Although I don't believe Apple uses > > UHCI components in their machines.) > > Supposedly Apple uses Intel chipsets now and will have UHCI along with > th

Re: [Libusbx-devel] Apple USB HID Driver limitation

2012-12-24 Thread Alan Stern
s > / second. On the other hand, it doesn't require much agility to move a mouse faster than 16 pixels/second. But I agree that HID devices do not need to e polled 1000 times per second, as a general rule. In fact, many HID devices run at low speed rather than full speed, and USB dema

Re: [Libusbx-devel] usb_claim_interface error -6 (Linux)

2012-12-17 Thread Alan Stern
ever that may be). It is the Realtek RTL28xxU DVB USB kernel driver. At any rate, you should be able to use your program easily enough if you add a call to libusb_detach_kernel_driver() before claiming the interface. Alan Stern

Re: [Libusbx-devel] usb_claim_interface error -6 (Linux)

2012-12-17 Thread Alan Stern
ble to explain this. If you want to find out more about what's going on, compare the /sys/kernel/debug/usb/devices file with one stick plugged in to the same file with the other stick plugged in. Alan Stern --

Re: [Libusbx-devel] usb_claim_interface error -6 (Linux)

2012-12-16 Thread Alan Stern
under > Windows (the software is Mingw-64 cross compiled with libusbx). > > Any suggestion on what is happening would be nice -6 is LIBUSB_ERROR_BUSY. It means that another driver has already claimed the inte

Re: [Libusbx-devel] Help needed with deployment issues on Windows

2012-10-28 Thread Alan Stern
r; they are totally different. One cannot be used as a substitute for the other. It would be like trying to use "ls" as a substitute for "dd". Alan Stern -- WINDOWS 8 is here. Mill

Re: [Libusbx-devel] Help needed with deployment issues on Windows

2012-10-26 Thread Alan Stern
driver) to carry out the command. Does Windows provide this sort of "raw SCSI" interface? Alan Stern -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for

Re: [Libusbx-devel] Selecting a composite device interface?

2012-10-20 Thread Alan Stern
tances. If the bRequestType doesn't indicate a vendor-specific type, and if the recipient is an interface or an endpoint belonging to an interface, then the request won't be accepted if someone else has already claimed that interface. And if nobody has claimed the interface, it will automati

Re: [Libusbx-devel] Selecting a composite device interface?

2012-10-19 Thread Alan Stern
e Number: 1 > Number of endpoints: 0 > > What I don't get is how to write to the second interface. > > Using anything other than an index of 1 for libusb_claim_interface() > returns LIBUSB_ERROR_NOT_SUPPORTED. The first interface is index 0, the second is index 1. > I

Re: [Libusbx-devel] usbutils for Mac OS X and Cygwin

2012-10-16 Thread Alan Stern
ollowing string (i.e., the part following the comma) to the linker as a command-line option. Alan Stern -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance managemen

Re: [Libusbx-devel] [PATCH] usbfs: Add a new disconnect-and-claim ioctl (v2)

2012-09-09 Thread Alan Stern
will just act like the > regular claim-interface ioctl, this is by design, as returning an error for > this condition would open a new bag of race-conditions. > > Changes in v2: > -Fix indentation of if blocks where the condition spans mu

Re: [Libusbx-devel] RFC: libusbx OS specific API calls

2012-09-02 Thread Alan Stern
packet value; that also wouldn't be so bad.) Then the RAW_IO flag could always be used and the other options would be irrelevant. It's kind of a shame that Windows goes to such lengths to provide the illusion of a continuous data stream instead of the packetized stream that USB

Re: [Libusbx-devel] RFC: libusbx OS specific API calls

2012-09-02 Thread Alan Stern
o do with short packets, as Hans assumed. Instead, it means the WinUSB will allow the driver to read less data than the device sends, without generating a Babble error. Alan Stern -- Live Security Virtual Conference Exclusive

Re: [Libusbx-devel] [PATCH] usbfs: Add a new disconnect-and-claim ioctl

2012-08-22 Thread Alan Stern
SY; If you prefer something else, that's okay. Just don't put the "strncmp" in the same column as the "return". > Before I respin the patch, any other remarks from you? No, everything else seems okay. Alan Stern -

Re: [Libusbx-devel] [PATCH] usbfs: Add a new disconnect-and-claim ioctl

2012-08-22 Thread Alan Stern
B descriptors), but that's not true here. The only requirement is that the compilers used to build the kernel and the application agree on the size of unsigned int. If they didn't then things like struct dirent wouldn't work (it contains an unsigned short). Now if the type were unsig

Re: [Libusbx-devel] [PATCH] detach-kernel-driver: return ERROR_NOT_FOUND if usbfs is already bound (v2)

2012-07-30 Thread Alan Stern
rovide any valid driver name, and let NULL mean usbfs. No, let NULL mean "always detach". "usbfs" can mean usbfs. :-) Alan Stern -- Live Security Virtual Conference Exclusive live event will cover all th

Re: [Libusbx-devel] [PATCH] detach-kernel-driver: return ERROR_NOT_FOUND if usbfs is already bound (v2)

2012-07-29 Thread Alan Stern
r remaining possibility is a race between two libusb programs, in which case we don't care very much which one wins. Alan Stern -- Live Security Virtual Conference Exclusive live event will cover all the ways today&

Re: [Libusbx-devel] Bus address of root hub

2012-07-19 Thread Alan Stern
of a > HC in those cases. I agree. However, host controllers aren't USB devices. That is, they don't attach to a USB bus; they attach to some other sort of bus, such as PCI. Hence to learn the manufacturer and model of a host controller you would nee

Re: [Libusbx-devel] Bus address of root hub

2012-07-18 Thread Alan Stern
r a root hub, the values returned by other operating systems are just as valid as the values returned by Windows. > So it looks as if there is no possible > way to tell which host controller model runs a given bus except > for Windows. Not true at all. I

Re: [Libusbx-devel] Bus address of root hub

2012-07-17 Thread Alan Stern
n enumerated. > However, our querying of the hub is tied to already having identified a > device instantiated by Windows, and trying to populate some of its data. > Thus that DeviceAddress 0 entry we see should be an extra entry that > will be dropped, as failing to m

Re: [Libusbx-devel] Bus address of root hub

2012-07-16 Thread Alan Stern
On Mon, 16 Jul 2012, Pete Batard wrote: > On 2012.07.16 20:09, Alan Stern wrote: > > The device address is the actual value used on the USB bus to identify > > the device. It is a 7-bit number, and it can take on any value from 0 > > to 127. However 0 is reserved for newly-

Re: [Libusbx-devel] Bus address of root hub

2012-07-16 Thread Alan Stern
e value currently used by libusbx is always 255. The actual value is rather arbitrary, since it never appears on the USB bus. Alan Stern -- Live Security Virtual Conference Exclusive live event will cover all the ways

Re: [Libusbx-devel] [PATCH] linux_usbfs: Work around a driver binding race in reset handling

2012-07-06 Thread Alan Stern
gain ... True. And it doesn't help in situations where usbfs doesn't own all of the interfaces. > > Repeat the unbind and try again if the reclaim fails. Two iterations > > should be sufficient.

Re: [Libusbx-devel] [PATCH] linux_usbfs: Work around a driver binding race in reset handling

2012-07-06 Thread Alan Stern
by this patch. > > This still leaves a theoretical race window where the driver registration > finishes between our driver-unbind and interface-reclaim, I'm afraid there > is nothing we can against this. Repeat the unbind and try again if the reclaim fails. Two iterations sho

Re: [Libusbx-devel] [PATCH] Prefix LOG_LEVEL_ with LIBUSB_ to avoid conflicts

2012-07-03 Thread Alan Stern
read "The UNIX-HATERS Handbook" by Garfinkel, Weise, and Strassmann? It has a section on the ">From" problem on p.79. The book is very funny and a lot of fun to read. And it's freely available

Re: [Libusbx-devel] Can not get the configuration descriptor on WinXP

2012-06-27 Thread Alan Stern
tor_by_value(). 0 is not a valid configuration _value_ but it is a valid configuration _index_. Alan Stern -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and t

Re: [Libusbx-devel] usbdevfs: BULK_CONTINUATION flag does not work with XHCI controller

2012-06-04 Thread Alan Stern
dy pointed out in my previous mail in this thread, it seems > that devio too assumes that the controller will clear the halt it self after > a short bulk in packet. > > Would it be possible to first let the completion handler of the short packet > run before clearing the halt? And cou

Re: [Libusbx-devel] usbdevfs: BULK_CONTINUATION flag does not work with XHCI controller

2012-05-25 Thread Alan Stern
controller. That is, the hardware is supposed to recognize it as an exceptional case and stop the endpoint queue. Sarah knows the answers; she's the xhci-hcd maintainer. Anything I said about it would just be speculation. Alan Stern ---

Re: [Libusbx-devel] usbdevfs: BULK_CONTINUATION flag does not work with XHCI controller

2012-05-25 Thread Alan Stern
within devio.c. > Regards, > > Hans > > p.s. > > To verify my theory, I've tried raising the packet splitting limit in > libusb to 32k and that (unsurprisingly) fixes things, but that is just > a bandaid and not a proper fix for the issue at hand IMHO. Also >

Re: [Libusbx-devel] libusb_kernel_driver_active() and _detach() are racy

2012-05-03 Thread Alan Stern
pecify a driver name, and have USBDEVFS_DISCONNECT do nothing if the current driver isn't the one specified. Alan Stern -- Live Security Virtual Conference Exclusive live event will cover all the ways today&#x