You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(27) |
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(2) |
Feb
(19) |
Mar
(13) |
Apr
(15) |
May
(11) |
Jun
(17) |
Jul
(31) |
Aug
(45) |
Sep
(10) |
Oct
(40) |
Nov
(39) |
Dec
(45) |
| 2005 |
Jan
(113) |
Feb
(45) |
Mar
(38) |
Apr
(53) |
May
(11) |
Jun
(42) |
Jul
(56) |
Aug
(50) |
Sep
(32) |
Oct
(32) |
Nov
(47) |
Dec
(22) |
| 2006 |
Jan
(19) |
Feb
(32) |
Mar
(40) |
Apr
(40) |
May
(41) |
Jun
(44) |
Jul
(37) |
Aug
(51) |
Sep
(30) |
Oct
(30) |
Nov
(51) |
Dec
(20) |
| 2007 |
Jan
(7) |
Feb
(20) |
Mar
(17) |
Apr
(67) |
May
(13) |
Jun
(73) |
Jul
(16) |
Aug
(58) |
Sep
(29) |
Oct
(5) |
Nov
(74) |
Dec
(9) |
| 2008 |
Jan
(17) |
Feb
(12) |
Mar
(65) |
Apr
(22) |
May
(40) |
Jun
(32) |
Jul
(11) |
Aug
(8) |
Sep
(3) |
Oct
(41) |
Nov
(34) |
Dec
(12) |
| 2009 |
Jan
(44) |
Feb
(33) |
Mar
(16) |
Apr
(109) |
May
(11) |
Jun
(22) |
Jul
(21) |
Aug
(37) |
Sep
(5) |
Oct
(23) |
Nov
(7) |
Dec
(7) |
| 2010 |
Jan
(36) |
Feb
(40) |
Mar
(35) |
Apr
(45) |
May
(42) |
Jun
(104) |
Jul
(135) |
Aug
(50) |
Sep
(65) |
Oct
(110) |
Nov
(129) |
Dec
(75) |
| 2011 |
Jan
(105) |
Feb
(48) |
Mar
(93) |
Apr
(166) |
May
(169) |
Jun
(188) |
Jul
(106) |
Aug
(33) |
Sep
(85) |
Oct
(46) |
Nov
(102) |
Dec
(105) |
| 2012 |
Jan
(81) |
Feb
(115) |
Mar
(56) |
Apr
(93) |
May
(56) |
Jun
(77) |
Jul
(88) |
Aug
(52) |
Sep
(72) |
Oct
(16) |
Nov
(70) |
Dec
(70) |
| 2013 |
Jan
(23) |
Feb
(85) |
Mar
(38) |
Apr
(48) |
May
(40) |
Jun
(49) |
Jul
(33) |
Aug
(28) |
Sep
(66) |
Oct
(28) |
Nov
(28) |
Dec
(16) |
| 2014 |
Jan
(33) |
Feb
(58) |
Mar
(17) |
Apr
(50) |
May
(16) |
Jun
(24) |
Jul
(19) |
Aug
(32) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(10) |
| 2015 |
Jan
(11) |
Feb
(2) |
Mar
(4) |
Apr
(14) |
May
(1) |
Jun
(6) |
Jul
(16) |
Aug
(29) |
Sep
(6) |
Oct
(26) |
Nov
(10) |
Dec
|
| 2016 |
Jan
|
Feb
(20) |
Mar
(6) |
Apr
|
May
(3) |
Jun
(3) |
Jul
|
Aug
(16) |
Sep
(6) |
Oct
|
Nov
(15) |
Dec
|
| 2017 |
Jan
(1) |
Feb
(2) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2018 |
Jan
|
Feb
(8) |
Mar
(10) |
Apr
(16) |
May
|
Jun
(15) |
Jul
|
Aug
(3) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(3) |
Aug
|
Sep
(6) |
Oct
(2) |
Nov
(4) |
Dec
|
| 2022 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
(11) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(3) |
Dec
|
|
From: Stephan M. <ste...@we...> - 2006-08-27 13:52:51
|
>=20 > One of the challenges facing users of libusb-win32 in the > future is Microsoft's insistence on approving and cryptographically > signing kernel drivers for Windows XP 64 and Vista. AFAIK, this only affects Vista x64. > Is anyone tracking their WinUSB.sys/UMDF stuff, and is it possible > to write a libus-win32 wrapper for their UMDF, or used > WinUSB.sys instead of libusb0.sys, bypassing the need to install > a kernel driver on Windows XP 64 and Vista, even if it only supports > a subset of libusb-win32 features =3F I had a look at winusb.sys and its API some time ago and I think it should= be possible to write such a wrapper. I'll evaluate winusb when it becomes available for XP. >=20 > Graeme Gill. >=20 > ------------------------------------------------------------------------= - > Using Tomcat but need to do more=3F Need to support web services, security= =3F > Get stuff done quickly with pre-integrated technology to make your job e= asier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geroni= mo > http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642= > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Viren-Scan f=FCr Ihren PC! Jetzt f=FCr jeden. Sofort, online und kostenlos. Gleich testen! http://www.pc-sicherheit.web.de/freescan/=3Fmc=3D022222 |
|
From: Stephan M. <ste...@we...> - 2006-08-27 13:37:07
|
> Stephan Meyer wrote: > > Have you tried to install/update the driver by using the DLL's > > (undocumented) usb=5Finstall=5Fdriver=5Fnp function=3F >=20 > FWIW, this technique works fairly well for my HID devices. The only=20 > problem I've noticed is that if I install the driver, then unplug the=20 > device and plug in a different USB device (but one that still matches my= =20 > vendor/product spec) libusb does not get assigned to it. Instead the=20 > default MS driver is assigned until I either run usb=5Finstall=5Fdriver=5Fnp=20 > again or manually "update driver" via the DeviceManager GUI. I'm curious= =20 > why libusb does not get bound to all subsequent devices that match the=20 > spec. >=20 > --Adam >=20 This might be caused by the fact that Windows' HID driver is signed. Try this: rundll32 libusb0.dll,usb=5Ftouch=5Finf=5Ffile=5Fnp=5Frundll c:\windows\inf\input.inf= rundll32 libusb0.dll,usb=5Finstall=5Fdriver=5Fnp=5Frundll your=5Finf=5Ffile.inf Stephan >=20 > ------------------------------------------------------------------------= - > Using Tomcat but need to do more=3F Need to support web services, security= =3F > Get stuff done quickly with pre-integrated technology to make your job e= asier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geroni= mo > http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642= > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Viren-Scan f=FCr Ihren PC! Jetzt f=FCr jeden. Sofort, online und kostenlos. Gleich testen! http://www.pc-sicherheit.web.de/freescan/=3Fmc=3D022222 |
|
From: RayS <ra...@bl...> - 2006-08-25 14:02:28
|
At 02:04 AM 8/25/2006, Dan Ellis wrote: >Have you tried building from the top of cvs? There have been a >number of fixes since the last release. Hi Dan, No, I have not. But, Wander Lairsan said he was about to release a .4 pyusb version with all new build - I'll check on how he's doing. Thanks, Ray Ray Schumacher wrote: > Hi all, > > We have been trying to use the libusb driver to bulk_read from the Ti > ads1271 via the pyusb http://pyusb.berlios.de/ wrapper for Python. > The problem is that there is some bulkread() miscommunication between > the Python app and the Ti USB (implemented in firmware on the MMB0). > I have not gotten the Ti data to be collected fault-free via the > (required) bulk_read() method after many hours of testing various > settings and timings. > The Labview demo (using the Labview usb DLL, I assume) has no issues > at any speed or settings. > > I was testing using a 10Hz wave and data rates from 23Ksps to 55Ksps. > At low data rates the most compact Python code for bulkRead'ing could > read megasamples with few errors, but, the data is inevitably, > silently, corrupted. > > Requiring windows to update the DOS window (giving it focus) has > horrible effects on performance of the USB interaction, with loads of > reap_async timeout errors as well as silent corruption/data dropping; > the data result can also be missing data in the absence of a thrown > error. The latter is typical of the wx GUI app I did. The GUI program > suffers the same problem, where a GUI with a DOS window is worst. It > is evident that libusb/Python falls behind the > expectation/requirements of the firmware as something on the PC is > interrupted, and the Ti USB just quietly sends it the next data it > has. > > I also tried using ctypes > http://starship.python.net/crew/theller/ctypes/ > to call the win32 libusb0.dll directly and bypass the pyusb wrapper, > but failed to properly construct a device handle/pointer and didn't > try more in that direction. The C code I was following was from the > win32 package: > http://libusb-win32.cvs.sourceforge.net/*checkout*/libusb-win32/libusb/t ests/testlibusb_win.c > > If libusb only worked for me on LINUX, that would be fine also - > there are some notable USB implementation differences with Win32, > which I don't fully understand. One of them, usb_reap_async(), is > what time-out errors often in my programs. (It appears to be waiting > when it errors > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc /base/waitforsingleobject.asp > but I can't see what ever calls it directly, not even bulk_read(), or > why.) > > System is an AMD Opteron, Python 2.4, libusb 0.1.10.1 > > Thanks for any insight, > Ray > >& |
|
From: Paul E. F. <pe...@bi...> - 2006-08-25 10:57:56
|
Hi again,
=20
I have traced the -ENOMEM down to windows.c - usb_submit_async()=20
=20
if(!DeviceIoControl(c->dev->impl_info,=20
c->control_code,=20
&c->req, sizeof(libusb_request),=20
c->bytes,=20
c->size, &ret, &c->ol))
{
if(GetLastError() !=3D ERROR_IO_PENDING)
{
USB_ERROR_STR(-win_error_to_errno(), "usb_submit_async: "
"error: %s", win_error_to_string());
}
}
one of the parameters (maybe c->size or c->bytes ...) must be negative =
or too big.
=20
Btw. does anybody have a working project or workspace for Visual Studio =
that can rebuild the .dll ?
=20
=20
________________________________
Fra: lib...@li... =
[mailto:lib...@li...] P=E5 vegne af =
Paul Erik Farre
Sendt: 25. august 2006 09:41
Til: lib...@li...
Emne: [Libusb-win32-devel] usb_interrupt_write -> ENOMEM ?
=09
=09
LIBUSB_DLL error: usb_submit_async: error: Der er ikke tilstr=E6kkelig =
ledig hukommelse til at behandle denne kommando.
-12 =3D ENOMEM Not enough memory to execute this command
=20
How do one solve this problem ? Simply add system memory ?
=20
Windows XP (Professional version 2002) SP1 , 512M Ram , Intel P4 2GHz.=20
=09
Regards
Paul
|
|
From: Dan E. <Dan...@ne...> - 2006-08-25 09:05:18
|
Have you tried building from the top of cvs? There have been a number of fixes since the last release. Dan. Ray Schumacher wrote: > Hi all, >=20 > We have been trying to use the libusb driver to bulk_read from the Ti > ads1271 via the pyusb http://pyusb.berlios.de/ wrapper for Python.=20 > The problem is that there is some bulkread() miscommunication between > the Python app and the Ti USB (implemented in firmware on the MMB0). > I have not gotten the Ti data to be collected fault-free via the > (required) bulk_read() method after many hours of testing various > settings and timings. =20 > The Labview demo (using the Labview usb DLL, I assume) has no issues > at any speed or settings.=20 >=20 > I was testing using a 10Hz wave and data rates from 23Ksps to 55Ksps. > At low data rates the most compact Python code for bulkRead'ing could > read megasamples with few errors, but, the data is inevitably, > silently, corrupted. =20 >=20 > Requiring windows to update the DOS window (giving it focus) has > horrible effects on performance of the USB interaction, with loads of > reap_async timeout errors as well as silent corruption/data dropping; > the data result can also be missing data in the absence of a thrown > error. The latter is typical of the wx GUI app I did. The GUI program > suffers the same problem, where a GUI with a DOS window is worst. It > is evident that libusb/Python falls behind the > expectation/requirements of the firmware as something on the PC is > interrupted, and the Ti USB just quietly sends it the next data it > has. =20 >=20 > I also tried using ctypes > http://starship.python.net/crew/theller/ctypes/ > to call the win32 libusb0.dll directly and bypass the pyusb wrapper, > but failed to properly construct a device handle/pointer and didn't > try more in that direction. The C code I was following was from the > win32 package: =20 > http://libusb-win32.cvs.sourceforge.net/*checkout*/libusb-win32/libusb/t ests/testlibusb_win.c >=20 > If libusb only worked for me on LINUX, that would be fine also - > there are some notable USB implementation differences with Win32, > which I don't fully understand. One of them, usb_reap_async(), is > what time-out errors often in my programs. (It appears to be waiting > when it errors > http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/dllpro= c /base/waitforsingleobject.asp > but I can't see what ever calls it directly, not even bulk_read(), or > why.)=20 >=20 > System is an AMD Opteron, Python 2.4, libusb 0.1.10.1 >=20 > Thanks for any insight, > Ray >=20 >=20 > ------------------------------------------------------------------------ - > Using Tomcat but need to do more? Need to support web services, > security?=20 > Get stuff done quickly with pre-integrated technology to make your > job easier Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo =20 > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
From: Dan E. <Dan...@ne...> - 2006-08-25 08:58:21
|
Graeme Gill wrote: > One of the challenges facing users of libusb-win32 in the future is > Microsoft's insistence on approving and cryptographically signing > kernel drivers for Windows XP 64 and Vista. =20 >=20 > If libusb-win32 is to continue to be useful, then some strategy is > needed to address these changes.=20 >=20 > One solution would be for some entity with access to Microsoft's > signing program to take libusb-win32 under its wing, and maintain a > signed binary version of the kernel driver. =20 Signing the driver is a bit of a non-starter since you need to sign the inf file which needs altering for each device which is attached. Unless someone knows different. > On poking about in Microsoft's USB documentation, I noticed another > possible solution. Microsoft seems to have recognized the problems > with it's current USB driver model, and is developing a new one that > offers a new, more universal user mode driver architecture called WDF > and UMDF: =20 >=20 > <http://www.microsoft.com/whdc/driver/wdf/wdf-intro.mspx> >=20 > Is anyone tracking their WinUSB.sys/UMDF stuff, and is it possible to > write a libus-win32 wrapper for their UMDF, or used WinUSB.sys > instead of libusb0.sys, bypassing the need to install a kernel driver > on Windows XP 64 and Vista, even if it only supports a subset of > libusb-win32 features ? =20 That seems like the best solution for Vista to me. I've briefly played with the user mode wrappers when hunting down a bug in libusb. Dan. |
|
From: Paul E. F. <pe...@bi...> - 2006-08-25 07:41:34
|
LIBUSB_DLL error: usb_submit_async: error: Der er ikke tilstr=E6kkelig =
ledig hukommelse til at behandle denne kommando.
-12 =3D ENOMEM Not enough memory to execute this command
=20
How do one solve this problem ? Simply add system memory ?
=20
Windows XP (Professional version 2002) SP1 , 512M Ram , Intel P4 2GHz.=20
Regards
Paul
|
|
From: Graeme G. <gr...@ar...> - 2006-08-25 05:12:32
|
One of the challenges facing users of libusb-win32 in the future is Microsoft's insistence on approving and cryptographically signing kernel drivers for Windows XP 64 and Vista. If libusb-win32 is to continue to be useful, then some strategy is needed to address these changes. One solution would be for some entity with access to Microsoft's signing program to take libusb-win32 under its wing, and maintain a signed binary version of the kernel driver. On poking about in Microsoft's USB documentation, I noticed another possible solution. Microsoft seems to have recognized the problems with it's current USB driver model, and is developing a new one that offers a new, more universal user mode driver architecture called WDF and UMDF: <http://www.microsoft.com/whdc/driver/wdf/wdf-intro.mspx> Is anyone tracking their WinUSB.sys/UMDF stuff, and is it possible to write a libus-win32 wrapper for their UMDF, or used WinUSB.sys instead of libusb0.sys, bypassing the need to install a kernel driver on Windows XP 64 and Vista, even if it only supports a subset of libusb-win32 features ? Graeme Gill. |
|
From: Adam K. <akr...@ro...> - 2006-08-24 23:43:48
|
Xiaofan Chen wrote: > On 8/24/06, Adam Kropelin <akr...@ro...> wrote: >> Stephan Meyer wrote: >>> Have you tried to install/update the driver by using the DLL's >>> (undocumented) usb_install_driver_np function? >> >> FWIW, this technique works fairly well for my HID devices. The only >> problem I've noticed is that if I install the driver, then unplug the >> device and plug in a different USB device (but one that still >> matches my vendor/product spec) libusb does not get assigned to it. >> Instead the default MS driver is assigned until I either run >> usb_install_driver_np again or manually "update driver" via the >> DeviceManager GUI. I'm curious why libusb does not get bound to all >> subsequent devices that match the spec. > > For PICkit 2, it works without a problem. If I unplug and plug > in the same device, libusb-win32 device driver is still assigned > to the device driver. If I unplug a PICkit 2 and plug in another > PICkit 2, libusb-win32 device driver is still assigned. > > PICkit 2 device does not have unique serial number since > it is not common for a user to have 2 PICkit 2 programmer. > > Your device might have different serail number assigned to > them and this might be the reason. I am not sure though. Yup, I have different serial numbers and I suspect you are right that is the reason for the behavior I am seeing. But I really know nothing about driver matching on Windows, so it's just a guess. --Adam |
|
From: Xiaofan C. <xia...@gm...> - 2006-08-24 23:36:54
|
On 8/24/06, Adam Kropelin <akr...@ro...> wrote: > Stephan Meyer wrote: > > Have you tried to install/update the driver by using the DLL's > > (undocumented) usb_install_driver_np function? > > FWIW, this technique works fairly well for my HID devices. The only > problem I've noticed is that if I install the driver, then unplug the > device and plug in a different USB device (but one that still matches my > vendor/product spec) libusb does not get assigned to it. Instead the > default MS driver is assigned until I either run usb_install_driver_np > again or manually "update driver" via the DeviceManager GUI. I'm curious > why libusb does not get bound to all subsequent devices that match the > spec. > For PICkit 2, it works without a problem. If I unplug and plug in the same device, libusb-win32 device driver is still assigned to the device driver. If I unplug a PICkit 2 and plug in another PICkit 2, libusb-win32 device driver is still assigned. PICkit 2 device does not have unique serial number since it is not common for a user to have 2 PICkit 2 programmer. Your device might have different serail number assigned to them and this might be the reason. I am not sure though. And even better, after I "update" the libusb-win32 device driver to HID driver, PICKit 2 now appears as a normal HID device: 2 entries under "Human Interface Device" -- "HID-compliant device" and "USB Human Interface Device". This is great! I just wonder why Windows only list PICkit 2 as an "HID-compliant device" last time? That is strange. Regards, Xiaofan |
|
From: Xiaofan C. <xia...@gm...> - 2006-08-24 23:26:44
|
On 8/24/06, Stephan Meyer <ste...@we...> wrote: > > Have you tried to install/update the driver by using the DLL's > (undocumented) usb_install_driver_np function? > > You can call it from the command line through its rundll interface: > > rundll32 libusb0.dll,usb_install_driver_np_rundll your_inf_file.inf > > > Stephan > Wow, it works! Now the libusb-win32 program can talk to PICkit 2 again. Thanks a lot! Maybe it is a good idea to document this in the libusb-win32 distribution. C:\Myprog\pickit\pk2-2.02-beta1>pk2 -device PK2 version 2.02 beta 1 - 2006/08/21 pk2 -device Locating USB Microchip PICkit2 (vendor 0x04d8/product 0x0033) found 5 busses Found USB PICkit as device '\\.\libusb0-0000--0x04d8-0x0033' on USB bus bus-0 Communication established. PICkit2 firmware version is 1.21.0 Device ID 0x1060 PIC16F628A Rev 4 found Family: Midrange Program size: 0x800 (2048) words, width 0x3fff Eeprom size: 0x80 (128) bytes ID location: 0x0 ID size: 0x4 (4) bytes Device ID 0x1060 Write burst 1 Program command P Program mode 1 Program timing N Data timing D Erase mode 0 CP mask 0x2100 Bandgap mask 0x0000 0x0000 Config mask 0x21ff Save osccal 0 Save bandgap 0 Command table 63 00 02 03 04 05 06 08 18 0a 09 0b ff ff ff ff Regards, Xiaofan |
|
From: Ray S. <ra...@bl...> - 2006-08-24 23:04:26
|
Hi all, We have been trying to use the libusb driver to bulk_read from the Ti ads1271 via the pyusb http://pyusb.berlios.de/ wrapper for Python. The problem is that there is some bulkread() miscommunication between the Python app and the Ti USB (implemented in firmware on the MMB0). I have not gotten the Ti data to be collected fault-free via the (required) bulk_read() method after many hours of testing various settings and timings. The Labview demo (using the Labview usb DLL, I assume) has no issues at any speed or settings. I was testing using a 10Hz wave and data rates from 23Ksps to 55Ksps. At low data rates the most compact Python code for bulkRead'ing could read megasamples with few errors, but, the data is inevitably, silently, corrupted. Requiring windows to update the DOS window (giving it focus) has horrible effects on performance of the USB interaction, with loads of reap_async timeout errors as well as silent corruption/data dropping; the data result can also be missing data in the absence of a thrown error. The latter is typical of the wx GUI app I did. The GUI program suffers the same problem, where a GUI with a DOS window is worst. It is evident that libusb/Python falls behind the expectation/requirements of the firmware as something on the PC is interrupted, and the Ti USB just quietly sends it the next data it has. I also tried using ctypes http://starship.python.net/crew/theller/ctypes/ to call the win32 libusb0.dll directly and bypass the pyusb wrapper, but failed to properly construct a device handle/pointer and didn't try more in that direction. The C code I was following was from the win32 package: http://libusb-win32.cvs.sourceforge.net/*checkout*/libusb-win32/libusb/tests/testlibusb_win.c If libusb only worked for me on LINUX, that would be fine also - there are some notable USB implementation differences with Win32, which I don't fully understand. One of them, usb_reap_async(), is what time-out errors often in my programs. (It appears to be waiting when it errors http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/waitforsingleobject.asp but I can't see what ever calls it directly, not even bulk_read(), or why.) System is an AMD Opteron, Python 2.4, libusb 0.1.10.1 Thanks for any insight, Ray |
|
From: Adam K. <akr...@ro...> - 2006-08-24 22:00:17
|
Stephan Meyer wrote: > Have you tried to install/update the driver by using the DLL's > (undocumented) usb_install_driver_np function? FWIW, this technique works fairly well for my HID devices. The only problem I've noticed is that if I install the driver, then unplug the device and plug in a different USB device (but one that still matches my vendor/product spec) libusb does not get assigned to it. Instead the default MS driver is assigned until I either run usb_install_driver_np again or manually "update driver" via the DeviceManager GUI. I'm curious why libusb does not get bound to all subsequent devices that match the spec. --Adam |
|
From: Stephan M. <ste...@we...> - 2006-08-24 17:22:39
|
Have you tried to install/update the driver by using the DLL's=20 (undocumented) usb=5Finstall=5Fdriver=5Fnp function=3F You can call it from the command line through its rundll interface: rundll32 libusb0.dll,usb=5Finstall=5Fdriver=5Fnp=5Frundll your=5Finf=5Ffile.inf Stephan > On 8/22/06, Xiaofan Chen <xia...@gm...> wrote: > > I have a little cute MCU programmer Microchip PICKit 2 and I beta > > tests alternative driving programs using libusb under Linux and Window= s. > > Under Windows I need to use libusb-win32 device driver. > > > > It runs fine for my home desktop under Windows XP professional > > SP2 in Singapore (along with various versions of Linux). For more > > detail, please refer to the following posts. > > http://forum.microchip.com/tm.aspx=3Fm=3D110205 > > > > Now I am under training in USA and I only has access to the corporate > > desktop running Windows XP SP2. I have one problem now. > > > > Normally PICkit 2 will appear under device manager as two > > device: "HID-compliant device" and "USB Human Interface Device". > > > > And it did appear as two device initially and I could also use the > > Microchip provided Windows program (using native Windows > > HID driver) to run it. > > > > Then I was trying to "update" the native HID driver to the device driv= er > > generated by libusb-win32 (1stly the 20060518 version and then > > the 0.1.10.1 version). Somehow it failed. This was working for my > > desktop at home. > > > > And then I have a major problem now: PICkit 2 only > > appears as a "HID-compliant device" inside device manager > > instead of both "HID-compliant device" and "USB Human Interface > > Device". The Microchip PC application still works. But I am not > > able to test the libusb based application since I am not able to > > install the libusb-win32 device driver. > > > > I know I can not use the filter driver due to the fact that this > > PICkit 2 has dual configurations (HID and custom). We had > > a discussion on this last year when I was trying to port the > > libusb based Linux application to Windows with libusb-win32. > > > > This is kind of stranger. Is there a reason why an HID device > > only has one entry in the device manager=3F > > > > Sorry for the long email. > > >=20 > Note I could only "update" the driver using the entry > "USB Human Interface Device" but not the entry > ""HID-compliant device" before. >=20 > As described in my Microchip Forum post, the procedure > to switch the driver to libusb-win32 device driver is the following. >=20 > ***************************** > Step 1: Go to Device Manager, verify that under > Human Interface Devices there are two PICkit 2 related device (HID-compi= lant > device and USB Human Interface Device). You know that through the detail= s > tab (Device Instance Id: VID=5F04D8&PID=5F0033\xxx). >=20 > Step 2: Right click "USB Human Interface Device" and select "Update Driv= er..." > Choose No to the Windows update question and click Next. > Choose "Install from a list of specific location Advanced" and click Nex= t. > Choose "Don't search. I will choose the driver to install" and choose Ne= xt. > Choose "Have Disk" and browse to the device driver directory > "C:\Program Files\libusb-win32-device-bin-0.1.10.1\bin" > and select pickit2.inf. Pickit2 should be in the Model text box. > Ignore the warning "This driver is not digitally signed". (MS will most = likely > not sign an LGPL/GPLed driver). Select Pickit 2 and click Next. >=20 > Windows will install the driver. >=20 > ******************************** >=20 > Regards, > Xiaofan >=20 > ------------------------------------------------------------------------= - > Using Tomcat but need to do more=3F Need to support web services, security= =3F > Get stuff done quickly with pre-integrated technology to make your job e= asier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geroni= mo > http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642= > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= Erweitern Sie FreeMail zu einem noch leistungsst=E4rkeren E-Mail-Postfach! =09 Mehr Infos unter http://freemail.web.de/home/landingpad/=3Fmc=3D021131 |
|
From: Stephan M. <ste...@we...> - 2006-08-24 17:17:51
|
Thanks for the patch. I've just applied it to the CVS version.
Stephan
> Adam Kropelin wrote:
> > On Wed, Aug 23, 2006 at 04:11:55PM +0100, Dan Ellis wrote:
> >> There's a small memory leak in usb=5Fcontrol=5Fmsg, in the case that
> >> usb=5Fio=5Fsync fails and it's an OUT, then the malloced block doesn't
> >> get freed:
> >=20
> > Hi, Dan,
> >=20
> > Thanks for posting about this bug and others. Have you considered
> > posting patches to fix the bugs=3F That way myself and other users
> > could try them out and Stephan, who I am sure is very busy, could
> > review and apply the changes without having to implement them. =20
>=20
> Good idea, here are the fixes for the memory leak and the corruption.
> The diff :
>=20
> Index: src/windows.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- windows.c 2006/08/08 16:16:03 1.52
> +++ windows.c 2006/08/20 17:00:38 (working copy)
> @@ -784,6 +784,11 @@
> {
> usb=5Ferror("usb=5Fcontrol=5Fmsg: sending control message failed, "
> "win error: %s", usb=5Fwin=5Ferror=5Fto=5Fstring());
> + =20
> + if(!(requesttype & USB=5FENDPOINT=5FIN))
> + {
> + free(out);
> + }
> return -usb=5Fwin=5Ferror=5Fto=5Ferrno();
> }
> =20
> @@ -1102,6 +1107,7 @@
> free(bus->root=5Fdev->children);
> }
> =20
> + bus->root=5Fdev->num=5Fchildren =3D 0;
> for(dev =3D bus->devices; dev; dev =3D dev->next)
> bus->root=5Fdev->num=5Fchildren++;
> =20
>=20
> ------------------------------------------------------------------------=
-
> Using Tomcat but need to do more=3F Need to support web services, security=
=3F
> Get stuff done quickly with pre-integrated technology to make your job e=
asier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geroni=
mo
> http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642=
> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
Erweitern Sie FreeMail zu einem noch leistungsst=E4rkeren E-Mail-Postfach! =09
Mehr Infos unter http://freemail.web.de/home/landingpad/=3Fmc=3D021131
|
|
From: Dan E. <Dan...@ne...> - 2006-08-24 08:39:41
|
Adam Kropelin wrote:
> On Wed, Aug 23, 2006 at 04:11:55PM +0100, Dan Ellis wrote:
>> There's a small memory leak in usb_control_msg, in the case that
>> usb_io_sync fails and it's an OUT, then the malloced block doesn't
>> get freed:
>=20
> Hi, Dan,
>=20
> Thanks for posting about this bug and others. Have you considered
> posting patches to fix the bugs? That way myself and other users
> could try them out and Stephan, who I am sure is very busy, could
> review and apply the changes without having to implement them. =20
Good idea, here are the fixes for the memory leak and the corruption.
The diff :
Index: src/windows.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- windows.c 2006/08/08 16:16:03 1.52
+++ windows.c 2006/08/20 17:00:38 (working copy)
@@ -784,6 +784,11 @@
{
usb_error("usb_control_msg: sending control message failed, "
"win error: %s", usb_win_error_to_string());
+ =20
+ if(!(requesttype & USB_ENDPOINT_IN))
+ {
+ free(out);
+ }
return -usb_win_error_to_errno();
}
=20
@@ -1102,6 +1107,7 @@
free(bus->root_dev->children);
}
=20
+ bus->root_dev->num_children =3D 0;
for(dev =3D bus->devices; dev; dev =3D dev->next)
bus->root_dev->num_children++;
=20
|
|
From: Adam K. <akr...@ro...> - 2006-08-23 15:42:16
|
On Wed, Aug 23, 2006 at 04:11:55PM +0100, Dan Ellis wrote: > There's a small memory leak in usb_control_msg, in the case that > usb_io_sync fails and it's an OUT, then the malloced block doesn't get > freed: Hi, Dan, Thanks for posting about this bug and others. Have you considered posting patches to fix the bugs? That way myself and other users could try them out and Stephan, who I am sure is very busy, could review and apply the changes without having to implement them. --Adam |
|
From: Dan E. <Dan...@ne...> - 2006-08-23 15:12:03
|
There's a small memory leak in usb_control_msg, in the case that
usb_io_sync fails and it's an OUT, then the malloced block doesn't get
freed:
/* out request? */
if(!(requesttype & USB_ENDPOINT_IN))
{
if(!(out =3D malloc(sizeof(libusb_request) + size)))
{
usb_error("usb_control_msg: memory allocation failed");=20
return -ENOMEM;
}
=20
memcpy(out, &req, sizeof(libusb_request));
memcpy((char *)out + sizeof(libusb_request), bytes, size);
out_size =3D sizeof(libusb_request) + size;
}
if(!usb_io_sync(dev->impl_info, code, out, out_size, in, in_size,
&read))
{
usb_error("usb_control_msg: sending control message failed, "
"win error: %s", usb_win_error_to_string());
return -usb_win_error_to_errno();
}
/* out request? */
if(!(requesttype & USB_ENDPOINT_IN))
{
free(out);
return size;
}
else
return read;
Dan.
|
|
From: Dan E. <Dan...@ne...> - 2006-08-23 13:25:27
|
Ok, the culprit is finally tracked down, it was nothing to do with lifetimes of struct usb_devices, but in usb_os_determine_children which was only fairly recently added. When the number of children is counted, the number is reset from the previous occasion, and eventually wraps resulting in a malloc of 0, but still an attempt to write something in the location allocated which causes heap corruption. This was not causing a problem until the memory leak of virtual hubs was fixed because the new virtual hubs were always zeroed. Dan |
|
From: Dan E. <Dan...@ne...> - 2006-08-23 10:54:08
|
Graeme Gill wrote: > Dan Ellis wrote: >=20 >> I've just spotted a problem which probably explains quite a bit of >> strange behaviour which has been seen: >>=20 >> When a device is unplugged, a subsequent call to usb_find_devices >> will free the struct usb_device, even though some other part of the >> software may have a handle open on the device, with the handle >> structure holding a pointer of the (now invalid) device. >=20 > This might explain why merely listing available USB devices corrupts > and breaks an existing Libusb-win32 USB connection running in another > process... =20 I've looked at this further, and I'm seriously doubting my initial suspicions. They were raised by colleagues who had seen heap corruption in the new code for putting children onto the virtual hub. I can't see anywhere that that the presence of the device structure in the handle structure would cause a problem. Dan. |
|
From: Xiaofan C. <xia...@gm...> - 2006-08-23 02:15:53
|
On 8/22/06, Xiaofan Chen <xia...@gm...> wrote: > I have a little cute MCU programmer Microchip PICKit 2 and I beta > tests alternative driving programs using libusb under Linux and Windows. > Under Windows I need to use libusb-win32 device driver. > > It runs fine for my home desktop under Windows XP professional > SP2 in Singapore (along with various versions of Linux). For more > detail, please refer to the following posts. > http://forum.microchip.com/tm.aspx?m=110205 > > Now I am under training in USA and I only has access to the corporate > desktop running Windows XP SP2. I have one problem now. > > Normally PICkit 2 will appear under device manager as two > device: "HID-compliant device" and "USB Human Interface Device". > > And it did appear as two device initially and I could also use the > Microchip provided Windows program (using native Windows > HID driver) to run it. > > Then I was trying to "update" the native HID driver to the device driver > generated by libusb-win32 (1stly the 20060518 version and then > the 0.1.10.1 version). Somehow it failed. This was working for my > desktop at home. > > And then I have a major problem now: PICkit 2 only > appears as a "HID-compliant device" inside device manager > instead of both "HID-compliant device" and "USB Human Interface > Device". The Microchip PC application still works. But I am not > able to test the libusb based application since I am not able to > install the libusb-win32 device driver. > > I know I can not use the filter driver due to the fact that this > PICkit 2 has dual configurations (HID and custom). We had > a discussion on this last year when I was trying to port the > libusb based Linux application to Windows with libusb-win32. > > This is kind of stranger. Is there a reason why an HID device > only has one entry in the device manager? > > Sorry for the long email. > Note I could only "update" the driver using the entry "USB Human Interface Device" but not the entry ""HID-compliant device" before. As described in my Microchip Forum post, the procedure to switch the driver to libusb-win32 device driver is the following. ***************************** Step 1: Go to Device Manager, verify that under Human Interface Devices there are two PICkit 2 related device (HID-compilant device and USB Human Interface Device). You know that through the details tab (Device Instance Id: VID_04D8&PID_0033\xxx). Step 2: Right click "USB Human Interface Device" and select "Update Driver..." Choose No to the Windows update question and click Next. Choose "Install from a list of specific location Advanced" and click Next. Choose "Don't search. I will choose the driver to install" and choose Next. Choose "Have Disk" and browse to the device driver directory "C:\Program Files\libusb-win32-device-bin-0.1.10.1\bin" and select pickit2.inf. Pickit2 should be in the Model text box. Ignore the warning "This driver is not digitally signed". (MS will most likely not sign an LGPL/GPLed driver). Select Pickit 2 and click Next. Windows will install the driver. ******************************** Regards, Xiaofan |
|
From: Xiaofan C. <xia...@gm...> - 2006-08-23 02:09:34
|
I have a little cute MCU programmer Microchip PICKit 2 and I beta tests alternative driving programs using libusb under Linux and Windows. Under Windows I need to use libusb-win32 device driver. It runs fine for my home desktop under Windows XP professional SP2 in Singapore (along with various versions of Linux). For more detail, please refer to the following posts. http://forum.microchip.com/tm.aspx?m=110205 Now I am under training in USA and I only has access to the corporate desktop running Windows XP SP2. I have one problem now. Normally PICkit 2 will appear under device manager as two device: "HID-compliant device" and "USB Human Interface Device". And it did appear as two device initially and I could also use the Microchip provided Windows program (using native Windows HID driver) to run it. Then I was trying to "update" the native HID driver to the device driver generated by libusb-win32 (1stly the 20060518 version and then the 0.1.10.1 version). Somehow it failed. This was working for my desktop at home. And then I have a major problem now: PICkit 2 only appears as a "HID-compliant device" inside device manager instead of both "HID-compliant device" and "USB Human Interface Device". The Microchip PC application still works. But I am not able to test the libusb based application since I am not able to install the libusb-win32 device driver. I know I can not use the filter driver due to the fact that this PICkit 2 has dual configurations (HID and custom). We had a discussion on this last year when I was trying to port the libusb based Linux application to Windows with libusb-win32. This is kind of stranger. Is there a reason why an HID device only has one entry in the device manager? Sorry for the long email. Regards, Xiaofan |
|
From: Dan E. <Dan...@ne...> - 2006-08-22 14:28:10
|
Graeme Gill wrote: > Dan Ellis wrote: >=20 >> I've just spotted a problem which probably explains quite a bit of >> strange behaviour which has been seen: >>=20 >> When a device is unplugged, a subsequent call to usb_find_devices >> will free the struct usb_device, even though some other part of the >> software may have a handle open on the device, with the handle >> structure holding a pointer of the (now invalid) device. >=20 > This might explain why merely listing available USB devices corrupts > and breaks an existing Libusb-win32 USB connection running in another > process... =20 Maybe, but I thought that each process connected to a a DLL created a new set of static variables? Certainly it can be a problem if more than one thread lists available devices, or one thread lists the devices while another one (or ones) use it. Dan. |
|
From: Graeme G. <gr...@ar...> - 2006-08-21 14:31:28
|
Dan Ellis wrote: > I've just spotted a problem which probably explains quite a bit of > strange behaviour which has been seen: > > When a device is unplugged, a subsequent call to usb_find_devices will > free the struct usb_device, even though some other part of the software > may have a handle open on the device, with the handle structure holding > a pointer of the (now invalid) device. This might explain why merely listing available USB devices corrupts and breaks an existing Libusb-win32 USB connection running in another process... Graeme Gill. |
|
From: Dan E. <Dan...@ne...> - 2006-08-21 14:11:32
|
I've just spotted a problem which probably explains quite a bit of strange behaviour which has been seen: When a device is unplugged, a subsequent call to usb_find_devices will free the struct usb_device, even though some other part of the software may have a handle open on the device, with the handle structure holding a pointer of the (now invalid) device. Subsequent calls through the API using the handle will now use the freed memory which may now contain something completely different, and cause very strange behaviour, rather than just producing the correct error that there is no device present. I think the struct usb_device objects need to contain a reference count of how many times they've been opened, and they should only be immediately deleted in usb_find_devices if the reference count is zero, otherwise the object needs flagging as deleted. Furthermore, when a handle is closed, it should check if the device object has been marked as deleted and deleted it at that point, and any attempts to use a handle containing a deleted object should fail (i.e. there needs to be a check any time a handle is used that the object is not marked deleted). Not deleting the struct usb_device is a rather horrible workaround, at least then the memory won't have been corrupted and behaviour should be less unexpected. I'm not sure how badly this bug affects the linux version of the library, but they seem closer to releasing the new API which doesn't seem to suffer from this problem. Dan. |