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: Linus W. <tr...@df...> - 2006-09-19 19:32:25
|
On Tue, 19 Sep 2006, Stephan Meyer wrote: > What you're trying to do won't work, at least not with libusb. > libusb is not a USB filter or USB monitor. It's not possible to extract > data packets from a mouse's or any other device's data stream. If what is sought after here is a USB sniffer/spy for reverse engineering I recommend using USB Snoopy. It does the trick on just about any device by filtering the main driver. http://www.wingmanteam.com/usbsnoopy/ The HW analyzers from Ellisys, CATC etc are good too, but costly. Linus |
|
From: Stephan M. <ste...@we...> - 2006-09-19 18:19:35
|
What you're trying to do won't work, at least not with libusb. libusb is not a USB filter or USB monitor. It's not possible to extract data packets from a mouse's or any other device's data stream. Take a look at Microsofts RawInput API, maybe this works: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/rawinput.asp Stephan > Hello, > what is the correct way to spy mouse data with libusb under WindowsXP? > > I have found some code snippets here, but unfortunately all of them are > DOS applications and not work: > here is a code snippet form this newsgroup here: > > Pseudocode: > MyThread() > { > usb_set_configuration(usbptr,1); > usb_claim_interface(usbptr,0); > usb_set_altinterface(usbptr,0); > while(bRun==1) > { > usb_bulk_read(usbptr, 0x81, tmp, sizeof(tmp),20); > if(tmp & testvalue) > DoSomething(); > } > } > when I put this in a separate thread the system, or better the mouse > driver, freeze. > But I want dedect only that one of the mouse button was pressed (this > are additional mouse buttons, therefore WIN-API not work), but all the > data should be forwarded to the original mouse driver and should not > catch and lost from my application. > > Can someone tell me this secret or have some example links for this? > > Thanks and regards > Peter > > -- > Newsreader: http://mesnews.net/index-gb.php > Deutsche Hilfedatei: http://www.lastwebpage.de/download/mesnews-de.zip > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > 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 > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071&distributionid=000000000066 |
|
From: Peter F. (L. <las...@gm...> - 2006-09-18 15:32:54
|
Hello,
what is the correct way to spy mouse data with libusb under WindowsXP?
I have found some code snippets here, but unfortunately all of them are
DOS applications and not work:
here is a code snippet form this newsgroup here:
Pseudocode:
MyThread()
{
usb_set_configuration(usbptr,1);
usb_claim_interface(usbptr,0);
usb_set_altinterface(usbptr,0);
while(bRun==1)
{
usb_bulk_read(usbptr, 0x81, tmp, sizeof(tmp),20);
if(tmp & testvalue)
DoSomething();
}
}
when I put this in a separate thread the system, or better the mouse
driver, freeze.
But I want dedect only that one of the mouse button was pressed (this
are additional mouse buttons, therefore WIN-API not work), but all the
data should be forwarded to the original mouse driver and should not
catch and lost from my application.
Can someone tell me this secret or have some example links for this?
Thanks and regards
Peter
--
Newsreader: http://mesnews.net/index-gb.php
Deutsche Hilfedatei: http://www.lastwebpage.de/download/mesnews-de.zip
|
|
From: Ray S. <ra...@bl...> - 2006-09-12 21:18:14
|
Hi Xiaofan, At 06:14 PM 9/11/2006, you wrote: >I've posted the binary packages in Microchip Forum. >http://forum.microchip.com/tm.aspx?m=110205 >Check out the pyk-0.4 binary. ... You probably need to build your own wrapper >depending on your tools. OK; I just used the .4 binary, and v0.10 of libusb_win32 >> >2) PyUSB >> >http://pyusb.berlios.de/ >> >> It mostly works for me, but for some odd bulkread data drop/error. > >The author (Wander Lairson) is very helpful, you can always contact >him about the error. Lat time I found a minor bug and he helped to solve it. Yes, he is quite helpful, he's testing pyusb .34 with libusb_win32 v0.12 (he indicated) >You can also use DebugView with and turn on debug option for libusb-win32. Nice, I've re-installed .34/0.10 with debug on My original code tells the device that it wants 2**8*64 samples fh.controlMsg(HOST2DEVICE, request=int(0x04), buffer=struct.pack("L",256), index=INTERFACE) and data always comes up an odd number short as I loop over ans += bulkRead(ADS1271EVMBULKIN, usbBlocks*64) The device thinks it's done, and I haven't gotten 16384 samples.... I tried your pyk-0.4 version of usb.py, but I haven't figured out how to do a usb_control_msg properly with it to send the device firmware its commands. I also have some pyrex based libusb code from the firmware author to look at now, so I'll keep trying. Thanks for the input! Ray |
|
From: Xiaofan C. <xia...@gm...> - 2006-09-12 01:14:20
|
On 9/11/06, Ray Schumacher <ra...@bl...> wrote: > I've been trying pyusb, but getting some errors in the bulkreads, > so I'm trying to work around it. > I did just get codegenerator to wrap libusb0.dll, but have not > written code for it yet. > > >1) BITPIM libusb Python wrapper > >http://www.bitpim.org/pyxr/c/projects/bitpim/src/native/usb/usb.py.html > > What/which did you use? > I just downloaded from > http://svn.sourceforge.net/viewvc/bitpim/releases/0.9.07/src/native/usb/ > and got "ImportError: libusb not supported on win32" under Python You need to build the wrapper dll by yourself. I've posted the binary packages in Microchip Forum. http://forum.microchip.com/tm.aspx?m=110205 Check out the pyk-0.4 binary. I have put the batch file (mybuild.bat) and the compiled wrapper dll (_libusb.dll) inside the zip archive. I am using Python 2.4/SWIG-1.3.24/libusb-win32 0.1.10.1 as well as MinGW. You probably need to build your own wrapper depending on your tools. > >2) PyUSB > >http://pyusb.berlios.de/ > > It mostly works for me, but for some odd bulkread data drop/error. The author (Wander Lairson) is very helpful, you can always contact him about the error. Lat time I found a minor bug and he helped to solve it. You can also use DebugView with and turn on debug option for libusb-win32. Last time Stephan Meyer helped me to find out one issue with bulkread. Checkout the libusb-win32 mailing list archive. It is a pity that I do not know much about host programming so that I do not really explore a bit deeper with PyUSB. Still I think using DebugView with libusb-win32 can be a nice tool for libusb-win32 application debugging (including pyusb and bitpim libusb wrapper). http://sourceforge.net/mailarchive/message.php?msg_id=13464331 Regards, Xiaofan |
|
From: Ray S. <ra...@bl...> - 2006-09-12 00:41:59
|
At 04:06 PM 9/11/2006, you wrote: >On 9/8/06, Ray Schumacher <ra...@bl...> wrote: >> I just tried to wrap libusb0.dll with ctypes' codegenerator, >> http://starship.python.net/crew/theller/ctypes/old/codegen.html >> >python C:\Python24\Lib\site-packages\ctypes\wrap\h2xml.py usb.h -o usb.xml -c >> > >Sorry I am not so sure what you want to achieve but you might want to >look at the following two projects if you want to use libusb with Python. >Both works under Linux/Windows/Mac OS X. Hi Xiaofan, I've been trying pyusb, but getting some errors in the bulkreads, so I'm trying to work around it. I did just get codegenerator to wrap libusb0.dll, but have not written code for it yet. >1) BITPIM libusb Python wrapper >http://www.bitpim.org/pyxr/c/projects/bitpim/src/native/usb/usb.py.html > >Mark Rages is using it for the pyk project, a Python program to talk >to PICkit 2 (a small USB programmer for Microchip PICs) under Linux. >I've tried it under Windows and it works well. What/which did you use? I just downloaded from http://svn.sourceforge.net/viewvc/bitpim/releases/0.9.07/src/native/usb/ and got "ImportError: libusb not supported on win32" under Python >2) PyUSB >http://pyusb.berlios.de/ > >I've tested it with PICKit 2 and it works too. It mostly works for me, but for some odd bulkread data drop/error. Thanks, Ray |
|
From: Xiaofan C. <xia...@gm...> - 2006-09-11 23:06:05
|
On 9/8/06, Ray Schumacher <ra...@bl...> wrote: > I just tried to wrap libusb0.dll with ctypes' codegenerator, > http://starship.python.net/crew/theller/ctypes/old/codegen.html > >python C:\Python24\Lib\site-packages\ctypes\wrap\h2xml.py usb.h -o usb.xml -c > Sorry I am not so sure what you want to achieve but you might want to look at the following two projects if you want to use libusb with Python. Both works under Linux/Windows/Mac OS X. 1) BITPIM libusb Python wrapper http://www.bitpim.org/pyxr/c/projects/bitpim/src/native/usb/usb.py.html Mark Rages is using it for the pyk project, a Python program to talk to PICkit 2 (a small USB programmer for Microchip PICs) under Linux. I've tried it under Windows and it works well. 2) PyUSB http://pyusb.berlios.de/ I've tested it with PICKit 2 and it works too. Regards, Xiaofan |
|
From: Ray S. <ra...@bl...> - 2006-09-11 20:09:18
|
If I don't use the -c for including #defines symbols libusb wraps OK! : >python C:\Python24\Lib\sitepackages\ctypes\wrap\h2xml.py usb.h -o usb.xml >python C:\Python24\Lib\site-packages\ctypes\wrap\xml2py.py usb.xml -l libusb0.dll -o usb.py -v -w ########################### # Symbols defined: # # Variables: 486 # Struct/Unions: 1188 # Functions: 3388 # Enums: 98 # Enum values: 592 # Typedefs: 3162 # Pointertypes: 1433 # Arraytypes: 96 # unknown functions: 1653 # # Total symbols: 9365 ########################### needed 1 loop(s) (still lots of "unknown functions" like function RpcMgmtBindingInqParameter not found in any dll function ltoa not found in any dll I had also uncommented line 537 in codegenerator.py Are these needed?) Using -c, still has problems/madness. Is the extra #define including useful here? It is a huge increase. Mainly, are these extra #define symbols really required for the Python wrapper? Using -c, I tried removing all #include lines from usb.h, no change. I then added the -w switch to have it search WIndows DLLs, which reduced the unresolved from 700+ to ~80: >C:\Python24\Lib\site-packages\ctypes\wrap\xml2py.py usb.xml -l libusb0.dll -o usb.py -v -w It is picking up these aliases from libusb0.dll itself, apparently. They have ASCII text references visible in the .dll, but the aliases do not appear to be in the libusb-win32-src files - I assume they are included from there, at some point? Can I just ignore these 80 unresolved aliases? Can I safely just exclude them with an h2xml.cfg? Will the Python wrapper "care" if they are? typical examples: VarUI4FromUI1 (in Oleaut32.lib ) QueryServiceConfig2A ( Advapi32.lib ) End of a typical verbose output: ... # unresolved alias: RpcNsEntryExpandName = RpcNsEntryExpandNameA # unresolved alias: WINGDIAPI = DECLSPEC_IMPORT ########################### # Symbols defined: # # Variables: 10243 # Struct/Unions: 1188 # Functions: 3388 # Enums: 98 # Enum values: 592 # Typedefs: 3162 # Pointertypes: 1433 # Arraytypes: 96 # unknown functions: 1655 # # Total symbols: 9365 ########################### needed 1 loop(s) I'll cross post to ctypes... Thanks, Ray At 10:14 AM 9/9/2006, RayS wrote: >Thanks Stephan, I'll give it another try Monday. > >Ray > >At 08:32 AM 9/9/2006, you wrote: >> > I just tried to wrap libusb0.dll with ctypes' codegenerator, >> > http://starship.python.net/crew/theller/ctypes/old/codegen.html >> > >python C:\Python24\Lib\site-packages\ctypes\wrap\h2xml.py usb.h >> -o usb.xml -c >> > OK >> > >C:\Python24\Lib\site-packages\ctypes\wrap\xml2py.py usb.xml -l >> libusb0.dll -o usb.py >> > which seems to go OK, mostly, but I get a zillion: >> > >> > # unresolved alias: AddPrintProcessor = AddPrintProcessorA >> > # unresolved alias: VarUI2FromInt = VarUI2FromI4 >> >>These are symbols exported by some of Windows' system DLLs. The errors >>might be caused by the fact that usb.h includes windows.h and stdlib.h. >>Try to remove these includes from the header before running the code >>generator. >> >> > ... >> > What extra header do I need to allow the script to resolve these >> references in the dll? >> >>You don't need any extra headers, just usb.h. > > > > >------------------------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >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 >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Libusb-win32-devel mailing list >Lib...@li... >https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
From: RayS <ra...@bl...> - 2006-09-09 17:18:59
|
Thanks Stephan, I'll give it another try Monday. Ray At 08:32 AM 9/9/2006, you wrote: > > I just tried to wrap libusb0.dll with ctypes' codegenerator, > > http://starship.python.net/crew/theller/ctypes/old/codegen.html > > >python C:\Python24\Lib\site-packages\ctypes\wrap\h2xml.py usb.h > -o usb.xml -c > > OK > > >C:\Python24\Lib\site-packages\ctypes\wrap\xml2py.py usb.xml -l > libusb0.dll -o usb.py > > which seems to go OK, mostly, but I get a zillion: > > > > # unresolved alias: AddPrintProcessor = AddPrintProcessorA > > # unresolved alias: VarUI2FromInt = VarUI2FromI4 > >These are symbols exported by some of Windows' system DLLs. The errors >might be caused by the fact that usb.h includes windows.h and stdlib.h. >Try to remove these includes from the header before running the code >generator. > > > ... > > What extra header do I need to allow the script to resolve these > references in the dll? > >You don't need any extra headers, just usb.h. |
|
From: Stephan M. <ste...@we...> - 2006-09-09 15:32:35
|
> I just tried to wrap libusb0.dll with ctypes' codegenerator,=20 > http://starship.python.net/crew/theller/ctypes/old/codegen.html > >python C:\Python24\Lib\site-packages\ctypes\wrap\h2xml.py usb.h -o usb= .xml -c > OK > >C:\Python24\Lib\site-packages\ctypes\wrap\xml2py.py usb.xml -l libusb0.= dll -o usb.py > which seems to go OK, mostly, but I get a zillion: >=20 > # unresolved alias: AddPrintProcessor =3D AddPrintProcessorA > # unresolved alias: VarUI2FromInt =3D VarUI2FromI4 These are symbols exported by some of Windows' system DLLs. The errors might be caused by the fact that usb.h includes windows.h and stdlib.h. Try to remove these includes from the header before running the code gener= ator. > ... > What extra header do I need to allow the script to resolve these referen= ces in the dll=3F You don't need any extra headers, just usb.h. > Is this a (also) question for ctypes-users=3F >=20 > Ray Schumacher >=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 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: Ray S. <ra...@bl...> - 2006-09-08 23:28:22
|
I just tried to wrap libusb0.dll with ctypes' codegenerator, http://starship.python.net/crew/theller/ctypes/old/codegen.html >python C:\Python24\Lib\site-packages\ctypes\wrap\h2xml.py usb.h -o usb.xml -c OK >C:\Python24\Lib\site-packages\ctypes\wrap\xml2py.py usb.xml -l libusb0.dll -o usb.py which seems to go OK, mostly, but I get a zillion: # unresolved alias: AddPrintProcessor = AddPrintProcessorA # unresolved alias: VarUI2FromInt = VarUI2FromI4 ... What extra header do I need to allow the script to resolve these references in the dll? Is this a (also) question for ctypes-users? Ray Schumacher |
|
From: <IC-...@t-...> - 2006-09-05 08:21:12
|
Hello,
>From: "Dan Ellis" <Dan...@ne...>
>
>kosel wrote:
>> Hello,
>>
>>> From: IC-...@t-... (kosel)
>>>
>>>> From: "Dan Ellis" <Dan...@ne...> The problems you
>>>> are describing sound very much like ones I encountered when keeping
>>>> a handle open to the device and putting a laptop into standby (and
>>>> got fixed).
>>>
>>> it seems to be connected with your solved problem.
>>>
>>> I commented out the
>>> usb_close(udev);
>>> which was executed after usb_bulk_read failed and before the loop to
>>> research for the device is reentered.
>>
>> ups,
>> I forgot to wrote, that commenting out the call of usb_close _seems_
>> to solve the problem for S1 suspend.
>> After resume from S1 everything seem to work fine.
>>
>> But after resume from S3 suspend, there is still no wake up for the
>> USB. (Not only my libusb device.)
Concerning this point: it doesn't depend on the kind of suspend.
It depend on the call of usb_close.
>
>I think you may need a kernel debugger to get much further. Try
>debugview from sysinternals (free).
>
>You can update the driver (with any additional debug you put in) by just
>putting the new build into WINDOWS\system32\drivers and replugging your
>device.
I have added
usb_message("usb_os_close\n");
in the beginning of usb_os_close. While enabling libusb debug output
and running debugview, the problem does not occur, because debugview
takes a lot of CPU time for debugoutput.
But without debugview running, the problem occurs.
Also without my usb_message but with debuview running.
So there must be some kind of race condition.
Greetings
Juergen
|
|
From: Dan E. <Dan...@ne...> - 2006-09-04 14:19:21
|
kosel wrote: > Hello, >=20 >> From: IC-...@t-... (kosel) >>=20 >>> From: "Dan Ellis" <Dan...@ne...> The problems you >>> are describing sound very much like ones I encountered when keeping >>> a handle open to the device and putting a laptop into standby (and >>> got fixed). >>=20 >> it seems to be connected with your solved problem. >>=20 >> I commented out the >> usb_close(udev); >> which was executed after usb_bulk_read failed and before the loop to >> research for the device is reentered. >=20 > ups, > I forgot to wrote, that commenting out the call of usb_close _seems_ > to solve the problem for S1 suspend.=20 > After resume from S1 everything seem to work fine. >=20 > But after resume from S3 suspend, there is still no wake up for the > USB. (Not only my libusb device.)=20 I think you may need a kernel debugger to get much further. Try debugview from sysinternals (free). You can update the driver (with any additional debug you put in) by just putting the new build into WINDOWS\system32\drivers and replugging your device. Dan. |
|
From: <IC-...@t-...> - 2006-09-04 12:49:31
|
Hello, >From: IC-...@t-... (kosel) > >>From: "Dan Ellis" <Dan...@ne...> >>The problems you are describing sound very much like ones I encountered >>when keeping a handle open to the device and putting a laptop into >>standby (and got fixed). > >it seems to be connected with your solved problem. > >I commented out the >usb_close(udev); >which was executed after usb_bulk_read failed and before >the loop to research for the device is reentered. ups, I forgot to wrote, that commenting out the call of usb_close _seems_ to solve the problem for S1 suspend. After resume from S1 everything seem to work fine. But after resume from S3 suspend, there is still no wake up for the USB. (Not only my libusb device.) Greetings Juergen |
|
From: <IC-...@t-...> - 2006-09-04 11:55:28
|
Hello again, >From: "Dan Ellis" <Dan...@ne...> >The problems you are describing sound very much like ones I encountered >when keeping a handle open to the device and putting a laptop into >standby (and got fixed). it seems to be connected with your solved problem. I commented out the usb_close(udev); which was executed after usb_bulk_read failed and before the loop to research for the device is reentered. Coul it be, that Windows unloads the driver, if no handle remains open to the device? Greetings Juergen |
|
From: <IC-...@t-...> - 2006-09-04 11:43:16
|
Hello, >From: IC-...@t-... (kosel) > >>From: "Dan Ellis" <Dan...@ne...> >> >> >>Are you using the latest snapshot (27 August 2006)? It fixes a plethora >>of bugs to do with going into suspend and power management over the >>current release (from 2005). > >I am using CVS sources from august 28 (about 9 o'clock) And it is still uptodate. >Compiled with msys/mingw and DDK 3790. >I go to download the snapshot. Even if compile the snapshot without the DDK, I got the same strange results. Greetings Juergen |
|
From: <IC-...@t-...> - 2006-09-04 11:22:10
|
Hello, >From: "Dan Ellis" <Dan...@ne...> > >kosel wrote: >> Hello, >> >>> From: IC-...@t-... (kosel) >> >>> It seems, that this prevents the host (XP SP2) to wake up my device >>> after S1 resume! I am also not sure, if allways all the certified >>> USB 2.0 hubs have received a resume. > >Are you using the latest snapshot (27 August 2006)? It fixes a plethora >of bugs to do with going into suspend and power management over the >current release (from 2005). I am using CVS sources from august 28 (about 9 o'clock). Compiled with msys/mingw and DDK 3790. I go to download the snapshot. Greetings Juergen |
|
From: Dan E. <Dan...@ne...> - 2006-09-04 10:42:08
|
kosel wrote: > Hello, >=20 >> From: IC-...@t-... (kosel) >=20 >> It seems, that this prevents the host (XP SP2) to wake up my device >> after S1 resume! I am also not sure, if allways all the certified >> USB 2.0 hubs have received a resume.=20 Are you using the latest snapshot (27 August 2006)? It fixes a plethora of bugs to do with going into suspend and power management over the current release (from 2005). The problems you are describing sound very much like ones I encountered when keeping a handle open to the device and putting a laptop into standby (and got fixed). Dan. |
|
From: <IC-...@t-...> - 2006-09-04 09:59:05
|
Hello,
>From: IC-...@t-... (kosel)
>It seems, that this prevents the host (XP SP2) to wake up my device after S1
>resume!
>I am also not sure, if allways all the certified USB 2.0 hubs have received a
>resume.
>
>My loop:
>
>#ifdef unix
>// see ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1031/dnucmg/html/UCMGch09.htm
>#include <time.h>
>#define SECONDS 1 // unix measures time in sleep in seconds
>#else
>#include <windows.h>
>#define SECONDS 1000 // microsoft sleep uses milliseconds
>#define sleep(x) Sleep(x*SECONDS)
>#endif
>
> while(!udev) {
if I call the sleep function in this line, no USB device resumes at all!
(At least all devices and hubs which are connected to the same root hub port.)
> udev = getUsbStepcounter(devicenumber);
> fflush(stderr);
> if(!udev) {
> printf("Waiting for device %d to reconnect\n",
> devicenumber);
> fflush(stdout); // flush iobuffers before
> // sleepling
> sleep(1);
> }
> }
Is there any known side effect between the MS Sleep function and libusb?
Greetings
Juergen
|
|
From: <IC-...@t-...> - 2006-09-04 09:22:46
|
Hello,
>From: Dan Ellis <de...@ne...>
>
>kosel wrote:
>>
>> Hello,
>>
>>
>> is there a recommended way for disconnect detection for applications using
>> libusb?
>> In the past I terminated my application if data transfer from device
>> failed.
>> But this also hapens during start and end of suspend.
>> And for certification reasons, the application must not terminate during
>> suspend.
>>
>What certification problems are caused by your application terminating
>during suspend? Surely as long as it picks up again upon resume then it
>should be OK.
USB-IF certification demands that host enters S1 suspend while application
is active.
After the host resumes, the application must continue without error.
My application is a simple shell application, as I wrote it for Linux.
So the application does not listen for Windows powermanagement messages.
So the application could not distinguish if errocode -5 from usb_bulk_read
is caused by a device disconnect or a device suspend.
I have just tried the following:
After usb_bulk_read returns a errorcode < 0, the application releases the
interface and closes the device.
Then the application searches in a loop for the device to become available
again.
It seems, that this prevents the host (XP SP2) to wake up my device after S1
resume!
I am also not sure, if allways all the certified USB 2.0 hubs have received a
resume.
My loop:
#ifdef unix
// see ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1031/dnucmg/html/UCMGch09.htm
#include <time.h>
#define SECONDS 1 // unix measures time in sleep in seconds
#else
#include <windows.h>
#define SECONDS 1000 // microsoft sleep uses milliseconds
#define sleep(x) Sleep(x*SECONDS)
#endif
while(!udev) {
udev = getUsbStepcounter(devicenumber);
fflush(stderr);
if(!udev) {
printf("Waiting for device %d to reconnect\n",
devicenumber);
fflush(stdout); // flush iobuffers before
// sleepling
sleep(1);
}
}
the getDevice function:
usb_dev_handle* getUsbStepcounter(const unsigned char n) {
// Returns a handle to the n-th USB Stepcounter,
// or a NULL pointer if the n-th device doesn't exits.
struct usb_bus *bus;
struct usb_device *dev;
unsigned char i = 0;
usb_dev_handle* udev = NULL;
int errcode;
usb_find_busses();
usb_find_devices();
#ifdef DEBUG
fprintf(stderr,"Searching for %d device with vid %04X and pid
%04X\n",
n,STEPCOUNTER_VENDOR_ID,STEPCOUNTER_PRODUCT_ID);
#endif
for (bus = usb_get_busses(); bus; bus = bus->next) {
for (dev = bus->devices; dev; dev = dev->next) {
#ifdef DEBUG
fprintf(stderr,"%s/%s %04X/%04X\n", bus->dirname,
dev->filename,
dev->descriptor.idVendor,
dev->descriptor.idProduct);
#endif
if( dev->descriptor.idVendor == STEPCOUNTER_VENDOR_ID
&& dev->descriptor.idProduct ==
STEPCOUNTER_PRODUCT_ID) {
// Vendorid and Productid match
// now compare endpoints etc
if(dev->config[0].bNumInterfaces != 1) {
#ifdef DEBUG
fprintf(stderr,"bNumInterfaces =
%d\n",dev->config[0].bNumInterfaces);
#endif
} else if
(dev->config[0].interface[0].altsetting[0].endpoint[0].bEndpointAddress !=
POSITION_ENDPOINT ) {
#ifdef DEBUG
fprintf(stderr,"config[0].interface[0].altsetting[0].endpoint[0].bEndpointAddres
s = %02xh\n",
dev->config[0].interface[0].altsetting[0].endpoint[0].bEndpointAddress);
#endif
} else if
(dev->config[0].interface[0].altsetting[0].endpoint[1].bEndpointAddress !=
CONFIG_ENDPOINT ) {
#ifdef DEBUG
fprintf(stderr,"config[0].interface[0].altsetting[0].endpoint[1].bEndpointAddres
s = %02xh\n",
dev->config[0].interface[0].altsetting[0].endpoint[1].bEndpointAddress);
#endif
} else {
i++;
}
#ifdef DEBUG
fprintf(stderr,"Found USB Stepcounter %d\n",i);
#endif
usb_dev_handle* getUsbStepcounter(const unsigned char n) {
// Returns a handle to the n-th USB Stepcounter,
// or a NULL pointer if the n-th device doesn't exits.
struct usb_bus *bus;
struct usb_device *dev;
unsigned char i = 0;
usb_dev_handle* udev = NULL;
int errcode;
usb_find_busses();
usb_find_devices();
#ifdef DEBUG
fprintf(stderr,"Searching for %d device with vid %04X and pid
%04X\n",
n,STEPCOUNTER_VENDOR_ID,STEPCOUNTER_PRODUCT_ID);
#endif
for (bus = usb_get_busses(); bus; bus = bus->next) {
for (dev = bus->devices; dev; dev = dev->next) {
#ifdef DEBUG
fprintf(stderr,"%s/%s %04X/%04X\n", bus->dirname,
dev->filename,
dev->descriptor.idVendor,
dev->descriptor.idProduct);
#endif
if( dev->descriptor.idVendor == STEPCOUNTER_VENDOR_ID
&& dev->descriptor.idProduct ==
STEPCOUNTER_PRODUCT_ID) {
// Vendorid and Productid match
// now compare endpoints etc
if(dev->config[0].bNumInterfaces != 1) {
#ifdef DEBUG
fprintf(stderr,"bNumInterfaces =
%d\n",dev->config[0].bNumInterfaces);
#endif
} else if
(dev->config[0].interface[0].altsetting[0].endpoint[0].bEndpointAddress !=
POSITION_ENDPOINT ) {
#ifdef DEBUG
fprintf(stderr,"config[0].interface[0].altsetting[0].endpoint[0].bEndpointAddres
s = %02xh\n",
dev->config[0].interface[0].altsetting[0].endpoint[0].bEndpointAddress);
#endif
} else if
(dev->config[0].interface[0].altsetting[0].endpoint[1].bEndpointAddress !=
CONFIG_ENDPOINT ) {
#ifdef DEBUG
fprintf(stderr,"config[0].interface[0].altsetting[0].endpoint[1].bEndpointAddres
s = %02xh\n",
dev->config[0].interface[0].altsetting[0].endpoint[1].bEndpointAddress);
#endif
} else {
i++;
}
#ifdef DEBUG
fprintf(stderr,"Found USB Stepcounter %d\n",i);
#endif
if(i==n) {
// the n-th USB Stepcounter is found
udev = usb_open(dev);
if(!udev) {
fprintf(stderr,"Can't open
device");
return NULL;
}
errcode = usb_set_configuration(udev,1);
if(errcode) {
#ifdef DEBUG
fprintf(stderr,"Failed to set
USB Stepcounter 1 configuration 1\n");
reportError(errcode);
#endif
usb_close(udev);
udev = NULL;
return NULL;
}
errcode = usb_claim_interface(udev,0);
if(errcode) {
#ifdef DEBUG
fprintf(stderr,"Failed to get
USB Stepcounter 1, interface 0\n");
if(errcode<0)
reportError(-errcode);
#endif
usb_close(udev);
udev = NULL;
}
return udev;
}
}
}
}
return NULL;
}
Have I done anything wrong with my code,
what keeps the USB system from resuming devices?
Greetings
Juergen
|
|
From: Dan E. <de...@ne...> - 2006-09-01 19:07:42
|
kosel wrote: > > Hello, > > > is there a recommended way for disconnect detection for applications using > libusb? > In the past I terminated my application if data transfer from device > failed. > But this also hapens during start and end of suspend. > And for certification reasons, the application must not terminate during > suspend. > What certification problems are caused by your application terminating during suspend? Surely as long as it picks up again upon resume then it should be OK. Dan. |
|
From: <IC-...@t-...> - 2006-09-01 10:02:50
|
Hello, is there a recommended way for disconnect detection for applications using libusb? In the past I terminated my application if data transfer from device failed. But this also hapens during start and end of suspend. And for certification reasons, the application must not terminate during suspend. Greetings Juergen -- mailto:Jue...@ic... Phone: +49/851/94412-14 Fax: +49/851/40141 |
|
From: Paul E. F. <pe...@bi...> - 2006-08-28 07:00:09
|
=20
Just moved to a newer Visual Studio (C++.NET) ,=20
reinstalled the 0.1.10.1 driver
(had a -116 error from usb_interrupt_write !?)=20
then restartet my PC=20
- now it works OK!
=20
Paul
________________________________
Fra: lib...@li... =
[mailto:lib...@li...] P=E5 vegne af =
Paul Erik Farre
Sendt: 28. august 2006 08:40
Til: lib...@li...
Emne: Re: [Libusb-win32-devel] usb_interrupt_write -> ENOMEM ?
=09
=09
Thanks ,=20
the .dll does seems intact - ( it's only 33kb in size ? )=20
- and i get "Ordinal 82 could not be located in libusb0.dll"
=20
Regards
Paul
________________________________
Fra: lib...@li... =
[mailto:lib...@li...] P=E5 vegne af =
Dan Ellis
Sendt: 25. august 2006 14:59
Til: lib...@li...
Emne: Re: [Libusb-win32-devel] usb_interrupt_write -> ENOMEM ?
=09
=09
bytes is just a pointer so could be anything.
=20
I've compiled a version of the library which traps a negative size, =
hopefully it won't get stripped on the way to you.
=20
Dan.
________________________________
From: lib...@li... =
[mailto:lib...@li...] On Behalf Of =
Paul Erik Farre
Sent: 25 August 2006 11:56
To: lib...@li...
Subject: Re: [Libusb-win32-devel] usb_interrupt_write -> ENOMEM ?
=09
=09
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());
}
}
=09
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
=09
=09
________________________________
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: Paul E. F. <pe...@bi...> - 2006-08-28 06:40:09
|
Thanks ,=20
the .dll does seems intact - ( it's only 33kb in size ? )=20
- and i get "Ordinal 82 could not be located in libusb0.dll"
=20
Regards
Paul
________________________________
Fra: lib...@li... =
[mailto:lib...@li...] P=E5 vegne af =
Dan Ellis
Sendt: 25. august 2006 14:59
Til: lib...@li...
Emne: Re: [Libusb-win32-devel] usb_interrupt_write -> ENOMEM ?
=09
=09
bytes is just a pointer so could be anything.
=20
I've compiled a version of the library which traps a negative size, =
hopefully it won't get stripped on the way to you.
=20
Dan.
________________________________
From: lib...@li... =
[mailto:lib...@li...] On Behalf Of =
Paul Erik Farre
Sent: 25 August 2006 11:56
To: lib...@li...
Subject: Re: [Libusb-win32-devel] usb_interrupt_write -> ENOMEM ?
=09
=09
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());
}
}
=09
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
=09
=09
________________________________
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. =
=09
Regards
Paul
|
|
From: Stephan M. <ste...@we...> - 2006-08-27 14:20:04
|
I just released a new development snapshot that includes preliminary support for x64 systems (ia64, Itanium is not supported!). You can download this version from the projects download page: http://sourceforge.net/project/showfiles.php=3Fgroup=5Fid=3D78138&package=5Fid=3D121= 441 Please note that I didn't test the 64bit version of the driver and the dll= since I do not own a 64bit system. So it would nice if someone who has such a system would test it and report any problems to this list. Some further notes: - the inf-wizard tool has been modified. It now creates .inf files that wo= rk on all systems (win98se - winxp64) - the 64bit version of the driver and the dll are named libusb0=5Fx64.sys an= d libusb0=5Fx64.dll - when the driver is installed using an .inf file on a x64 system then the= se=20 files will automatically be renamed to libusb0.sys and libusb0.dll by Wind= ows and copied to the appropriate system folders - the new .inf file also installs a 32bit version of the dll in the <windi= r>\syswow64 folder so that 32bit applications will still work on 64bit systems - all .exe files are still 32bit Let me know if anything doesn't work. Stephan =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=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 |