Discussion:
[Libusb-devel] libusb-1.0 windows backend now in Cygwin packages
Xiaofan Chen
2010-03-30 03:32:21 UTC
Permalink
I accidentally found out libusb-1.0 Windows Backend is already inside
Cygwin packages yesterday during an installation of Cygwin.
http://www.cygwin.com/ml/cygwin-announce/2010-03/msg00005.html
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=libusb

I have not tried it yet. The version is called libusb1.0-1.0.5+git03e9371a.
--
Xiaofan http://mcuee.blogspot.com
Pete Batard
2010-03-30 14:17:44 UTC
Permalink
Post by Xiaofan Chen
I accidentally found out libusb-1.0 Windows Backend is already inside
Cygwin packages yesterday during an installation of Cygwin.
I have not tried it yet. The version is called libusb1.0-1.0.5+git03e9371a.
Interesting.

I see it too on my end with the latest cygwin, and this is definitely
one of the versions with the Windows backend.
03e9371a460031dcb599a1cf504539667cf12f1c is r153 (2010.02.06), so they
are quite a few versions behind, but I guess they'll just update their
package when we have the official release.

And while I had no hand in this, I'm quite glad to see that libusb 1.0
adoption is being promoted in cygwin too. The more people use libusb
1.0, the better!

Regards,

/Pete
Xiaofan Chen
2010-06-12 02:01:14 UTC
Permalink
Post by Pete Batard
Interesting.
I see it too on my end with the latest cygwin, and this is definitely
one of the versions with the Windows backend.
03e9371a460031dcb599a1cf504539667cf12f1c is r153 (2010.02.06), so they
are quite a few versions behind, but I guess they'll just update their
package when we have the official release.
And while I had no hand in this, I'm quite glad to see that libusb 1.0
adoption is being promoted in cygwin too. The more people use libusb
1.0, the better!
FYI, they updated it to gitbd62c472-1 version which is dated 24-Apr-2010
(between r269 and r270). This is much more closer to the current tree.
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=libusb
http://mirrors.xmission.com/cygwin/release/libusb1.0/
--
Xiaofan http://mcuee.blogspot.com
Samuel Thibault
2010-06-12 02:11:20 UTC
Permalink
Hello,
Post by Xiaofan Chen
Post by Pete Batard
And while I had no hand in this, I'm quite glad to see that libusb 1.0
adoption is being promoted in cygwin too. The more people use libusb
1.0, the better!
FYI, they updated it to gitbd62c472-1 version which is dated 24-Apr-2010
(between r269 and r270). This is much more closer to the current tree.
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=libusb
http://mirrors.xmission.com/cygwin/release/libusb1.0/
Cf README: I packaged it for brltty :)

Samuel
Xiaofan Chen
2010-06-12 02:48:17 UTC
Permalink
On Sat, Jun 12, 2010 at 10:11 AM, Samuel Thibault
Post by Samuel Thibault
Post by Xiaofan Chen
FYI, they updated it to gitbd62c472-1 version which is dated 24-Apr-2010
(between r269 and r270). This is much more closer to the current tree.
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=libusb
http://mirrors.xmission.com/cygwin/release/libusb1.0/
Cf README: I packaged it for brltty :)
I see. So you are the Cygwin packager for both libusb-1.0
and libusb-win32. Glad to know this.

Maybe you want to update both libusb-1.0 and libusb-win32
to more recent version. Thanks.
--
Xiaofan http://mcuee.blogspot.com
chemelli
2010-10-02 12:07:09 UTC
Permalink
Hi all,

is there a way I can update on my own cygwin to latest libusb or even
better, can you please update packages to current trunk as I see that from
August a lot of new things are in.

Thank you in advance,

Simone
--
View this message in context: http://libusb.6.n5.nabble.com/libusb-1-0-windows-backend-now-in-Cygwin-packages-tp3162p3073778.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-10-02 12:56:47 UTC
Permalink
Post by chemelli
is there a way I can update on my own cygwin to latest libusb or even
better, can you please update packages to current trunk as I see that from
August a lot of new things are in.
It is really not difficult for you to build libusb-pbatard under Cygwin.
Get the git tree. Then run autogen.sh if you need the debug-log
option. If you do not want to use the default configure options
in the autogen.sh file. you can change it.

For example, you can use
"./configure --prefix=/usr --enable-examples-build".
--
Xiaofan
chemelli
2010-10-02 15:28:58 UTC
Permalink
autogen.sh will all take care of installing static lib ?

Simone
--
View this message in context: http://libusb.6.n5.nabble.com/libusb-1-0-windows-backend-now-in-Cygwin-packages-tp3162p3073940.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Pete Batard
2010-10-02 17:06:46 UTC
Permalink
Post by chemelli
autogen.sh will all take care of installing static lib ?
The autogen.sh script itself doesn't install the libraries, but it helps
creating a Makefile that has a "make install" feature, by calling
configure. If you run "make install" after libusb has been compiled, it
should follow the default procedure for the installation of libraries on
UNIX-like systems and copy the static and dynamic library to
/usr/local/lib, which is the default destination.

Note that it is up to you to change the --prefix option if the default
from "make install" doesn't suit your system's needs. Eg. if you want
the libraries to be copied in /usr/lib rather than /usr/local/lib, you
would use --prefix=/usr. The reason we are not setting up different
defaults for each platform is that package maintainers on UNIX-ike
systems would always use --prefix.

Also note that you don't have to re-run configure if you simply want to
add extra parameters from the ones already provided in autogen.
For instance, if the only thing you need is change the installation
prefix, you can use "./autogen.sh --prefix=/usr" and "--prefix=/usr"
will be added to the configure line.

You might also be able to disable some of the default configure options
by feeding them to autogen as well (eg. even though --enable-debug-log
is enabled by default, if you run "./autogen.sh --disable-debug-log",
forced debug logging should be turned off).

Regards,

/Pete
chemelli
2010-10-03 12:06:09 UTC
Permalink
Thx a lot Pete for your complete explanation.
I was able to both compile and install the lib :)

In the code of the app I was trying to compile I had to do a small change:

LIBUSB_API -> LIBUSB_CALL

And now it compiles.

I still get from time to time "libusb_handle_events returned with -1" and
"usb bulk write failed : ret = -1". So I'm wondering if libusb is considered
stable under Cygwin or there are some known issues...

Thanks.
--
View this message in context: http://libusb.6.n5.nabble.com/libusb-1-0-windows-backend-now-in-Cygwin-packages-tp3162p3074503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-10-03 23:41:35 UTC
Permalink
Post by chemelli
I still get from time to time "libusb_handle_events returned with -1" and
"usb bulk write failed : ret = -1". So I'm wondering if libusb is considered
stable under Cygwin or there are some known issues...
To solve the problem, you may have to post the program to
demonstrate the problem.
--
Xiaofan
Pete Batard
2010-10-04 16:30:32 UTC
Permalink
Post by chemelli
LIBUSB_API -> LIBUSB_CALL
Yes, we recently changed the name of that macro. The last cygwin package
would have used the old one.
Post by chemelli
I still get from time to time "libusb_handle_events returned with -1" and
"usb bulk write failed : ret = -1". So I'm wondering if libusb is considered
stable under Cygwin or there are some known issues...
The libusb backend is still fairly new, so it is better considered as
experimental at this stage. Of course, we're trying to iron out any
potential bug, so if you can tell us more about the conditions under
which those error appear, that would help. Telling us more about the
device you are communicating with, your application, and especially
providing a debug log would be especially useful.

If you used autogen to recompile libusb, debug logging should already be
enabled, through the --enable-debug-log option, but of course, if your
application is GUI only, you will have to redirect the console to see
that debug output.

Or, as Xiaofan pointed out, providing some form of access to either the
application (provided we can find a USB device that works with it) or
its source would also help.

Regards,

/Pete
Peter Stuge
2010-10-04 19:30:25 UTC
Permalink
Post by chemelli
I still get from time to time "libusb_handle_events returned with -1"
and "usb bulk write failed : ret = -1". So I'm wondering if libusb
is considered stable under Cygwin or there are some known issues...
No known issues, not too many have been using it in Cygwin. It would
really help if you could send a debug log, and please note which
library you are using. (Self-bult, which commit, or the cygwin
package?)


//Peter
Simone chemelli
2010-10-05 07:54:04 UTC
Permalink
I'm now testing the same on a VirtualBox with Ubuntu 10.04...once everything
works there, I'll come back to the Cygwin thing ;)

Thank you.

Simone

-----Original Message-----
From: Peter Stuge [mailto:***@stuge.se]
Sent: lunedì 4 ottobre 2010 21:30
To: libusb-***@lists.sourceforge.net
Subject: Re: [Libusb-devel] libusb-1.0 windows backend now in Cygwin
packages
Post by chemelli
I still get from time to time "libusb_handle_events returned with -1"
and "usb bulk write failed : ret = -1". So I'm wondering if libusb is
considered stable under Cygwin or there are some known issues...
No known issues, not too many have been using it in Cygwin. It would really
help if you could send a debug log, and please note which library you are
using. (Self-bult, which commit, or the cygwin
package?)


//Peter

----------------------------------------------------------------------------
--
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security easier
or more difficult to achieve? Read this whitepaper to separate the two and
get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
chemelli
2010-10-02 10:55:47 UTC
Permalink
Hi all,

is there a way I can update on my own cygwin to latest libusb or even
better, can you please update packages to current trunk as I see that from
August a lot of new things are in.

Thank you in advance,

Simone
--
View this message in context: http://libusb.6.n5.nabble.com/libusb-1-0-windows-backend-now-in-Cygwin-packages-tp3162p3073734.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Peter Stuge
2010-10-04 19:28:54 UTC
Permalink
Post by chemelli
is there a way I can update on my own cygwin to latest libusb
I suggest removing the installed cygwin package and then choosing if
you want to use libusb.git or libusb-pbatard.git, and then build and
install that manually into your cygwin environment:

git clone git://git.libusb.org/libusb.git
cd libusb
./autogen.sh --disable-debug-log && make install

(Replace libusb with libusb-pbatard if you would like to test the
code in Pete's repo, which has many more changes.)
Post by chemelli
or even better, can you please update packages to current trunk as
I see that from August a lot of new things are in.
In libusb-pbatard.git, yes. In libusb.git, maybe, maybe not. I think
it would be good if the cygwin package was based on libusb.git, and
now that there is some Windows support it is actually possible. But
note that Pete has many changes which are not included in libusb.git.

However - what to package is of course completely up to the packager!
:) I'd recommend staying close to libusb.git, but on the other hand
it's interesting to get more testing for code in libusb-pbatard.git.


//Peter
Samuel Thibault
2010-10-04 19:38:32 UTC
Permalink
Post by Peter Stuge
However - what to package is of course completely up to the packager!
:) I'd recommend staying close to libusb.git, but on the other hand
it's interesting to get more testing for code in libusb-pbatard.git.
I could actually package both: the cygwin installer permits to provide
"experimental" versions.

BTW, if somebody feels he has both time and cygwin competence, feel free
to ask me for adopting the libusb packages, I don't have as much time to
spend on it as one could like.

Samuel
Simone chemelli
2010-10-11 11:16:42 UTC
Permalink
Hi Samuel,

are you going to package libusb-pbatard.git as "experimental" ? I want to be
100% sure it's not something wrong I do that leads to my issues (for example
make install will not replace cybusb-1.0.dll).

Thank you.

Simone

-----Original Message-----
From: Samuel Thibault [mailto:***@ens-lyon.org]
Sent: lunedì 4 ottobre 2010 21:39
To: libusb-***@lists.sourceforge.net
Subject: Re: [Libusb-devel] libusb-1.0 windows backend now in Cygwin
packages
Post by Peter Stuge
However - what to package is of course completely up to the packager!
:) I'd recommend staying close to libusb.git, but on the other hand
it's interesting to get more testing for code in libusb-pbatard.git.
I could actually package both: the cygwin installer permits to provide
"experimental" versions.

BTW, if somebody feels he has both time and cygwin competence, feel free to
ask me for adopting the libusb packages, I don't have as much time to spend
on it as one could like.

Samuel

----------------------------------------------------------------------------
--
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security easier
or more difficult to achieve? Read this whitepaper to separate the two and
get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d

Samuel Thibault
2010-10-04 22:14:07 UTC
Permalink
Post by Peter Stuge
However - what to package is of course completely up to the packager!
:) I'd recommend staying close to libusb.git,
Mmm, but that branch doesn't seem to have the dlltool stuff to build an
actual cygusb-1.0.dll.

Samuel
Peter Stuge
2010-10-04 22:31:19 UTC
Permalink
Post by Samuel Thibault
Post by Peter Stuge
staying close to libusb.git,
Mmm, but that branch doesn't seem to have the dlltool stuff to
build an actual cygusb-1.0.dll.
So what happens when you run make? Please send the full output. Maybe
even include output from configure.

libtool should be doing all the work.


//Peter
Samuel Thibault
2010-10-04 22:41:41 UTC
Permalink
Post by Peter Stuge
Post by Samuel Thibault
Post by Peter Stuge
staying close to libusb.git,
Mmm, but that branch doesn't seem to have the dlltool stuff to
build an actual cygusb-1.0.dll.
So what happens when you run make?
Only the static version gets built.
Post by Peter Stuge
Please send the full output. Maybe even include output from configure.
libtool should be doing all the work.
Is it actually working for you from the libusb repo? The libtool
documentation tells me that win32-dll has to be passed to
AC_PROG_LIBTOOL to make it produce a dll, which is not the case in the
libusb repo.

Samuel
Xiaofan Chen
2010-10-05 01:04:17 UTC
Permalink
On Tue, Oct 5, 2010 at 6:41 AM, Samuel Thibault
Post by Samuel Thibault
Post by Peter Stuge
So what happens when you run make?
Only the static version gets built.
Post by Peter Stuge
Please send the full output. Maybe even include output from configure.
libtool should be doing all the work.
Is it actually working for you from the libusb repo?  The libtool
documentation tells me that win32-dll has to be passed to
AC_PROG_LIBTOOL to make it produce a dll, which is not the case in the
libusb repo.
Indeed you are right. Right now the offiial repo does not produce
the dll. libusb-pbatard produces the dll and dll.a file.

I did the test under Linux (Arch) and cross-build with 32bit MinGW.

Official repo.
[***@myhost libusb]$ make
make all-recursive
make[1]: Entering directory `/home/mcuee/Desktop/build/libusb1/win32/libusb'
Making all in libusb
make[2]: Entering directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb/libusb'
CC libusb_1_0_la-core.lo
CC libusb_1_0_la-descriptor.lo
CC libusb_1_0_la-io.lo
CC libusb_1_0_la-sync.lo
CC libusb_1_0_la-poll_windows.lo
CC libusb_1_0_la-windows_usb.lo
/bin/sh ../libtool --mode=compile i486-mingw32-windres -i
libusb-1.0.rc -o libusb-1.0.lo
libtool: compile: i486-mingw32-windres -i libusb-1.0.rc -DDLL_EXPORT
-DPIC -o .libs/libusb-1.0.o
libtool: compile: i486-mingw32-windres -i libusb-1.0.rc -o
libusb-1.0.o >/dev/null 2>&1
CC libusb_1_0_la-threads_windows.lo
CCLD libusb-1.0.la
libtool: link: warning: undefined symbols not allowed in
i486-pc-mingw32 shared libraries
make[2]: Leaving directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb/libusb'
Making all in doc
make[2]: Entering directory `/home/mcuee/Desktop/build/libusb1/win32/libusb/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/mcuee/Desktop/build/libusb1/win32/libusb/doc'
Making all in examples
make[2]: Entering directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb/examples'
CC lsusb.o
CCLD lsusb.exe
make[2]: Leaving directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb/examples'
make[2]: Entering directory `/home/mcuee/Desktop/build/libusb1/win32/libusb'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/mcuee/Desktop/build/libusb1/win32/libusb'
make[1]: Leaving directory `/home/mcuee/Desktop/build/libusb1/win32/libusb'

libusb-pbatard:

[***@myhost libusb-pbatard]$ make
make all-recursive
make[1]: Entering directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard'
Making all in libusb
make[2]: Entering directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/libusb'
CC libusb_1_0_la-core.lo
CC libusb_1_0_la-descriptor.lo
CC libusb_1_0_la-io.lo
CC libusb_1_0_la-sync.lo
CC libusb_1_0_la-poll_windows.lo
CC libusb_1_0_la-windows_usb.lo
/bin/sh ../libtool --mode=compile i486-mingw32-windres -i
libusb-1.0.rc -o libusb-1.0.lo
libtool: compile: i486-mingw32-windres -i libusb-1.0.rc -DDLL_EXPORT
-DPIC -o .libs/libusb-1.0.o
libtool: compile: i486-mingw32-windres -i libusb-1.0.rc -o
libusb-1.0.o >/dev/null 2>&1
CC libusb_1_0_la-threads_windows.lo
CCLD libusb-1.0.la
Creating library file: .libs/libusb-1.0.dll.a
i486-mingw32-dlltool --kill-at --input-def libusb-1.0.def --dllname
libusb-1.0.dll --output-lib .libs/libusb-1.0.dll.a
make[2]: Leaving directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/libusb'
Making all in doc
make[2]: Entering directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/doc'
Making all in examples
make[2]: Entering directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/examples'
CC xusb.o
CCLD xusb.exe
libtool: link: Could not determine the host path corresponding to
libtool: link:
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/libusb/.libs'
libtool: link: Continuing, but uninstalled executables may not work.
libtool: link: Could not determine the host path corresponding to
libtool: link:
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/libusb/.libs:/usr/local/lib:/usr/local/bin'
libtool: link: Continuing, but uninstalled executables may not work.
CC lsusb.o
CCLD lsusb.exe
libtool: link: Could not determine the host path corresponding to
libtool: link:
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/libusb/.libs'
libtool: link: Continuing, but uninstalled executables may not work.
libtool: link: Could not determine the host path corresponding to
libtool: link:
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/libusb/.libs:/usr/local/lib:/usr/local/bin'
libtool: link: Continuing, but uninstalled executables may not work.
make[2]: Leaving directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard/examples'
make[2]: Entering directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard'
make[1]: Leaving directory
`/home/mcuee/Desktop/build/libusb1/win32/libusb-pbatard'
--
Xiaofan
Xiaofan Chen
2010-10-05 01:16:24 UTC
Permalink
Post by Xiaofan Chen
On Tue, Oct 5, 2010 at 6:41 AM, Samuel Thibault
Post by Samuel Thibault
Post by Peter Stuge
So what happens when you run make?
Only the static version gets built.
Post by Peter Stuge
Please send the full output. Maybe even include output from configure.
libtool should be doing all the work.
Is it actually working for you from the libusb repo?  The libtool
documentation tells me that win32-dll has to be passed to
AC_PROG_LIBTOOL to make it produce a dll, which is not the case in the
libusb repo.
Indeed you are right. Right now the offiial repo does not produce
the dll. libusb-pbatard produces the dll and dll.a file.
I did the test under Linux (Arch) and cross-build with 32bit MinGW.
The reason of this is that Pete Batard's second patch to the official
git has not been commited. If you add that patch, you should be
able to build the dlls and import library under MinGW and hopefully
Cygwin.

http://libusb.6.n5.nabble.com/PATCH-WIN-2-8-introduced-symbol-exports-def-for-Windows-DLLs-td2265676.html
[PATCH][WIN][2/8] introduced symbol exports (.def) for Windows DLLs
--
Xiaofan
Peter Stuge
2010-10-05 01:53:37 UTC
Permalink
Post by Samuel Thibault
Post by Peter Stuge
So what happens when you run make?
Only the static version gets built.
I see.
Post by Samuel Thibault
Post by Peter Stuge
Please send the full output. Maybe even include output from
configure.
libtool should be doing all the work.
Is it actually working for you from the libusb repo?
I have no Windows system. That's why I asked you to send logs.
Post by Samuel Thibault
The libtool documentation tells me that win32-dll has to be passed
to AC_PROG_LIBTOOL to make it produce a dll, which is not the case
in the libusb repo.
Ok. So this depends on how to resolve the DLL producing issue. That
will take a while longer. Is a libusb.git package with only a static
lib still useful?


//Peter
Xiaofan Chen
2010-10-05 02:11:55 UTC
Permalink
Post by Peter Stuge
Post by Samuel Thibault
The libtool documentation tells me that win32-dll has to be passed
to AC_PROG_LIBTOOL to make it produce a dll, which is not the case
in the libusb repo.
Ok. So this depends on how to resolve the DLL producing issue. That
will take a while longer. Is a libusb.git package with only a static
lib still useful?
It is certainly useful. But I tend to think that is not that useful, at least
for users of Dotnet and Python and other language binding/wrapers.
The result will probably be that people will continue to use libusb-pbatard
and not the official libusb git.
--
Xiaofan
kenichi_cui
2010-03-31 23:44:49 UTC
Permalink
hello:

I have installed libusb-1.0 under cgywin, and port the sample code from
linux .
compile proccess is success. but after run, I found that libusb_init()
return -99.
who know the reason ?
Post by Xiaofan Chen
I accidentally found out libusb-1.0 Windows Backend is already inside
Cygwin packages yesterday during an installation of Cygwin.
http://www.cygwin.com/ml/cygwin-announce/2010-03/msg00005.html
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=libusb
I have not tried it yet. The version is called
libusb1.0-1.0.5+git03e9371a.
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28103052.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-01 00:12:40 UTC
Permalink
Post by kenichi_cui
I have installed libusb-1.0 under cgywin, and port the sample code from
linux. compile proccess is success. but after run, I found that libusb_init()
return -99. who know the reason ?
Are you using the version from Cygwin? If that is the case, it is
quite an old version. As per Pete, it is commit
03e9371a460031dcb599a1cf504539667cf12f1c,
that is r153 (2010.02.06).

If possible, try to update the the later version.
For example, the latest snapshot is here.
http://www.libusb.org/wiki/windows_backend
--
Xiaofan http://mcuee.blogspot.com
kenichi_cui
2010-04-01 01:24:30 UTC
Permalink
yes. I used the version from Cygwin, the library file name as libusb-1.0.a
I use the latest Cygwin setup.exe to install and update.
Post by Xiaofan Chen
Post by kenichi_cui
I have installed libusb-1.0 under cgywin, and port the sample code from
linux. compile proccess is success. but after run, I found that libusb_init()
return -99. who know the reason ?
Are you using the version from Cygwin? If that is the case, it is
quite an old version. As per Pete, it is commit
03e9371a460031dcb599a1cf504539667cf12f1c,
that is r153 (2010.02.06).
If possible, try to update the the later version.
For example, the latest snapshot is here.
http://www.libusb.org/wiki/windows_backend
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28103607.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-01 02:33:33 UTC
Permalink
Post by kenichi_cui
yes. I used the version from Cygwin, the library file name as libusb-1.0.a
I use the latest Cygwin setup.exe to install and update.
I see. Maybe you want to try the latest git tree. Install git and
other tools (automake, autoconf, libtools, gcc, etc) from Cygwin
and then you can build the latest git tree. Or you can use the
latest binary snapshot from Pete.
http://www.libusb.org/wiki/windows_backend
--
Xiaofan http://mcuee.blogspot.com
kenichi_cui
2010-04-01 03:04:59 UTC
Permalink
I have updated latest GIT version 1.6.6, but same result also happen.

I need to know if it is necessary to install WINUSB.SYS and WINUSB DLL file.
Post by Xiaofan Chen
Post by kenichi_cui
yes. I used the version from Cygwin, the library file name as
libusb-1.0.a
I use the latest Cygwin setup.exe to install and update.
I see. Maybe you want to try the latest git tree. Install git and
other tools (automake, autoconf, libtools, gcc, etc) from Cygwin
and then you can build the latest git tree. Or you can use the
latest binary snapshot from Pete.
http://www.libusb.org/wiki/windows_backend
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104077.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
kenichi_cui
2010-04-01 02:32:25 UTC
Permalink
Hello XiaoFan:
I am really confused by those information.
since winusb package includes winusb.dll adn winusb.sys, why I need install
libusb.1-0 again ?

I refer to http://www.libusb.org/wiki/windows_backend, there is less
information about how
to install libusb under Cygwin, it seems to be related wth GIT.

After download the latest libusb_2010.03.30 package, I even cann't run
LSUSB.EXE and XUSB.exe.
it lack something or old version reason.

Would you provide some help for me ?
1. how to install latest libusb library files ? and where is it downloaded?
I only find linux version!
2. how to compile it ? Do I need install MingW ?
Post by Xiaofan Chen
Post by kenichi_cui
I have installed libusb-1.0 under cgywin, and port the sample code from
linux. compile proccess is success. but after run, I found that libusb_init()
return -99. who know the reason ?
Are you using the version from Cygwin? If that is the case, it is
quite an old version. As per Pete, it is commit
03e9371a460031dcb599a1cf504539667cf12f1c,
that is r153 (2010.02.06).
If possible, try to update the the later version.
For example, the latest snapshot is here.
http://www.libusb.org/wiki/windows_backend
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28103928.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Michael Plante
2010-03-31 23:50:44 UTC
Permalink
Post by kenichi_cui
I have installed libusb-1.0 under cgywin, and port the sample code from
linux .
What version of libusb-1.0? Ideally, a commit hash would help here...
Post by kenichi_cui
compile proccess is success. but after run, I found that libusb_init()
return -99.
who know the reason ?
Turn on debug logging?

Michael
Michael Plante
2010-04-01 03:16:24 UTC
Permalink
Post by kenichi_cui
I have updated latest GIT version 1.6.6, but same result also happen.
It has nothing to do with the version of the git executable. You need the
latest version of the git *repository*. If you have difficulty with that,
you can just use the gitweb interface and grab a source tarball.

http://git.libusb.org/?p=libusb-pbatard.git;a=commit;h=66192f7b43985dbb4f565
cce38187ee08749fdc0

and click the "snapshot" link.
Post by kenichi_cui
I need to know if it is necessary to install WINUSB.SYS and WINUSB DLL
file.

Yes. Don't forget to edit the inf first, per the instructions. If you wait
a little while, Pete may make this easier with the wdi utility, but it still
won't be part of the official distribution for awhile.


Michael
kenichi_cui
2010-04-01 03:45:35 UTC
Permalink
Hello Micheal:

since MS provide a whole of WINUSB api, WINUSB.sys, WINUSB.dll, why do we
need install
libusb library under Cygwin ? and it seems that application should call
libusb_1.0 library. Does
it call WINUSB.dll ?
I only find WINUSBxxxxx.dll under ddk, not WINUSB.sys, it is build in OS
intall binary package ?

As you said, I should do as following:
1. download libusb-pbatard-66192f7b43985dbb4f565.tar.gz from Repository, and
install it under
Cygwin, right ?
2. install WINUSB.sys and WINUSBxxx.dll under windows? right ?, but where
can I get WINUSB.sys?

Thx for your help
Post by Michael Plante
Post by kenichi_cui
I have updated latest GIT version 1.6.6, but same result also happen.
It has nothing to do with the version of the git executable. You need the
latest version of the git *repository*. If you have difficulty with that,
you can just use the gitweb interface and grab a source tarball.
http://git.libusb.org/?p=libusb-pbatard.git;a=commit;h=66192f7b43985dbb4f565
cce38187ee08749fdc0
and click the "snapshot" link.
Post by kenichi_cui
I need to know if it is necessary to install WINUSB.SYS and WINUSB DLL
file.
Yes. Don't forget to edit the inf first, per the instructions. If you wait
a little while, Pete may make this easier with the wdi utility, but it still
won't be part of the official distribution for awhile.
Michael
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104255.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-01 05:02:39 UTC
Permalink
Post by kenichi_cui
2. install WINUSB.sys and WINUSBxxx.dll under windows? right ?, but where
can I get WINUSB.sys?
It is inside the Coinstaller package.
http://www.libusb.org/wiki/windows_backend
http://libusb-winusb-wip.googlecode.com/files/winusb%20driver.zip


Download the WinUSB driver package, edit the inf file, then update
your original driver to use the new WinUSB driver using device
manager. In that case, it will install winusb.sys and winusb.dll.
--
Xiaofan http://mcuee.blogspot.com
kenichi_cui
2010-04-01 05:10:18 UTC
Permalink
If I only want to run "LSUSB.EXE" tool. how shoud I modify the INF?
Post by Xiaofan Chen
Post by kenichi_cui
2. install WINUSB.sys and WINUSBxxx.dll under windows? right ?, but where
can I get WINUSB.sys?
It is inside the Coinstaller package.
http://www.libusb.org/wiki/windows_backend
http://libusb-winusb-wip.googlecode.com/files/winusb%20driver.zip
Download the WinUSB driver package, edit the inf file, then update
your original driver to use the new WinUSB driver using device
manager. In that case, it will install winusb.sys and winusb.dll.
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104574.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
kenichi_cui
2010-04-01 04:23:58 UTC
Permalink
Hello Micheal:

I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe", there
is no message show.
I try it under linux, "lsusb.c" will enumerate all USB device/controller.

my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder. How
should I do now ?
upgrade to SP3?

I plan to run "lsusb.exe" normally that doesn't desire any own usb device,
so it is not necessary
to modify INF and install ? right ?
Post by Michael Plante
Post by kenichi_cui
I have updated latest GIT version 1.6.6, but same result also happen.
It has nothing to do with the version of the git executable. You need the
latest version of the git *repository*. If you have difficulty with that,
you can just use the gitweb interface and grab a source tarball.
http://git.libusb.org/?p=libusb-pbatard.git;a=commit;h=66192f7b43985dbb4f565
cce38187ee08749fdc0
and click the "snapshot" link.
Post by kenichi_cui
I need to know if it is necessary to install WINUSB.SYS and WINUSB DLL
file.
Yes. Don't forget to edit the inf first, per the instructions. If you wait
a little while, Pete may make this easier with the wdi utility, but it still
won't be part of the official distribution for awhile.
Michael
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104398.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Michael Plante
2010-04-01 04:34:23 UTC
Permalink
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more help
I can be.
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.

Michael
kenichi_cui
2010-04-01 04:50:31 UTC
Permalink
Hello Micheal:

I traced it, after call libusb_init() function ,the return code is -99, then
exit.
Post by Michael Plante
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more help
I can be.
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Michael Plante
2010-04-01 04:55:51 UTC
Permalink
Post by Michael Plante
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by Michael Plante
Post by kenichi_cui
exit.
Yes, I know; you said that in your first message. I asked if you:

1) enabled debug logging

2) traced INSIDE libusb_init.

Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more
help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context:
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.


----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
kenichi_cui
2010-04-01 05:07:23 UTC
Permalink
I do it.
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .

there is only library file, not source file. I think it is reasonable
Post by Michael Plante
Post by Michael Plante
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by Michael Plante
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Michael Plante
2010-04-01 05:13:39 UTC
Permalink
Post by Michael Plante
Post by kenichi_cui
I do it.
No...
Post by Michael Plante
Post by kenichi_cui
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .
there is only library file, not source file. I think it is reasonable
Reasonable or not, it's not helpful.

Have you enabled debug logging yet?

Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by kenichi_cui
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build
it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more
help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
-------------------------------------------------------------------------
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
--------------------------------------------------------------------------
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context:
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.


----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
kenichi_cui
2010-04-01 05:25:33 UTC
Permalink
Sorry , I don't know how to do it!
Woud you help me ?
By the way, I haven't installed the winusbcoinstall.dll, it is amazing that
only running "LSUSB.exe"
tool need modify INF , how to change the INF ? I have no dedicated usb
device.
Post by Michael Plante
Post by Michael Plante
Post by kenichi_cui
I do it.
No...
Post by Michael Plante
Post by kenichi_cui
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .
there is only library file, not source file. I think it is reasonable
Reasonable or not, it's not helpful.
Have you enabled debug logging yet?
Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by kenichi_cui
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
-------------------------------------------------------------------------
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
--------------------------------------------------------------------------
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104643.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
kenichi_cui
2010-04-01 05:36:41 UTC
Permalink
Pls check the gdb.txt

You can't do that when your target is `exec'
Starting program:
/cygdrive/e/workspace/LIBUSB/libusb-pbatard/examples/lsusb.exe
[New thread 3100.0xca4]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 3100.0xe88]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 3100.0xf4]
(no debugging symbols found)

Program exited with code 0235.


I think it is the log you mean
Post by Michael Plante
Post by Michael Plante
Post by kenichi_cui
I do it.
No...
Post by Michael Plante
Post by kenichi_cui
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .
there is only library file, not source file. I think it is reasonable
Reasonable or not, it's not helpful.
Have you enabled debug logging yet?
Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by kenichi_cui
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
-------------------------------------------------------------------------
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
--------------------------------------------------------------------------
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104693.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Michael Plante
2010-04-01 05:40:02 UTC
Permalink
Post by Michael Plante
Post by kenichi_cui
Sorry , I don't know how to do it!
You should have said that the first time (not the third time) I suggested
it.
Post by Michael Plante
Post by kenichi_cui
Woud you help me ?
Read "Debug message logging" under:

http://libusb.sourceforge.net/api-1.0/

There are two ways: either call libusb_set_debug() or export the
LIBUSB_DEBUG environment variable.

Also, you might need to set an option when you run ./configure , although it
seems to be set by default if you run ./autogen.sh instead of manually
running ./configure. You can tell if it's already set by looking for these
lines in config.h:

#define ENABLE_DEBUG_LOGGING 1
#define ENABLE_LOGGING 1

If they don't look like that, then you need to re-run configure. Even if
they do look like that, though, you still need to do one of the above two
things.
Post by Michael Plante
Post by kenichi_cui
By the way, I haven't installed the winusbcoinstall.dll, it is amazing
that
Post by Michael Plante
Post by kenichi_cui
only running "LSUSB.exe"
tool need modify INF , how to change the INF ? I have no dedicated usb
device.
I don't know.

Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I do it.
No...
Post by kenichi_cui
Post by kenichi_cui
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .
there is only library file, not source file. I think it is reasonable
Reasonable or not, it's not helpful.
Have you enabled debug logging yet?
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by kenichi_cui
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build
it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until
you
enable logging, OR trace through it in gdb, I don't know how much more
help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
------------------------------------------------------------------------
-
Post by Michael Plante
-
Post by kenichi_cui
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
Post by kenichi_cui
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
-------------------------------------------------------------------------
-
Post by Michael Plante
--
Post by kenichi_cui
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
-------------------------------------------------------------------------
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
--------------------------------------------------------------------------
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context:
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104643.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.


----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
kenichi_cui
2010-04-01 06:35:51 UTC
Permalink
Hi Micheal and xiaofen

After I install winusb.sys and winusb.dll, all things goes to fine.

so I can compile and run with LIBUSB1.0 under LINUX, Cygwin, Windows.

Thx for you help.
Post by Michael Plante
Post by Michael Plante
Post by kenichi_cui
Sorry , I don't know how to do it!
You should have said that the first time (not the third time) I suggested
it.
Post by Michael Plante
Post by kenichi_cui
Woud you help me ?
http://libusb.sourceforge.net/api-1.0/
There are two ways: either call libusb_set_debug() or export the
LIBUSB_DEBUG environment variable.
Also, you might need to set an option when you run ./configure , although it
seems to be set by default if you run ./autogen.sh instead of manually
running ./configure. You can tell if it's already set by looking for these
#define ENABLE_DEBUG_LOGGING 1
#define ENABLE_LOGGING 1
If they don't look like that, then you need to re-run configure. Even if
they do look like that, though, you still need to do one of the above two
things.
Post by Michael Plante
Post by kenichi_cui
By the way, I haven't installed the winusbcoinstall.dll, it is amazing
that
Post by Michael Plante
Post by kenichi_cui
only running "LSUSB.exe"
tool need modify INF , how to change the INF ? I have no dedicated usb
device.
I don't know.
Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I do it.
No...
Post by kenichi_cui
Post by kenichi_cui
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .
there is only library file, not source file. I think it is reasonable
Reasonable or not, it's not helpful.
Have you enabled debug logging yet?
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by kenichi_cui
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
------------------------------------------------------------------------
-
Post by Michael Plante
-
Post by kenichi_cui
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
Post by kenichi_cui
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
-------------------------------------------------------------------------
-
Post by Michael Plante
--
Post by kenichi_cui
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
-------------------------------------------------------------------------
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
--------------------------------------------------------------------------
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104643.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28105021.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-01 07:19:29 UTC
Permalink
Hi Micheal and Xiaofan
After I install winusb.sys and winusb.dll, all things goes to fine.
so I can compile and run with LIBUSB1.0 under LINUX, Cygwin, Windows.
Thx for you help.
Glad to hear that you solve the issue. The installation under XP is a bit
tricky because Windows XP does not have the winusb components
installed. Under Vista and Windows 7, it should be easier.
--
Xiaofan http://mcuee.blogspot.com
Peter Stuge
2010-04-01 07:26:41 UTC
Permalink
Post by Xiaofan Chen
Post by kenichi_cui
After I install winusb.sys and winusb.dll, all things goes to fine.
Glad to hear that you solve the issue. The installation under XP is
a bit tricky because Windows XP does not have the winusb components
installed. Under Vista and Windows 7, it should be easier.
I think the coinstaller library will also be a great help both for
application developers and their users.

It is still early in the life of Windows support, so a lot of things
can improve still, but have to get the merge done first. I'll try to
look into that over the weekend.


//Peter
kenichi_cui
2010-04-01 08:04:51 UTC
Permalink
Yes, it is confusing !

By the way, if I want to programme MFC appilication. I only include the lib
and dll under the
package named libusb_2010.03.30, right ? and the libusb-1.0 head file is
same as linux and
Cygwin, right ?
Post by Xiaofan Chen
Hi Micheal and Xiaofan
After I install winusb.sys and winusb.dll, all things goes to fine.
so I can compile and run with LIBUSB1.0 under LINUX, Cygwin, Windows.
Thx for you help.
Glad to hear that you solve the issue. The installation under XP is a bit
tricky because Windows XP does not have the winusb components
installed. Under Vista and Windows 7, it should be easier.
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28105628.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Peter Stuge
2010-04-01 08:09:59 UTC
Permalink
if I want to programme MFC appilication. I only include the lib and
dll under the package named libusb_2010.03.30, right ?
and the libusb-1.0 head file is same as linux and Cygwin, right ?
Yes. Please try it and report bugs. Please remember to include
complete information about any problems, so that we are actually
able to help you.


//Peter
Pete Batard
2010-04-01 12:01:14 UTC
Permalink
Apologies for jumping in late.

This was a bug during init where we unnecessarily returned an error for
any low level USB API (HID, WinUSB...) init issue. Thus, if WinUSB.dll
was unavailable, libusb_init would fail, but the thing is lsusb will
work perfectly fine even if WinUSB is unavailable, as well as
applications using HID.
Thus I removed this condition in r234. People trying to use WinUSB
without WinUSB.dll or driver should receive a more explicit error codes
later on in their application.

I also changed the error codes returned on DLL load and semaphore errors
to return something more appropriate that "other error" (r233).

These changes will need to be integrated in time for release, else we
might get a few requests like this one.

Kenichi, thanks a lot for reporting that issue!

Regards,

/Pete
Pete Batard
2010-04-01 12:08:40 UTC
Permalink
Oh, and I might just add, if you need to install WinUSB for any device,
and don't want to go through a manual installation, you can pick up the
latest setdrv.exe from:
http://libusb.org/wiki/windows_backend#DriverInstallation

I'll also have a GUI installer soon.

Regards,

/Pete
Xiaofan Chen
2010-04-01 12:31:39 UTC
Permalink
Post by Pete Batard
Oh, and I might just add, if you need to install WinUSB for any device,
and don't want to go through a manual installation, you can pick up the
http://libusb.org/wiki/windows_backend#DriverInstallation
I'll also have a GUI installer soon.
You mentioned the following in the website.
"The current version, which is compatible with both 32 and 64 bit Windows
platforms, can be downloaded below and will install a WinUSB driver for any
USB device that is currently plugged, and ** that doesn't have a driver **."

The ** part is a severe limitation. Just wondering if you can make the
program install the driver for a USB device regardless if there is an existing
driver (of course with a warning before proceed)? The console
program can probably add the option to specify the VID:PID.
--
Xiaofan http://mcuee.blogspot.com
Pete Batard
2010-04-01 13:09:10 UTC
Permalink
Post by Xiaofan Chen
The ** part is a severe limitation. Just wondering if you can make the
program install the driver for a USB device regardless if there is an existing
driver (of course with a warning before proceed)? The console
program can probably add the option to specify the VID:PID.
This is a limitation of the setdrv app, not the library, as I'm well
aware that this would be too limiting.

The library should already have all the code needed to install a non
present device (you just need to create a struct wdi_device_info with
the right parameters and feed that to wdi_create_inf /
wdi_install_driver) and I have tested that at least part of that code
works by unplugging the device after detection but before installation.
I haven't had a chance to test with a wdi_device_info created from
scratch yet however.

Even if you just have notions of C, you should be able to modify the
setdrv.c source and create a struct wdi_device_info to try this if you
want. The only unknown is whether I did things properly enough so that
everything works without providing hardware IDs (if not I'll fix it). At
any rate, you want to use w26 for any such test, as it fixes some
potential issues that you're likely to encounter otherwise.

I'll also add installation of an unplugged device to the GUI app, and
test it more properly then.

Regards,

/Pete
Pete Batard
2010-04-03 02:31:37 UTC
Permalink
I just tried the GUI. Pre-install an non-existing device does not
seem to work
Not suprising - I added the feature, but I still haven't tested it ;)
1) Create an Icon for the GUI.
Yup, that's already on my WDI TODO list
2) Add an option to clear the Info text window. Also add option
to right click and copy the content of the info window.
Good idea. Copy of info window is also on my TODO list (just look at the
WDI entries at http://libusb.org/wiki/windows_backend_activity_log)

As designing good GUIs is hard, any suggestions/mockups to improve the
current design is welcome, although this probably won't be my main focus
until after I have the other pieces done.

I'll try to test creation of a non existing device when I can. The GUI
app is still more alpha than beta now, so please bear this in mind.

Regards,

/Pete
Xiaofan Chen
2010-04-03 03:14:34 UTC
Permalink
Post by Pete Batard
Good idea. Copy of info window is also on my TODO list (just look at the
WDI entries at http://libusb.org/wiki/windows_backend_activity_log)
As designing good GUIs is hard, any suggestions/mockups to improve the
current design is welcome, although this probably won't be my main focus
until after I have the other pieces done.
I think a fancy GUI is not that necessary, just need to have the
basic functionality. For example, you mentioned this one:
- browser control for fold"er selection (this IS going to be a massive pain!)"

I do not think it is a big issue that user needs to input "C:\temp"
or "C:\test" in the directory. So if it is a pain, it can be dropped.

To me, the following additions will be good enough for the
first release. You can release the WDI code since it has
nothing to do with libusb. Then you can further improve the
GUI later.
1) Add the icon.
2) Add [About] button to show some information: copyright
and simple writeup about the usage.

The above two will make it ready to be released.

3) Enhance the bottom log windows (copy, clear, etc).
Post by Pete Batard
I'll try to test creation of a non existing device when I can. The GUI
app is still more alpha than beta now, so please bear this in mind.
No problem. I think the idea behind wdi branch is good. Originally
I had some doubts about the usefulness of this branch as a plain INF
wizard seemed to be good enough for me. Now I think it is useful.

BTW, I am using Vista 32bit.
--
Xiaofan http://mcuee.blogspot.com
Michael Plante
2010-04-01 05:41:05 UTC
Permalink
No, see the other email. If you don't have symbols, gdb is not useful here.

Michael



-----Original Message-----
From: kenichi_cui [mailto:***@hotmail.com]
Sent: Thursday, April 01, 2010 12:37 AM
To: libusb-***@lists.sourceforge.net
Subject: Re: [Libusb-devel] libusb-1.0 windows backend now in Cygwin
packages



Pls check the gdb.txt

You can't do that when your target is `exec'
Starting program:
/cygdrive/e/workspace/LIBUSB/libusb-pbatard/examples/lsusb.exe
[New thread 3100.0xca4]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 3100.0xe88]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 3100.0xf4]
(no debugging symbols found)

Program exited with code 0235.


I think it is the log you mean
Post by Michael Plante
Post by Michael Plante
Post by kenichi_cui
I do it.
No...
Post by Michael Plante
Post by kenichi_cui
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .
there is only library file, not source file. I think it is reasonable
Reasonable or not, it's not helpful.
Have you enabled debug logging yet?
Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by kenichi_cui
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build
it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until
you
enable logging, OR trace through it in gdb, I don't know how much more
help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
------------------------------------------------------------------------
-
Post by Michael Plante
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
Post by Michael Plante
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
-------------------------------------------------------------------------
-
Post by Michael Plante
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
-------------------------------------------------------------------------
-
Post by Michael Plante
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
--------------------------------------------------------------------------
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context:
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104693.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.


----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
kenichi_cui
2010-04-01 06:15:11 UTC
Permalink
I add libusb_set_debug() function at main().

after run, it show "segment fault (core dump)"

I think the root cause is that I don't install WINUSB.sys, and WINUSB.dll

"LSUSB.exe" doesn't communicate with any usb device which INF desire.

if this, how to setup next ?
Post by Michael Plante
No, see the other email. If you don't have symbols, gdb is not useful here.
Michael
-----Original Message-----
Sent: Thursday, April 01, 2010 12:37 AM
Subject: Re: [Libusb-devel] libusb-1.0 windows backend now in Cygwin
packages
Pls check the gdb.txt
You can't do that when your target is `exec'
/cygdrive/e/workspace/LIBUSB/libusb-pbatard/examples/lsusb.exe
[New thread 3100.0xca4]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 3100.0xe88]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 3100.0xf4]
(no debugging symbols found)
Program exited with code 0235.
I think it is the log you mean
Post by Michael Plante
Post by Michael Plante
Post by kenichi_cui
I do it.
No...
Post by Michael Plante
Post by kenichi_cui
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .
there is only library file, not source file. I think it is reasonable
Reasonable or not, it's not helpful.
Have you enabled debug logging yet?
Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is -99,
then
Post by kenichi_cui
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until you
enable logging, OR trace through it in gdb, I don't know how much more help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device installed,
even though the device is not usually connected to my computer.
Michael
------------------------------------------------------------------------
-
Post by Michael Plante
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
Post by Michael Plante
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
-------------------------------------------------------------------------
-
Post by Michael Plante
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
-------------------------------------------------------------------------
-
Post by Michael Plante
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
--------------------------------------------------------------------------
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104693.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28104896.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Michael Plante
2010-04-01 06:26:59 UTC
Permalink
Post by Michael Plante
Post by kenichi_cui
I add libusb_set_debug() function at main().
after run, it show "segment fault (core dump)"
Hrm, you can't call that with the default context (NULL) if libusb_init has
never run, it seems (the docs might need to be updated about that). Your
only option might be just to set the environment variable INSTEAD of calling
libusb_set_debug().
Post by Michael Plante
Post by kenichi_cui
I think the root cause is that I don't install WINUSB.sys, and WINUSB.dll
How do you know this all of a sudden? That is not supposed to cause a
segfault, regardless of whether libusb_init works.



Michael
Post by Michael Plante
No, see the other email. If you don't have symbols, gdb is not useful
here.
Michael
-----Original Message-----
Sent: Thursday, April 01, 2010 12:37 AM
Subject: Re: [Libusb-devel] libusb-1.0 windows backend now in Cygwin
packages
Pls check the gdb.txt
You can't do that when your target is `exec'
/cygdrive/e/workspace/LIBUSB/libusb-pbatard/examples/lsusb.exe
[New thread 3100.0xca4]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 3100.0xe88]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 3100.0xf4]
(no debugging symbols found)
Program exited with code 0235.
I think it is the log you mean
Post by kenichi_cui
Post by Michael Plante
Post by kenichi_cui
I do it.
No...
Post by Michael Plante
Post by kenichi_cui
compile with "-g" and run it with GDB, type "step" to step into the
libusb_init() function.
but cpu cann't step into .
there is only library file, not source file. I think it is reasonable
Reasonable or not, it's not helpful.
Have you enabled debug logging yet?
Michael
Post by Michael Plante
Post by kenichi_cui
Post by kenichi_cui
I traced it, after call libusb_init() function ,the return code is
-99,
then
Post by kenichi_cui
Post by kenichi_cui
exit.
1) enabled debug logging
2) traced INSIDE libusb_init.
Michael
Post by kenichi_cui
Post by kenichi_cui
Post by kenichi_cui
I download the latest busb-pbatard-66192f7b43985dbb4f565.tar.gz,build
it
successfully.
and also compile "lsusb.c" under example , but after run "lsusb.exe",
there
Post by kenichi_cui
Post by kenichi_cui
is no message show.
Did you enable debug logging, like I said in my first message? Until
you
enable logging, OR trace through it in gdb, I don't know how much more
help
I can be.
Post by kenichi_cui
Post by kenichi_cui
my computer OS is XPSP2, I cann't find WINUSB.SYS under driver
folder.
How
Post by kenichi_cui
Post by kenichi_cui
should I do now ?
upgrade to SP3?
I don't think it will help here.
Post by kenichi_cui
Post by kenichi_cui
I plan to run "lsusb.exe" normally that doesn't desire any own usb
device,
Post by kenichi_cui
Post by kenichi_cui
so it is not necessary
to modify INF and install ? right ?
Pete would know. I've only tried it with at least one device
installed,
even though the device is not usually connected to my computer.
Michael
-----------------------------------------------------------------------
-
Post by Michael Plante
-
Post by kenichi_cui
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
Post by kenichi_cui
Post by Michael Plante
077699p28104503.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
------------------------------------------------------------------------
-
Post by Michael Plante
-
Post by kenichi_cui
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
------------------------------------------------------------------------
-
Post by Michael Plante
-
Post by kenichi_cui
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
Post by kenichi_cui
077699p28104563.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
-------------------------------------------------------------------------
-
Post by Michael Plante
--
Post by kenichi_cui
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
-------------------------------------------------------------------------
-
Post by Michael Plante
----
Post by kenichi_cui
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
Post by Michael Plante
077699p28104693.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
--------------------------------------------------------------------------
--
Post by Michael Plante
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--------------------------------------------------------------------------
----
Post by Michael Plante
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context:
http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28
077699p28104896.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.


----------------------------------------------------------------------------
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Michael Plante
2010-04-01 13:28:27 UTC
Permalink
Post by Pete Batard
This was a bug during init where we unnecessarily returned an error for
any low level USB API (HID, WinUSB...) init issue. Thus, if WinUSB.dll
was unavailable, libusb_init would fail, but the thing is lsusb will
work perfectly fine even if WinUSB is unavailable, as well as
applications using HID.
Thus I removed this condition in r234. People trying to use WinUSB
without WinUSB.dll or driver should receive a more explicit error codes
later on in their application.
I also changed the error codes returned on DLL load and semaphore errors
to return something more appropriate that "other error" (r233).
These changes will need to be integrated in time for release, else we
might get a few requests like this one.
Ok, I'll try to get those changes in there sometime today, hopefully. It
looks like it just touches windows_usb.*, so it should be easy on my end.

Are you basically saying that the new bd.cmd and bm.sh should be handled the
same way as the 2008 projects?

I think we can discuss the libusb_set_debug problem some other time, as it
seems to have been a pre-existing problem in 1.0.6.

Michael
Xiaofan Chen
2010-04-01 13:43:36 UTC
Permalink
Post by Michael Plante
I think we can discuss the libusb_set_debug problem some other time, as it
seems to have been a pre-existing problem in 1.0.6.
As far as I remember, it never really works as expected
since its very first release under Linux.
--
Xiaofan http://mcuee.blogspot.com
Xiaofan Chen
2010-04-01 13:50:32 UTC
Permalink
Post by Xiaofan Chen
Post by Michael Plante
I think we can discuss the libusb_set_debug problem some other time, as it
seems to have been a pre-existing problem in 1.0.6.
As far as I remember, it never really works as expected
since its very first release under Linux.
But maybe I am talking about different things here.

Daniel has the following answer. Apparently libusb_set_debug() in 1.0
is quite different from the old usb_set_debug() in 0.1.
Post by Xiaofan Chen
Post by Michael Plante
He is talking about 1.0. Last time I tested I got the same result as
Chuck. libusb_set_debug() does not seem to work without
--enable-debug-log.
But I will test it again. Take note usb_set_debug works under libusb 0.1.
This is probably one of the most well documented functions that we have ;)
libusb_set_debug() enables messages that tell you when something is going
wrong or when you made a mistake. It allows you to enable error, warning and
informational messages which help you debug your program. But because you're
writing good programs and libusb doesn't have too many bugs, you aren't
going to see many messages.
If you additionally want verbose debug messages then you have to specify
that at libusb compile time, in which case libusb_set_debug() does nothing -
you will get all error/warning/info/debug messages, all of the time.
Daniel
--
Xiaofan http://mcuee.blogspot.com
Pete Batard
2010-04-01 14:29:18 UTC
Permalink
Post by Michael Plante
Ok, I'll try to get those changes in there sometime today, hopefully. It
looks like it just touches windows_usb.*, so it should be easy on my end.
Great. thanks.
Post by Michael Plante
Are you basically saying that the new bd.cmd and bm.sh should be handled the
same way as the 2008 projects?
Yup. They're tailored scripts to produce the binary archives on my
machine, and since I didn't want to have to copy them around all the
time, I just added them to the rep.

Regards,

/Pete
Michael Plante
2010-04-01 13:53:44 UTC
Permalink
Post by Xiaofan Chen
Post by Michael Plante
I think we can discuss the libusb_set_debug problem some other time, as
it
Post by Xiaofan Chen
Post by Michael Plante
seems to have been a pre-existing problem in 1.0.6.
As far as I remember, it never really works as expected
since its very first release under Linux.
Then maybe it's no big deal. I suspect (haven't tried) that if you call
libusb_set_debug on the default context and libusb_init has never progressed
to the point of initializing the default context (such as if libusb_init has
never been called), libusb_set_debug will dereference a NULL pointer. This
problem was pre-existing, and I'd rather not clutter windows integration
with a patch to it, since we don't even know if this is a code fix or a doc
fix. The trouble with a code fix is that it'd silently fail...

Michael
Michael Plante
2010-04-01 13:58:56 UTC
Permalink
Post by Michael Plante
On Thu, Apr 1, 2010 at 9:28 PM, Michael Plante
Post by Michael Plante
I think we can discuss the libusb_set_debug problem some other time,
as it
Post by Michael Plante
Post by Michael Plante
seems to have been a pre-existing problem in 1.0.6.
As far as I remember, it never really works as expected
since its very first release under Linux.
Then maybe it's no big deal. I suspect (haven't tried) that if you call
libusb_set_debug
Post by Michael Plante
on the default context and libusb_init has never progressed to the point
of initializing
Post by Michael Plante
the default context (such as if libusb_init has never been called),
libusb_set_debug will
Post by Michael Plante
dereference a NULL pointer. This problem was pre-existing, and I'd
rather not clutter
Post by Michael Plante
windows integration with a patch to it, since we don't even know if this
is a code fix
Post by Michael Plante
or a doc fix. The trouble with a code fix is that it'd silently fail...
The other option is just never to use a default context if you want this to
work. I never really did like the contortions we have to go through to
support the "default context" idea. But it's a bit late for changing that,
I suppose.

Michael
Michael Plante
2010-04-03 03:24:30 UTC
Permalink
Post by Xiaofan Chen
- browser control for fold"er selection (this IS going to be a massive
pain!)"

I haven't really been paying attention to this branch. However, if it's
difficult, and if you can't find a prepackaged folder browser (I suspect
there is one, because it seems to have a standard look and feel between
several programs), then you might just have the user pick a file name
instead of a folder name using the GetSaveFileName() "common dialog", and
then strip the path with something like PathRemoveFileSpec(), if needed.
Other useful functions in that vein might be PathIsRelative(),
GetFullPathName(), PathAddBackslash(), etc...

Just my 2 cents.

Michael
Pete Batard
2010-04-03 19:07:48 UTC
Permalink
Post by Michael Plante
if you can't find a prepackaged folder browser (I suspect
there is one, because it seems to have a standard look and feel between
several programs),
Well, that's the problem. There isn't a basic drag and drop control for
browse unless you go .NET, which we can't do (MinGW/cygwin support),
while on the other hand, in the 30 basic non .NET controls which VS2008
most generously provides, you get such useful features as an "IP
address" control, which, as everybody knows, is used a lot more
regularly than anything that has to do with browsing for a folder or
file... Thus, you have to revert to implementing your own browse button,
which wouldn't be that bad, if Microsoft hadn't completely ignored the
fact that, sometimes, you just want your users to point to a folder,
rather than a file, so, as you have pointed out, you have to work around
whatever implementation they give you for open/save. But more
importantly, Microsoft also indicate that they superseded the
GetOpenFileName/GetSaveFileName with a completely new method for
filesystem browse on Vista and later (IFileDialog / Common Dialog
Interface), that must be implemented as a class, Therefore, we would
need to switch to C++, just because of that browse button, while there's
a good chance that the new control still probably isn't that
straightforward to use for simple folder selection.

And that is basically why I said I'd be a pain...

Now, I think, if we can solve the pointing-to-a-folder-instead-of-a-file
issue, we can probably get away with using
GetOpenFileName/GetSaveFileName (the dialog looks 7ish enough when used
on 7) but proper consideration needs to be applied when doing an UI,
especially if you're showcasing a library that you would like people to
use, because, no mater of how good you think your library might be, that
GUI application is the first thing most people will see => It needs to
have the right look and feel, and be as intuitive as possible. Asking
users to provide a fake file when they should just point to a folder or
create one is not.

Anyway, please feel free to post your comments with regards to the GUI
app, but bear in mind that this is far from being a finished product at
this stage, and that I am not planning to cut corners and advertise for
it until I am 100% satisfied (which might take a while).

The library also isn't finished, as I'm using the GUI app as a means to
figure out how I should implement the missing pieces as well, like
logging callback, status reports, etc.

Regards,

/Pete
Michael Plante
2010-04-03 20:11:24 UTC
Permalink
Post by Pete Batard
Post by Michael Plante
if you can't find a prepackaged folder browser (I suspect
there is one, because it seems to have a standard look and feel between
several programs),
Well, that's the problem. There isn't a basic drag and drop control for
browse unless you go .NET,
I wasn't even considering .NET, which I obviously have no experience with,
given the version of Visual Studio I use (cough). And I'm not losing sleep
over not having .NET... In light of that, you should be aware that this
"standard look and feel" predates .NET. E.g., there's one built into Device
Manager when you browse for where your INF files are (it doesn't let you
select which file to use, just which directory) in 2k/XP. I don't doubt it
looks different in newer versions of Windows, so I attached a screenshot.
You may be able to get to it through some COM interface, but no guarantees,
and I agree it would be a pain. I think it's important to get something
working first, and if that means a command line tool to test your library
first, why not?
Post by Pete Batard
(MinGW/cygwin support)
I think you only need to support one freeware environment for the GUI. Only
*libraries* really need to work with multiple environments. The reason
libraries need it is because the user probably already chose an environment
to write their *app* in. So your wdi library (or whatever you're calling
it) will need to support all these environments, but the GUI does not. If I
were doing this, I'd just get the GUI working with the DDK (and maybe VS, if
that makes it easier for you to debug). Nobody's going to link to the app
itself (not that that kind of thing is unheard of, such as plugin
architectures, but in this case...).
Post by Pete Batard
completely new method for
filesystem browse on Vista and later (IFileDialog / Common Dialog
Interface),
Vista? Yawn. So what if they superseded it? Are they saying the common
dialogs are going to stop working?
Post by Pete Batard
that must be implemented as a class,
I'm not 100% sure that's true (would "interface" be a keyword in C++ only if
that were true?), but unless that IFileDialog solves your problem, it's
moot. Frankly, I think writing a GUI in plain C was less than desirable,
but since I'm not really helping, have fun either way. If C++ is your
sticking point, I'd seriously consider the possibility that the quoted
statement may not be correct.
Post by Pete Batard
And that is basically why I said I'd be a pain...
Yes, I would expect COM to be a pain, so be sure it does what you want. You
can probably find something on codeproject.com that shows what these
interfaces can do (though probably not with the right license, so just treat
them as demos, not source code).
Post by Pete Batard
the dialog looks 7ish enough when used on 7
Oh, God forbid it might actually have square corners instead of glossy round
ones. The device might not work (for 5 year olds), or someone might get cut
on it and sue. :-) I would go one step further and say that trying to
emulate Win7 on a non-Win7 environment is a huge mistake; just use the
defaults for whatever OS the user is running (without even trying), or
you'll have tons of subtle bugs. I use Protel/DXP for PCB layouts, and they
try to emulate the XP Luna interface on all OSes, including 2k, and I
believe that has caused crashes and weird display artifacts. Fortunately, I
can (and did) disable it in the options.
Post by Pete Batard
showcasing a library that you would like people to
use, because, no mater of how good you think your library might be, that
GUI application is the first thing most people will see => It needs to
have the right look and feel
I think "intuitive" is important, but "look and feel" is less so. I'm not
saying go wild with skinning like various media players do (though those do
tend to be intuitive, in SPITE of the variation), but, rather, users are
going to expect "OK/Cancel" or "Close" or "Prev/Next/Finish" or
"File,Edit,View,Tools,Window,Help,etc." to do the standard stuff, and that
you're not going to override "TAB" or "ESC" or "ENTER" or "ALT+F4" in screwy
ways in your dialog. How it looks is less important.

Are you expecting YOUR app to be redistributed with apps that go to end
users, or are you expecting the developer to intercept this at some point?
If you're expecting your .EXE to go untouched to end users, the end user
bought it for the hardware, not the driver installer, and a little bit of
mistaken look and feel is no big deal (hell, I occasionally find installers
that launch subsidiary programs that look like they belong in windows 3[.1],
with the white background instead of the grey bevel; so what). If the
intermediate devs who distribute it don't think their product will sell for
this reason, they have the [L]GPL source code. If, on the other hand,
you're only expecting developers to use it, they've probably been through
several versions of Windows, and will tolerate anything that would've looked
appropriate in some version they used.

Either way, I'd focus on usability and logical workflow, not "ooh shiny".
Line your controls up, space things evenly, and judiciously use group boxes,
but don't worry too much otherwise. I've made these comments without
actually looking at a rendering of the dialog (I glanced briefly at the RC
file in gitweb only), so take it with a grain of salt. By the sound of it,
I think you're making it too difficult on yourself, FWIW.
Post by Pete Batard
Asking
users to provide a fake file when they should just point to a folder or
create one is not.
Agreed (but given the choices...). I want to say one CD-ripping program
(might have been a windows front-end for LAME) I've seen did something like
this, just to pick a folder where all the tracks would go, which is where I
got the idea. The default filename that showed up in the box (can't recall
if it was via the "filter" or not) said something like "Filename will be
ignored". Anyway, for a minimalist start, you might start with Xiaofan's
idea, and consider checking the folder exists when input focus leaves the
edit box, or something like that.

But, regardless, I made the suggestion without trying to actually use your
program, so I wasn't sure if you were planning on opening/saving a file
anyway (I'm having difficulty imagining another use case, but I could've
been wrong). If you're, say, planning on saving multiple files in the same
directory, you could still prompt them to save ONE of the files there, and
then just automatically stick the others there, too.

And, ultimately, regardless of how I worded this, these are just
suggestions, but I think taking them will make your life easier...

Regards,
Michael
Xiaofan Chen
2010-04-03 23:48:34 UTC
Permalink
Post by Pete Batard
(MinGW/cygwin support)
I think you only need to support one freeware environment for the GUI.  Only
*libraries* really need to work with multiple environments.
Agreed. The installer is only for Windows, you do not need cross-platform
support, and support for MinGW/Cygwin is optional.

I'd venture to say go to DotNet and VS2008. It is much easier to
use DotNet for the GUI if you want to develop a nice GUI program.
 If I were doing this, I'd just get the GUI working with the DDK (and maybe VS, if
that makes it easier for you to debug).
That would be good as well if DotNet route is shot down.

Or use QT if MinGW/Cygwin support is desired.
--
Xiaofan http://mcuee.blogspot.com
Pete Batard
2010-04-04 02:00:59 UTC
Permalink
Post by Michael Plante
In light of that, you should be aware that this
"standard look and feel" predates .NET. E.g., there's one built into Device
Manager when you browse for where your INF files are (it doesn't let you
select which file to use, just which directory) in 2k/XP.
Well, that's the problem. I was expecting a simple drag and drop control
that would use whatever is the browsing default for whatever Windows
version users are running, but there's no such thing in the MS supplied
development environments right now. And my current understanding is that
there is such a hook in the shell DLL, only it's not exposed.
Post by Michael Plante
I think it's important to get something
working first, and if that means a command line tool to test your library
first, why not?
The setdrv commandline tool is pretty much already done, but is a bit
limited, and it didn't really tell me how I should implement
asynchronous messaging back to a GUI app and other stuff. The GUI
improved version of the same commandline tool is what we are discussing
here.
Post by Michael Plante
Post by Pete Batard
(MinGW/cygwin support)
I think you only need to support one freeware environment for the GUI.
When there's no reason to limit ourselves to a specific environment, why
do so? I'm not really keen on adding artificial limits unless there's
valid ground for it, and I don't consider a simple browse issue as
reasonable enough to introduce a limitation.
Post by Michael Plante
So your wdi library (or whatever you're calling
it) will need to support all these environments, but the GUI does not.
It is possible to write perfectly good Windows GUI applications without
using Microsoft tools (I was actually surprised at how easy MinGW/cygwin
were able to compile the GUI app), and there's no telling how Microsoft
is going to cripple the DDK in the future if they feel that it hurts
their VS sales. I doubt they will, but I tend to sleep better when I
have some escape routes planned from proprietary software, should it
ever decide to go in a direction I don't like. A bit like how you felt
that later versions of MSVC6 didn't really cover your needs... Wouldn't
it have been nice, if you had had the option to migrate your MSVC6
projects away from VS, onto open source software then?
Post by Michael Plante
Vista? Yawn. So what if they superseded it? Are they saying the common
dialogs are going to stop working?
Doesn't look like it. But they strongly seem to invite developers not to
use the old controls on these platforms, and I usually try to follow
MSDN's advice where applicable.
Post by Michael Plante
Post by Pete Batard
that must be implemented as a class,
I'm not 100% sure that's true (would "interface" be a keyword in C++ only if
that were true?),
I had tried before my last post. Unless I missed something, you won't
get very far trying to use IFileDialog in C.
Post by Michael Plante
but unless that IFileDialog solves your problem, it's moot.
Yeah. I'd use IFileDialog on Vista and later, simply because that's what
MSDN advises, if it was simple to do, because you'd expect a showcase
app to conform to MS's advice (and also, because I like to see how new
shiny stuff works). But it looks pretty moot for the folder issue.
Post by Michael Plante
Frankly, I think writing a GUI in plain C was less than desirable,
Lowest common denominator. The GUI app is very basic: a few dropdowns,
checkboxes, fields, couple buttons plus a folder control, and that's
really it. There's probably the odd GUI developer out there that wants
to use libwdi and C, and since there's not much need for C++ in the GUI
app in the first place, why not stick with good old C. If it was
anything complex GUI wise, C++ would be the right choice, but, despite
what I would call Microsoft's shortcomings in easing the task of
developers, it IS a very simple and basic GUI application.
Post by Michael Plante
Post by Pete Batard
the dialog looks 7ish enough when used on 7
Oh, God forbid it might actually have square corners instead of glossy round
ones. The device might not work (for 5 year olds), or someone might get cut
on it and sue. :-)
Aha, but a 5 year olds might precisely be the ones installing USB
drivers with the GUI app. And to answer one of your further question
already, yes I do expect the GUI app to be distributed as is, and
ultimately be used by all kind of Windows users (it's a very simple app,
so why not?), including very clueless ones, or people focusing on the
shiny aspect. This is quite different from a library part where we only
need to bother about developers, not end users.
Post by Michael Plante
I would go one step further and say that trying to
emulate Win7 on a non-Win7 environment is a huge mistake;
I'm not trying to do that. I expect the app should look 7ish on 7,
Vista-ish on Vista, and XP-ish on XP if I use standard MS provided
controls, and follow the MSDN guidelines. Thus I expected to be able to
slap a standard "browse" control on my app to do just that, as it looked
like a very reasonable expectation to have at the time. Now, as this
does not appear to be achievable by default, I'm trying to see what I
can do to meet my original expectation, rather than compromise.
Post by Michael Plante
I think "intuitive" is important, but "look and feel" is less so.
Well, currently I have a problem with the "look and feel" promised by
Visual Studio, and this is what I have in mind when I talk about look
and feel. If you look at the 2 screenshots attached (heavily compressed
because of mailing list restrictions), having a app produced with VS2008
that looks like something straight out Windows 3.1 on Windows 7 is also
not something I'm ready to compromise with either (I tried various
options so far, but haven't found the right one). Where on earth are the
3D controls promised by VS 2008 in its UI designer tool?

When an app with default controls from the latest Visual Studio runs on
the latest version of Windows, I do expect it to look native, and that's
the look an feel that I am after, nothing more.
Post by Michael Plante
Are you expecting YOUR app to be redistributed with apps that go to end
users
Yes. A user can pretty much just launch the app, plug in their USB
device, then click the big "Install" button and tada!, they can use
their previously driverless device with a libusb (or native WinUSB) app.
And, since that single GUI exe works on all versions of Windows, from XP
to 7, including 64 bit, I very much see it being used as is.
I'm actually planning to release up to date versions of the binary GUI
app myself as a matter of fact, be it only to help with people who want
to try libusb and don't want to be bothered with the Windows driver
installation part (should help with the mailing list too).
Post by Michael Plante
If you're expecting your .EXE to go untouched to end users, the end user
bought it for the hardware, not the driver installer, and a little bit of
mistaken look and feel is no big deal (hell, I occasionally find installers
that launch subsidiary programs that look like they belong in windows 3[.1],
with the white background instead of the grey bevel; so what).
I don't like these kind of compromises. It's not because you deal with
hardware that you should mistreat UIs (or end users for that matter),
period. I mean, how much are you willing to trust a hardware
manufacturer if they can't even get a simple UI right? We're not writing
Winamp here, just a plain decent driver installer with a GUI, and it
shouldn't be that hard to make it look good. Now the license is another
matter altogether, but if having a good LGPL GUI based app in the first
place can encourage others to improve on it and publish their
improvements, I call this win-win.
Post by Michael Plante
Agreed (but given the choices...). I want to say one CD-ripping program
(might have been a windows front-end for LAME) I've seen did something like
this,
Thanks for the pointer. I'll definitely look at it. They probably hook
directly into the DLL or something.

Again, the layout you currently see is was I crafted in a very short
time, and I am very well aware that it needs to be improved on.

I wasn't really ready to discuss the GUI app (or even libwdi) until I
had something that I felt was presentable, so right now, I kinda feel
like I got my hand forced into having to handle something that's very
much unfinished, and therefore bound to receive a lot criticism.

Finally, I do hope that I'm still free to use my development time as I
see fit though, even if it's seemingly spent looking at the "ooh shiny!"
stuff, as I do enjoy working out these minute UI aspects, and acquire
some new knowledge in the process (which is pretty much the same reason
I went into libusb in the first place). Still, I'm obviously not
planning to spend all my time on that either.

Regards,

/Pete
Xiaofan Chen
2010-04-04 10:42:25 UTC
Permalink
Post by Pete Batard
Well, that's the problem. I was expecting a simple drag and drop control
that would use whatever is the browsing default for whatever Windows version
users are running, but there's no such thing in the MS supplied development
environments right now. And my current understanding is that there is such a
hook in the shell DLL, only it's not exposed.
Michael Plante
2010-04-03 21:08:51 UTC
Permalink
Post by Michael Plante
Post by Pete Batard
Asking
users to provide a fake file when they should just point to a folder
or
Post by Michael Plante
Post by Pete Batard
create one is not.
Agreed (but given the choices...). I want to say one CD-ripping program
(might have been a windows front-end for LAME) I've seen did something
like this, just to pick a folder where all the tracks would go, which is
where I got the idea.
FWIW, it was "exact audio copy". Screenshot is attached (degraded quality
to meet mailing list size requirements).

Regards,
Michael
Michael Plante
2010-04-03 23:59:12 UTC
Permalink
Post by Xiaofan Chen
I'd venture to say go to DotNet and VS2008. It is much easier to
use DotNet for the GUI if you want to develop a nice GUI program.
Probably easier than plain Win32 API (though, if this utility is at all
useful to Graeme, there may be a .NET version limitation on win2k...I seem
to recall no .NET 3.0, but I could be wrong). As long as we're throwing
technologies out there, though, I'd throw MFC into the mix. That said,
changing platforms isn't something I expect to happen on a whim. Without
knowing the complexity of the target program, Pete may be able to just "get
it done" as it currently is, or may need something more powerful to ease the
burden.

Michael
Michael Plante
2010-04-04 03:22:43 UTC
Permalink
Post by Pete Batard
built into Device Manager
Well, that's the problem. I was expecting a simple drag and drop control
that would use whatever is the browsing default for whatever Windows
version users are running, but there's no such thing in the MS supplied
development environments right now. And my current understanding is that
there is such a hook in the shell DLL, only it's not exposed.
That stinks. Though a separate dialog is as good or better than a control,
it sounds like that's not accessible, then.
Post by Pete Batard
The setdrv commandline tool is pretty much already done, but is a bit
limited,
Ah, well, I don't remember hearing about that one on the list, either.
Post by Pete Batard
Post by Pete Batard
(MinGW/cygwin support)
I think you only need to support one freeware environment for the GUI.
When there's no reason to limit ourselves to a specific environment, why
do so? I'm not really keen on adding artificial limits unless there's
valid ground for it, and I don't consider a simple browse issue as
reasonable enough to introduce a limitation.
I wasn't mentioning it solely for the browse issue. I said it because I
know it's a pain to test in each environment. If you prefer to pick a
different environment, great, but my point was just to pick one, not so much
which one to pick.
Post by Pete Batard
It is possible to write perfectly good Windows GUI applications without
using Microsoft tools (I was actually surprised at how easy MinGW/cygwin
were able to compile the GUI app),
Oh sure. But that's just compiling it. Which is why I suggested it might
be a good idea to focus on VS support for development, and something else
(perhaps DDK) for a freeware build environment.
Post by Pete Batard
no telling how Microsoft is going to cripple the DDK in the future
Good point.
Post by Pete Batard
A bit like how you felt
that later versions of MSVC6 didn't really cover your needs... Wouldn't
it have been nice, if you had had the option to migrate your MSVC6
projects away from VS, onto open source software then?
To elaborate, two people brought the issue up once each on a gcc mailing
list about a decade ago, with just about no response whatsoever. (It is a
feature that needs to go in both the compiler AND the environment to
actually work, and the compiler work would logically come chronologically
first.) This is perhaps related to the apparent attitude in F/OSS that IDEs
are for the weak. However, if I want to be able to maintain as large a
piece of software as possible while still keeping relevant details close at
hand or in my head, this particular feature likely improves that ability by
at least an order of magnitude. So even then, most IDEs lack the same
appeal. So yes, it would have been nice, but it just wasn't there, and I
don't see it showing up in the near future anywhere else.

So I see your point. If you want to support multiple compilers, great, but
let me soften it to say that the most compelling reasons are absent,
compared to the libraries, rather than simplistically saying there's no
reason.
Post by Pete Batard
Doesn't look like it. But they strongly seem to invite developers not to
use the old controls on these platforms, and I usually try to follow
MSDN's advice where applicable.
Common dialog, not control (two different things). And an insanely-high
percentage of all Windows software would break if they did that (with either
the common dialogs or certain common controls).
Post by Pete Batard
Frankly, I think writing a GUI in plain C was less than desirable,
Lowest common denominator.
It's been a long time since I've seen a C-only compiler. Or are you trying
to say that you wish to cater to developers who only know one or the other?
If so, you have to make a largely-arbitrary choice. Anyway, you've made the
choice and I see no problem sticking with it.
Post by Pete Batard
The GUI app is very basic [...details...]
why not stick with good old C.
Agreed, then C shouldn't be hard to do it in, and still keep it
maintainable. I didn't really know the scope of the program, but the
screenshots help some. If you don't expect to add much more to that dialog,
then I'd just keep doing what you're doing, rather than discard existing
work.
Post by Pete Batard
There's probably the odd GUI developer out there that wants
to use libwdi and C,
I think this is confusing libwdi with the GUI, unless I misunderstand the
terminology. There is no issue using a C library (libwdi) in a C++ app
(GUI). Where am I going wrong?
Post by Pete Batard
Post by Pete Batard
the dialog looks 7ish enough when used on 7
Oh, God forbid it might actually have square corners instead of glossy
round
Post by Pete Batard
ones. The device might not work (for 5 year olds), or someone might
get cut
Post by Pete Batard
on it and sue. :-)
Aha, but a 5 year olds might precisely be the ones installing USB
drivers with the GUI app.
And know what a VID and PID and MI are? Here goes... (I hope the following
doesn't sound too harsh)
Post by Pete Batard
And to answer one of your further question
already, yes I do expect the GUI app to be distributed as is,
I find that quite surprising, as the screenshots don't resemble anything
I've seen in a commercial installer. The very fact that it *requires* the
user to do something other than click "install" means that few end-users
will figure it out. The few that can will certainly appreciate having it,
mind you, much like they appreciate the *option* of doing a custom install,
but *option* is key.
Post by Pete Batard
(it's a very simple app, so why not?)
Simple for you to write, or simple for some random person to know why they
even need, much less how to use? It will probably do what it does quite
well, but I am again surprised you expect anyone to distribute this app
as-is.
Post by Pete Batard
including very clueless ones, or people focusing on the
shiny aspect.
Who panic and click any random button to try to make a box go away, without
reading it (Raymond Chen rants about this pretty frequently in his book,
based on his experience with customer testing at MS). The average user base
of Windows (or Mac) are not what you make them out to be.
Post by Pete Batard
Where on earth are the
3D controls promised by VS 2008 in its UI designer tool?
Dunno, that's odd. How did you get the "promise" one? Is that what the
resource editor shows you, or did you photoshop it? If the former, you
might need to add some sort of code to enable stuff (generate a throwaway
appwizard program to see if you missed any initialization).
Post by Pete Batard
When an app with default controls from the latest Visual Studio runs on
the latest version of Windows, I do expect it to look native, and that's
the look an feel that I am after, nothing more.
Agreed, but that always seemed to be the default, which is why I was puzzled
about your comment about "looking Win7 enough" in the previous email.
Post by Pete Batard
A user can pretty much just launch the app, plug in their USB
device, then click the big "Install" button and tada!, they can use
their previously driverless device with a libusb (or native WinUSB) app.
And do what? Use a GUI version of xusb after that? I mean, is this for
some generic device, or for...? I guess what I'm getting at is I would have
expected that, for an end-user, this would happen in the context of some
other program, and that that program would either launch your installer with
some sort of defaults, if not outright no choice, or else that the other
program would simply link to the libwdi library with no special UI at all.
Post by Pete Batard
And, since that single GUI exe works on all versions of Windows, from XP
to 7, including 64 bit, I very much see it being used as is.
I can write a hello world that probably works on all those platforms, but
I'm not sure an end-user is going to know any more what to do with that
(probably will click "X" in both cases). Sorry, but I really do think the
quoted text is a flimsy enough reason to deserve that.
Post by Pete Batard
I'm actually planning to release up to date versions of the binary GUI
app myself as a matter of fact, be it only to help with people who want
to try libusb and don't want to be bothered with the Windows driver
installation part (should help with the mailing list too).
And I think it's useful for that! But those are either developers, or
people who think somewhat like one.
Post by Pete Batard
I don't like these kind of compromises. It's not because you deal with
hardware that you should mistreat UIs (or end users for that matter),
It's not a matter of mistreatment so much as putting form ahead of function.
But I don't see the point of debating it now that I can't even figure out
how this will be used. And I hope "you deal with hardware" is an abstract
"you", rather than extrapolation from the example program I mentioned.
Post by Pete Batard
can't even get a simple UI right?
Right, or pretty? I'd consider not getting it right having it crash, or do
any number of *functional* things wrong (like incorrectly validating input,
or locking you to a box you don't want to be in until you *make* it valid).
Those are (or can be) UI blunders, but they have nothing to do with the
look. If it's not pretty (but is intuitive), I'd trust them all the same.
If it breaks, I would not trust them much, but that doesn't seem to be
what's at issue here. If it's ugly because they tried to make it look
exactly the way they wanted, I treat that very differently than if it's ugly
because they didn't consider spending time on prettiness a priority. The
former is incompetence combined with elitism, but the latter is pragmatism
(or laziness, but one can hope).
Post by Pete Batard
just a plain decent driver installer with a GUI, and it
shouldn't be that hard to make it look good.
Agreed, but if it is, I'd suggest that maybe it gets a lower priority.
Post by Pete Batard
Now the license is another matter altogether,
No, it was key to my point. You get something that works to YOUR
satisfaction (not mine), and the company that's making money selling the
hardware can invest time in it if they care enough about the user
experience. But I was also making that point before being thoroughly
bewildered by the idea a user will ever see this.
Post by Pete Batard
Thanks for the pointer. I'll definitely look at it. They probably hook
directly into the DLL or something.
I guess I was unclear, but no, it was an example of the first suggestion
(using the save as hack). I think you probably realized this, though, after
looking at the second email.
Post by Pete Batard
Again, the layout you currently see is was I crafted in a very short
time, and I am very well aware that it needs to be improved on.
And it looks very good. I just don't think it will be used by the people
you imagine. Yes, I know this is easy compared to udev or the like, but
it's still not going to get picked up by a company who cares about not
catching their phone lines on fire, at least not if it is anything more than
an unsupported hidden extra.
Post by Pete Batard
I wasn't really ready to discuss the GUI app (or even libwdi) until I
Then, in the future, don't push? :) I wouldn't have even given it a second
thought if someone hadn't been kind enough to do some testing.
Post by Pete Batard
therefore bound to receive a lot criticism.
Well, I hope it's at least been slightly helpful, and not just a
distraction.
Post by Pete Batard
Finally, I do hope that I'm still free to use my development time as I
see fit though
Why wouldn't you be? Am I (or anyone else) imposing requirements on you
(other than git details)? I think I was clear at the end of the last email
that you're free to do whatever you want with this. I just thought
mentioning these things might save you some time.
Post by Pete Batard
even if it's seemingly spent looking at the "ooh shiny!" stuff,
as I do enjoy working out these minute UI aspects
Which can be fun. I do understand. But recall this whole thing started
around a comment that something would be a "pain". A paradox to me...


Regards,
Michael
Pete Batard
2010-04-04 20:53:58 UTC
Permalink
Post by Michael Plante
Post by Pete Batard
The setdrv commandline tool is pretty much already done, but is a bit
limited,
Ah, well, I don't remember hearing about that one on the list, either.
Yes, because I don't really want to advertise anything from libwdi until
it is feature complete.
Post by Michael Plante
Oh sure. But that's just compiling it. Which is why I suggested it might
be a good idea to focus on VS support for development, and something else
(perhaps DDK) for a freeware build environment.
Supporting MinGW is not that big a deal right now. I'm primarily using
VS for dev and DDK/MinGW to check for the genericness of the code
produced with VS.
Post by Michael Plante
This is perhaps related to the apparent attitude in F/OSS that IDEs
are for the weak.
Yes, there's probably some truth in that. Eclipse seems to be changing
the deal a little though.
Post by Michael Plante
Post by Pete Batard
There's probably the odd GUI developer out there that wants
to use libwdi and C,
I think this is confusing libwdi with the GUI, unless I misunderstand the
terminology. There is no issue using a C library (libwdi) in a C++ app
(GUI). Where am I going wrong?
libwdi can be integrated into a console app (eg OpenOCD) but developers
might very well want to pop up a GUI Window, rather than use the
console, if a driver needs to be installed. With C sample for GUI, doing
so should be very straightforward. Granted, since it's fairly
independent, they could create a separate GUI app in C++ and call the
process if they really want a GUI, but I do see some advantages there in
being C.
Post by Michael Plante
And know what a VID and PID and MI are? Here goes...
They don't have to. Unless you create a device from scratch (which you
don't have to, as driverless devices are autodetected), VID/PID are just
there for informational purpose. Plus I'm planning to add a default
"basic mode" to the app, which will remove stuff that might look
confusing (log, device creation/edit, temp folder selection), so you'll
really end up with an UI that provides some basic information like the
detected name of the USB device and one big install button. And yes,
part of the goal is to make the GUI app straightforward enough that a 5
year old can use it.
Post by Michael Plante
I find that quite surprising, as the screenshots don't resemble anything
I've seen in a commercial installer.
Layout *will* be improved. And, from where I stand, there seems to be
quite a lot of commercial installers these days, that don't seem to
share much of a common interface. Or maybe I'll add a progress bar to
look more like an installer, and use the old trick that consists of
making it jump at a random percentage before the function call, and then
move it to 100% once the call completes, as the actual driver
installation API from Microsoft doesn't give any insights as to its
status progression.
Post by Michael Plante
The very fact that it *requires* the
user to do something other than click "install"
It really doesn't. As I explained, if you have a new USB device that
needs a WinUSB driver, just run the app, and plug the device (before or
after doesn't matter since the GUI app has hotplug), optionally confirm
the name of the device and press Install.

For most case scenarios (only one driverless USB device), that's all
there is to it, and I'm considering adding some warning in basic mode,
in case more than one driverless device is detected, to tell users to
only leave the one they want to install a driver for plugged.
Post by Michael Plante
Simple for you to write, or simple for some random person to know why they
even need, much less how to use?
libusb app:
"Hey, I haven't detected the device that you're trying to use. In case
the driver is missing, I am now going to launch a small application to
take you through the driver installation process. If you're confused,
just make sure your device is plugged and press the big Install button."
Post by Michael Plante
The average user base
of Windows (or Mac) are not what you make them out to be.
I consider the main target of my app to be either 5 year old or
grandmas, so I'm not sure what you think I make them out to be.
As far as I'm concerned, "advanced" users will be able to go through the
menu and uncheck the "basic mode" option to access features that kids
and grandmas are not meant to see.
Post by Michael Plante
Dunno, that's odd. How did you get the "promise" one?
Resource editor. I did tweak the .rc manually when I tried with the DDK,
but then I modified my scripts so that the DDK would be happy with the
VS generated .rc (oh yeah, by default, rc files produced by MS VS2008
are incompatible with the MS DDK - go figure).

It's probably something simple I missed. At worst, I expect that
recreating the rc from scratch will work. Haven't had a chance to look
closely at it yet, as there are more pressing matters.
Post by Michael Plante
I mean, is this for
some generic device, or for...?
It's for both generic devices or non-generic ones. It is meant to cover
all usage cases.
Post by Michael Plante
I guess what I'm getting at is I would have
expected that, for an end-user, this would happen in the context of some
other program, and that that program would either launch your installer with
some sort of defaults, if not outright no choice, or else that the other
program would simply link to the libwdi library with no special UI at all.
Or, even better, that program could simply launch the generic GUI app if
needed (see above), which would cover most of the usage cases and ensure
that even clueless users can get their driver installed.
Post by Michael Plante
Post by Pete Batard
And, since that single GUI exe works on all versions of Windows, from XP
to 7, including 64 bit, I very much see it being used as is.
I can write a hello world that probably works on all those platforms,
Hello world doesn't need UAC elevation, and can run as 32 bit app in
WOW64 emulation on 64 bit. An installer cannot, which makes things a
little more tricky... Ever wondered why most manufacturers ask people to
download either a 32 bit or 64 bit version of their driver installer
(which is yet another step that might be confusing). With libwdi, you
don't need to care about any of this.
Post by Michael Plante
And I hope "you deal with hardware" is an abstract
"you", rather than extrapolation from the example program I mentioned.
Yes abstract you, aimed at the countless hardware manufacturers who
produce those dreadful looking installer programs or apps (why do all
soundcard manufacturers out there think they need to reinvent the volume
control for instance?). I'll have to disagree with you on this one, but
I think aesthetics should not be ignored when you are dealing with the
general public. Not everybody at large is ready to overlook ugliness in
an app, and even those who do will still consider that the application
they just used could be made better looking. But I'm not talking about
skins or anything, just trying to make the app look like something that
"feels right" for the version of Windows they are using, as if it had
come with the OS itself.

Don't forget that, while the MSDN provides guidelines with regards to
the use of Windows APIs, it also provides guidelines with regards to the
design of Windows GUIs, (eg.
http://msdn.microsoft.com/en-us/library/aa511279.aspx or
http://msdn.microsoft.com/en-us/library/aa511458.aspx), and I don't see
why the latter should be any less valid than the former to developers.
Post by Michael Plante
Post by Pete Batard
Again, the layout you currently see is was I crafted in a very short
time, and I am very well aware that it needs to be improved on.
And it looks very good.
No it doesn't! The layout is only functional for now, but doesn't
respect any GUI design or intuitiveness guidelines.
Post by Michael Plante
Yes, I know this is easy compared to udev or the like, but
it's still not going to get picked up by a company who cares about not
catching their phone lines on fire, at least not if it is anything more than
an unsupported hidden extra.
Well, pleasing commercial software companies is not really my prime
objective here. After all, they can employ people to design their own
installer, and they'll be weary about anything that contains the letters
'G','P','L', so I'm not too concerned about them. I'm much more
concerned about easing up things for F/OSS applications and developers.
If they don't have to spend time writing a GUI installer so that their
application can easily be used by the wider public, then they can
concentrate on other things.
Post by Michael Plante
Then, in the future, don't push? :)
Git is a good backup in case my house burns down, which is how I see it
right now with regards to libwdi, and since I'm going to have to push
something to the public one day or another...
Plus, some aspects of libwdi are functional if people really need it
(the console installer is pretty much beta. The library is between alpha
and beta, and the GUI app is alpha or less)
Post by Michael Plante
Post by Pete Batard
even if it's seemingly spent looking at the "ooh shiny!" stuff,
as I do enjoy working out these minute UI aspects
Which can be fun. I do understand. But recall this whole thing started
around a comment that something would be a "pain". A paradox to me...
Yes, because the folder button is not "ooh shiny!" stuff at all. It gave
some insights as to how Vista and 7 are going with their file dialog
controls, which is good information to know, but I still wish I could
just have slapped a folder control, and use that time to make the app
look good and intuitive, with 3D controls, basic vs advanced mode and all.

I was always planning to spend some time on aesthetics, but not on
something as basic as folder control (though figuring out how to hook
into the common dialog DLLs, if that's what it takes, looks like an
interesting little problem).

Regards,

/Pete
Michael Plante
2010-04-04 21:46:58 UTC
Permalink
Post by Pete Batard
Post by Michael Plante
I find that quite surprising, as the screenshots don't resemble
anything
Post by Pete Batard
Post by Michael Plante
I've seen in a commercial installer.
Layout *will* be improved. And, from where I stand, there seems to be
quite a lot of commercial installers these days, that don't seem to
share much of a common interface. [...comments about progress bar...]
No, no. I wasn't commenting on the layout, which I mentioned is fine (and
even though you don't like it, you should know that that wasn't *my* point
here). It doesn't resemble an installer in that there's an option of which
device to overwrite the driver for. That kind of option would never come
with a piece of hardware, since the hardware developer already KNOWS which
device to attach its driver to. But see below, as I think you've answered
my concern elsewhere.
Post by Pete Batard
Post by Michael Plante
The very fact that it *requires* the
user to do something other than click "install"
It really doesn't. As I explained, if you have a new USB device that
needs a WinUSB driver, just run the app, and plug the device (before or
after doesn't matter since the GUI app has hotplug), optionally confirm
the name of the device and press Install.
Hrm, maybe. The screenshot seemed to imply quite the opposite, and I didn't
see this vision/explanation or a mention of hotplug anywhere, so I think
what I said was plenty reasonable at the time.
Post by Pete Batard
I'm considering adding some warning in basic mode,
in case more than one driverless device is detected, to tell users to
only leave the one they want to install a driver for plugged.
[...]
"Hey, I haven't detected the device that you're trying to use. In case
the driver is missing, I am now going to launch a small application to
take you through the driver installation process. If you're confused,
just make sure your device is plugged and press the big Install button."
Unless it's internal (such as a card reader that plugs to your motherboard's
USB header). And there is the possibility they won't know what to unplug,
even if all devices are external. Tracing cables from point A to point B is
not usually easy for most setups, so mistakes happen. Of course, on an open
platform like the PC, there's always the issue of *other people's*
misbehaved devices. It's not USB, but to give another example, my *laptop*
helpfully offers to eject my wired ethernet card in the "Eject hardware"
applet, even though I'd need a torx set, several hours, and a soldering iron
to get to it. Point being, plugging things isn't necessarily going to be a
reliable solution on its own, and there may need to be additional info.

I would suggest that the GUI, in basic mode, take a VID/PID (or maybe a
serial number) as a command line argument, since the developer already knows
what that will be. Maybe you already planned this?
Post by Pete Batard
Post by Michael Plante
I mean, is this for
some generic device, or for...?
It's for both generic devices or non-generic ones. It is meant to cover
all usage cases.
Alright, I'll ask a potentially-simple question: what is a generic device?
Yes, I used the term first, but I was hoping you'd rebut my statement as
silly, rather than saying it'll be supported. Then I would have been less
confused, rather than more.
Post by Pete Batard
that program could simply launch the generic GUI app if needed
Yes, which is what I meant by "context of another program".
Post by Pete Batard
Post by Michael Plante
Post by Pete Batard
And, since that single GUI exe works on all versions of Windows, from
XP
Post by Pete Batard
Post by Michael Plante
Post by Pete Batard
to 7, including 64 bit, I very much see it being used as is.
I can write a hello world that probably works on all those platforms,
Hello world [...details about why the GUI is more complicated...]
Eliminating those complications from the example was precisely my point.
Cross-platform isn't a *sufficient* condition for use as-is, though it may
be a *necessary* condition. That was what I was getting at. If it were a
sufficient condition, a very simple, useless program like hello world also
meets that condition, and therefore should be used as-is. Which would be a
silly claim, right? But I think I was just arguing with a confusing
wording, so perhaps you should ignore this.
Post by Pete Batard
just trying to make the app look like something that
"feels right" for the version of Windows they are using, as if it had
come with the OS itself.
To the extent that it's not a pain.
Post by Pete Batard
Don't forget that, while the MSDN provides guidelines with regards to
the use of Windows APIs, it also provides guidelines with regards to the
design of Windows GUIs, [...] and I don't see
why the latter should be any less valid than the former to developers.
I was aware of these, but had never bothered to read them. Just now
skimming it, it's mostly common sense to anyone who's used Windows for any
length of time, I would think. But I don't think the numbers down the
bottom are AS valid. I wouldn't be surprised if Microsoft changes those
NUMBERS every once in awhile, just to make people pay for some sort of logo
validation or whatever.
Post by Pete Batard
No it doesn't! The layout is only functional for now, but doesn't
respect any GUI design or intuitiveness guidelines.
Well, I've seen much, much worse, and no problems are immediately obvious to
me. If you want to "fix" it, no one's stopping you. This was primarily
intended as a disclaimer that that was not where MY complaints lie.
Post by Pete Batard
they'll be weary about anything that contains the letters
'G','P','L', so I'm not too concerned about them.
Many won't, since it's a separate program (even if they modify it). Atmel's
proprietary "AVR Studio" primarily uses a native Win32 build of a gcc
cross-compiler, e.g. But if you're not concerned, that's fine; my point
also applies to non-commercial developers. I'll try to remember to say
"developer" rather than "company", to avoid this confusion in the future.
(see below)
Post by Pete Batard
I'm much more
concerned about easing up things for F/OSS applications and developers.
Ok. But I don't think their concerns are much different, wrt causing
support issues, which was my main point. They may just have less time (as
you mentioned), which makes what I was saying all the more relevant to F/OSS
developers' use of this.


Regards,
Michael
Xiaofan Chen
2010-04-05 02:09:53 UTC
Permalink
Post by Pete Batard
It really doesn't. As I explained, if you have a new USB device that
needs a WinUSB driver, just run the app, and plug the device (before or
after doesn't matter since the GUI app has hotplug), optionally confirm
the name of the device and press Install.
Hrm, maybe.  The screenshot seemed to imply quite the opposite, and I didn't
see this vision/explanation or a mention of hotplug anywhere, so I think
what I said was plenty reasonable at the time.
Hotplug support is in the GUI program. It knows the device plug-in
and unplug event. It is a useful feature that the GUI can inform the
user about the event.
I would suggest that the GUI, in basic mode, take a VID/PID (or maybe a
serial number) as a command line argument, since the developer already knows
what that will be.  Maybe you already planned this?
Yes that would be good. Maybe the console program already did that
but I have not tested the console program for a few days.
Post by Pete Batard
just trying to make the app look like something that
"feels right" for the version of Windows they are using, as if it had
come with the OS itself.
To the extent that it's not a pain.
Agreed. It seems to me the one used in libusb-win32 infwizard.exe
is fine and has the right feel across XP/Vista/7 (should also be
right under Win2k but I never really used Win2k).
--
Xiaofan http://mcuee.blogspot.com
Michael Plante
2010-04-05 02:38:34 UTC
Permalink
(should also be right under Win2k but I never really used Win2k).
It is.


Michael
kenichi_cui
2010-04-06 06:45:33 UTC
Permalink
Hello:

I change the VID and PID in INF to match my usb device. after install , the
WINUSB.sys cann't start.

and I cann't open the device by calling libusb_open_device_with_VID_PID.

who know why ?
Post by Michael Plante
(should also be right under Win2k but I never really used Win2k).
It is.
Michael
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28148039.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-06 07:31:28 UTC
Permalink
Post by kenichi_cui
I change the VID and PID in INF to match my usb device. after install , the
WINUSB.sys cann't start.
and I cann't open the device by calling libusb_open_device_with_VID_PID.
who know why ?
I think it is better that you start a new thread since your subject is
different from the thread. So please do that next time.

What do you mean by winusb.sys can not start? What it the error
code? Is it code 10 error? Are you using XP or Vista or Win7?
32bit or 64bit?

If the driver is not installed properly, then you cann't open the device by
calling libusb_open_device_with_VID_PID.
--
Xiaofan http://mcuee.blogspot.com
kenichi_cui
2010-04-06 07:44:29 UTC
Permalink
Post by Xiaofan Chen
Post by Xiaofan Chen
What do you mean by winusb.sys can not start? What it the error
code? Is it code 10 error? Are you using XP or Vista or Win7?
32bit or 64bit?
After I install the inf with my VID and PID, there is a warning icon in
Device Manager !
the error code is 10, I use 32bits XP.

I run the open MS32 's xusb, it cann't open device too.
Post by Xiaofan Chen
Post by Xiaofan Chen
I change the VID and PID in INF to match my usb device. after install , the
WINUSB.sys cann't start.
and I cann't open the device by calling libusb_open_device_with_VID_PID.
who know why ?
I think it is better that you start a new thread since your subject is
different from the thread. So please do that next time.
What do you mean by winusb.sys can not start? What it the error
code? Is it code 10 error? Are you using XP or Vista or Win7?
32bit or 64bit?
If the driver is not installed properly, then you cann't open the device by
calling libusb_open_device_with_VID_PID.
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28148402.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-06 08:38:33 UTC
Permalink
Post by kenichi_cui
Post by Xiaofan Chen
What do you mean by winusb.sys can not start? What it the error
code? Is it code 10 error? Are you using XP or Vista or Win7?
32bit or 64bit?
After I install the inf with my VID and PID, there is a warning icon in
Device Manager !
the error code is 10, I use 32bits XP.
Firstly make sure your device works.

Try remove all instances of the same VID/PID using usbdeview.
http://www.nirsoft.net/utils/usb_devices_view.html

Then reinstall the driver again.

If you still have the issue, then post the relevant information
from c:\windows\setupapi.log (those new information
generated when you plug in the device).
--
Xiaofan http://mcuee.blogspot.com
kenichi_cui
2010-04-06 08:50:33 UTC
Permalink
My usb device works indeed, because I have programmed a driver for it, the
driver works well.
but I am afraid of those driver conflict.
Post by Xiaofan Chen
Post by kenichi_cui
Post by Xiaofan Chen
What do you mean by winusb.sys can not start? What it the error
code? Is it code 10 error? Are you using XP or Vista or Win7?
32bit or 64bit?
After I install the inf with my VID and PID, there is a warning icon in
Device Manager !
the error code is 10, I use 32bits XP.
Firstly make sure your device works.
Try remove all instances of the same VID/PID using usbdeview.
http://www.nirsoft.net/utils/usb_devices_view.html
Then reinstall the driver again.
If you still have the issue, then post the relevant information
from c:\windows\setupapi.log (those new information
generated when you plug in the device).
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28148973.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-06 11:08:46 UTC
Permalink
Post by kenichi_cui
My usb device works indeed, because I have programmed a driver for it, the
driver works well.
but I am afraid of those driver conflict.
I have no idea what your device is. What is this Jetway Security Crypto Disk?
What is the driver you developed to use with it?

Anyway, I can only suggest you to use usbdeview to remove your driver
and then try again with winusb if you want to use WinUSB. What
is the reason you want to use WinUSB if you already have your
own driver?
--
Xiaofan http://mcuee.blogspot.com
kenichi_cui
2010-04-06 12:17:34 UTC
Permalink
HI xiaofeng:

you can treat my usb device as a usb key ! I have a test driver builded by
DDK for the device.
anyway, Testing with driver is not enough for usb unit testing. that's why I
use LIBUSB.

Acutually, I remove all driver by usbdview and reinstall again. it has same
problem.
Post by Xiaofan Chen
Post by kenichi_cui
My usb device works indeed, because I have programmed a driver for it, the
driver works well.
but I am afraid of those driver conflict.
I have no idea what your device is. What is this Jetway Security Crypto Disk?
What is the driver you developed to use with it?
Anyway, I can only suggest you to use usbdeview to remove your driver
and then try again with winusb if you want to use WinUSB. What
is the reason you want to use WinUSB if you already have your
own driver?
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28150942.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-06 12:24:42 UTC
Permalink
I am Xiaofan. ;-)
Post by kenichi_cui
you can treat my usb device as a usb key ! I have a test driver builded by
DDK for the device. Anyway, Testing with driver is not enough for usb
unit testing. that's why I use LIBUSB.
Acutually, I remove all driver by usbdview and reinstall again. it has same
problem.
I see. Please try follow Pete's advice in the other post. Thanks.
--
Xiaofan http://mcuee.blogspot.com
kenichi_cui
2010-04-06 09:08:09 UTC
Permalink
the setupapi.log show the error message that the libusb_device.inf has
incorrect signed information !
where do I get the signed file
Post by Xiaofan Chen
Post by kenichi_cui
Post by Xiaofan Chen
What do you mean by winusb.sys can not start? What it the error
code? Is it code 10 error? Are you using XP or Vista or Win7?
32bit or 64bit?
After I install the inf with my VID and PID, there is a warning icon in
Device Manager !
the error code is 10, I use 32bits XP.
Firstly make sure your device works.
Try remove all instances of the same VID/PID using usbdeview.
http://www.nirsoft.net/utils/usb_devices_view.html
Then reinstall the driver again.
If you still have the issue, then post the relevant information
from c:\windows\setupapi.log (those new information
generated when you plug in the device).
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28149132.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
kenichi_cui
2010-04-06 10:22:17 UTC
Permalink
hello XiaoFeng:

the following data is in setupapi.log, Please help me check
=============================================
[SetupAPI Log]
OS Version = 5.1.2600 Service Pack 2
Platform ID = 2 (NT)
Service Pack = 2.0
Suite = 0x0100
Product Type = 1
Architecture = x86
[2010/04/06 19:20:15 208.498]
#-198 Command line processed: "D:\WINDOWS\system32\mmc.exe"
D:\WINDOWS\system32\devmgmt.msc /s
#I060 Set selected driver.
#-019 Searching for hardware ID(s):
usb\vid_1b60&pid_3296&rev_0100,usb\vid_1b60&pid_3296
#-018 Searching for compatible ID(s):
usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#-019 Searching for hardware ID(s):
usb\vid_1b60&pid_3296&rev_0100,usb\vid_1b60&pid_3296
#-018 Searching for compatible ID(s):
usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#I022 Found "USB\VID_1b60&PID_3296" in c:\winusbdriver\libusb_device.inf;
Device: "Jetway Security Crypto Disk"; Driver: "Jetway Security Crypto
Disk"; Provider: "libusb 1.0"; Mfg: "libusb 1.0"; Section name:
"USB_Install".
#I087 Driver node not trusted, rank changed from 0x00000001 to 0x00008001.
#I023 Actual install section: [USB_Install]. Rank: 0x00008001. Effective
driver date: 01/08/2010.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [USB_Install] in
"c:\winusbdriver\libusb_device.inf".
#I320 Class GUID of device remains: {78A1C341-4539-11D3-B88D-00C04FAD5171}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of "USB\VID_1B60&PID_3296\5&12BCD0C8&0&3".
#E360 An unsigned or incorrectly signed file
"c:\winusbdriver\libusb_device.inf" for driver "Jetway Security Crypto Disk"
will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF
does not contain digital signature information.
#W187 Install failed, attempting to restore original files.
#E360 An unsigned or incorrectly signed file
"c:\winusbdriver\libusb_device.inf" for driver "Jetway Security Crypto Disk"
will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF
does not contain digital signature information.
#-024 Copying file "c:\winusbdriver\x86\WinUSBCoInstaller2.dll" to
"D:\WINDOWS\system32\WinUSBCoInstaller2.dll".
#E360 An unsigned or incorrectly signed file
"c:\winusbdriver\libusb_device.inf" for driver "Jetway Security Crypto Disk"
will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF
does not contain digital signature information.
#-336 Copying file "c:\winusbdriver\x86\WdfCoInstaller01009.dll" to
"D:\WINDOWS\system32\WdfCoInstaller01009.dll" via temporary file
"D:\WINDOWS\system32\SET12.tmp".
#E360 An unsigned or incorrectly signed file
"c:\winusbdriver\libusb_device.inf" for driver "Jetway Security Crypto Disk"
will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF
does not contain digital signature information.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [USB_Install.Interfaces] from
"c:\winusbdriver\libusb_device.inf".
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of "USB\VID_1B60&PID_3296\5&12BCD0C8&0&3".
#E360 An unsigned or incorrectly signed file
"c:\winusbdriver\libusb_device.inf" for driver "Jetway Security Crypto Disk"
will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF
does not contain digital signature information.
#I163 Device not started: Device has problem: 0x0a: CM_PROB_FAILED_START.
#I121 Device install of "USB\VID_1B60&PID_3296\5&12BCD0C8&0&3" finished
successfully.

==============================================

I think there is no libusb_device.cat for it!!!
Post by Xiaofan Chen
Post by kenichi_cui
Post by Xiaofan Chen
What do you mean by winusb.sys can not start? What it the error
code? Is it code 10 error? Are you using XP or Vista or Win7?
32bit or 64bit?
After I install the inf with my VID and PID, there is a warning icon in
Device Manager !
the error code is 10, I use 32bits XP.
Firstly make sure your device works.
Try remove all instances of the same VID/PID using usbdeview.
http://www.nirsoft.net/utils/usb_devices_view.html
Then reinstall the driver again.
If you still have the issue, then post the relevant information
from c:\windows\setupapi.log (those new information
generated when you plug in the device).
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28149793.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Pete Batard
2010-04-06 11:27:13 UTC
Permalink
Hi Kenichi,

1. Error 0xe000022f is ERROR_NO_CATALOG_FOR_OEM_INF and not having a
.cat shouldn't be a problem on XP, but from what I can read here:
http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2004-09/0784.html
it could be if you have set your driver policy to "reject unsigned
drivers". I think you can check whether that is the case by following
this post:
http://articles.techrepublic.com.com/5100-10878_11-5875443.html

2. I also think it would help us if you posted the actual inf file you
are using somewhere.

3. If this is an inf you edited yourself, and are uncertain of tyour
modifications, maybe you could try to remove your existing driver, as
Xiaofan advised, and use the automated WinUSB driver installation
program setdrv.exe, which you can donwload from
http://libusb.org/wiki/windows_backend#DriverInstallation
Unless you enforce "reject unsigned drivers", it should be able to
detect your device and install the WinUSB driver for it automatically.

Regards,

/Pete


PS @Xiaofan: great tip on SetupAPI.log! I wasn't aware that there was
such a thing. On 7 it seems to have been renamed to setupact.log, but
it's still there, and this is incredibly useful...
Xiaofan Chen
2010-04-06 12:00:35 UTC
Permalink
Post by Pete Batard
such a thing. On 7 it seems to have been renamed to setupact.log, but
it's still there, and this is incredibly useful...
Yes Microsoft changes file names from time to time.

For XP, it is called SetupApi.log, typically at %windir%\setupapi.log.
For Vista and Windows 7, there are two files:
setupapi.app.log and setupapi.dev.log, located in %windir%\inf\.

You can refer to these two document.
http://www.microsoft.com/whdc/driver/install/setupapilog.mspx
http://www.microsoft.com/whdc/driver/install/diagnose.mspx

I think setupact.log is a bit different.
It is talked about here.
http://support.microsoft.com/kb/927521
--
Xiaofan http://mcuee.blogspot.com
Pete Batard
2010-04-06 12:11:34 UTC
Permalink
Post by Xiaofan Chen
You can refer to these two document.
http://www.microsoft.com/whdc/driver/install/setupapilog.mspx
http://www.microsoft.com/whdc/driver/install/diagnose.mspx
Great links. I have now added them on my libwdi development page.
Post by Xiaofan Chen
I think setupact.log is a bit different.
It is talked about here.
http://support.microsoft.com/kb/927521
Yeah. I definitely see WinUSB installation details there though,
including some dubious stuff, like returning success even if WinUSB.dll
is missing (granted, I forcefully removed the DLL from my system to see
what would happen, but still...):

[04/04/2010 03:25.19.310] WinUSBUpdate: WinUSB file
%WINDIR%\system32\winusb.dll not found.
[04/04/2010 03:25.19.372] WinUSBUpdate: WinUSB installation is same as
update, but is damaged: required file is missing.
[04/04/2010 03:25.19.435] WinUSBUpdate: No update found for this OS, but
OS is supported - returning NO_ERROR.

Regards,

/Pete
kenichi_cui
2010-04-06 12:28:44 UTC
Permalink
Hi Pete:

I use the libusb_device.inf in winusb_driver package. only change the VID &
PID and DeviceGUID.
keep other change.

I have tried more times. same result !
Post by Pete Batard
Hi Kenichi,
1. Error 0xe000022f is ERROR_NO_CATALOG_FOR_OEM_INF and not having a
http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2004-09/0784.html
it could be if you have set your driver policy to "reject unsigned
drivers". I think you can check whether that is the case by following
http://articles.techrepublic.com.com/5100-10878_11-5875443.html
2. I also think it would help us if you posted the actual inf file you
are using somewhere.
3. If this is an inf you edited yourself, and are uncertain of tyour
modifications, maybe you could try to remove your existing driver, as
Xiaofan advised, and use the automated WinUSB driver installation
program setdrv.exe, which you can donwload from
http://libusb.org/wiki/windows_backend#DriverInstallation
Unless you enforce "reject unsigned drivers", it should be able to
detect your device and install the WinUSB driver for it automatically.
Regards,
/Pete
such a thing. On 7 it seems to have been renamed to setupact.log, but
it's still there, and this is incredibly useful...
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28151095.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Xiaofan Chen
2010-04-06 12:38:34 UTC
Permalink
Post by kenichi_cui
I use the libusb_device.inf in winusb_driver package. only change the VID &
PID and DeviceGUID.
keep other change.
I have tried more times. same result !
Pete mentioned the following, did you check this?
"It could be if you have set your driver policy to "reject unsigned
drivers". I think you can check whether that is the case by following
this post:
http://articles.techrepublic.com.com/5100-10878_11-5875443.html"

And it is also possible that your device is not compatible with
WinUSB. Graeme Gill mentioned that he got one device
not compatible with WinUSB due to buggy get_status
firmware implementation.
Long URL:
http://old.nabble.com/Re%3A--Libusb-win32-devel--libusb-V1.0-with-Win2K---libusb0.sys-back-end-support-p27982708.html
--
Xiaofan http://mcuee.blogspot.com
kenichi_cui
2010-04-06 12:47:44 UTC
Permalink
HI:

you mean that winusb driver will issue GET_STATUS when start , right ?
if this, I will go to check the FIRMWARE. it may not be compatible.
Post by Xiaofan Chen
Post by kenichi_cui
I use the libusb_device.inf in winusb_driver package. only change the VID &
PID and DeviceGUID.
keep other change.
I have tried more times. same result !
Pete mentioned the following, did you check this?
"It could be if you have set your driver policy to "reject unsigned
drivers". I think you can check whether that is the case by following
http://articles.techrepublic.com.com/5100-10878_11-5875443.html"
And it is also possible that your device is not compatible with
WinUSB. Graeme Gill mentioned that he got one device
not compatible with WinUSB due to buggy get_status
firmware implementation.
http://old.nabble.com/Re%3A--Libusb-win32-devel--libusb-V1.0-with-Win2K---libusb0.sys-back-end-support-p27982708.html
--
Xiaofan http://mcuee.blogspot.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28151326.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Pete Batard
2010-04-06 12:41:34 UTC
Permalink
Post by kenichi_cui
I have tried more times. same result !
So, what is the error you get when using setdrv_20100330.exe?

And also, have you confirmed that "reject unsigned drivers" is not in
effect?

Regards,

/Pete
kenichi_cui
2010-04-06 12:52:19 UTC
Permalink
no, I have n't tried " reject unsigned drivers". I think it is ok for xp
recepts unsigned drivers.
because my old driver is unsigned driver, but works.

I think xiaofen's suggestion about GET_STATUS maybe the root cause.
I will post the result tomorrow !

thank you for your help.
Post by Pete Batard
Post by kenichi_cui
I have tried more times. same result !
So, what is the error you get when using setdrv_20100330.exe?
And also, have you confirmed that "reject unsigned drivers" is not in
effect?
Regards,
/Pete
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28151331.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Pete Batard
2010-04-06 14:59:43 UTC
Permalink
Post by kenichi_cui
I think xiaofen's suggestion about GET_STATUS maybe the root cause.
I will post the result tomorrow !
I'm not so sure about that as my understanding is that the GET_STATUS
issue manifested itself after the WinUSB driver had been successfully
installed, and as far as I know, you problem is with the driver
installation itself (yellow icon in device manager)

You have to be weary of jumping to conclusions when trying to
troubleshoot a problem. Instead, you need to methodically work with the
data you have.

So far, the only insight we have into your issue is that an
ERROR_NO_CATALOG_FOR_OEM_INF error is generated during installation, and
that Windows complains that it is looking for a signature for the driver.

If you look at the header of the inf file, you will see that I provided
notes on how to create a cat file if needed.
To do just that, you will need to download and install the latest
Windows Driver Kit (unless you can find the inf2cat tool online -
unfortunately - I'm afraid Microsoft does not provide these tools
separately, and their redistributable status is grey) and then for XP
you would need to use a command like:

C:\WinDDK\7600.16385.0\bin\selfsigninf2cat /driver:"path_to_your inf"
/os:XP_X86,XP_X64

The WDK can be obtained
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff

If the driver installation works with a signed file, then we still have
to explain why this is necessary on XP, but at least we'll have a better
idea of what the problem is.

Anyway, please let us know when you have more details.

Regards,

/Pete
Graeme Gill
2010-04-07 02:42:37 UTC
Permalink
Post by Pete Batard
So far, the only insight we have into your issue is that an
ERROR_NO_CATALOG_FOR_OEM_INF error is generated during installation, and
that Windows complains that it is looking for a signature for the driver.
It's worth running modified .inf files through the ChkINF perl script that
Microsoft provide with the DDK.

Graeme Gill.
kenichi_cui
2010-04-07 02:30:20 UTC
Permalink
Hi everyone:

I have installed winusb.sys successfully and start it . now my application
can run successfully.

Pete: "reject unsigned driver" is not the root cause. it still cann't work
since I set policy to "IGNORE".

Xiaofeng: the "GET_STATUS" is the root cause.

Actually, my debug step is as followed:
1. I suspent XP SP2, but it has same problem after upgrade SP3. so it is
not.
2. I capture USB package with LeCroy USB prptocol Suite when install driver.
the issue comes out.
when start WINUSB.SYS, the driver will enumerate usb device. so it will
send more CONTROL transfer
package. before Senting SET_CONFIGURATION, it will send GET_STATUS, I
also found that usb device
don't response correct data.

after update my firmware code, the driver can be installed successfully and
works.

here, I am apprecaite for XiaoFeng, Pete, Tim, Micheal.

Thx
Post by Pete Batard
Post by kenichi_cui
I have tried more times. same result !
So, what is the error you get when using setdrv_20100330.exe?
And also, have you confirmed that "reject unsigned drivers" is not in
effect?
Regards,
/Pete
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
--
View this message in context: http://old.nabble.com/libusb-1.0-windows-backend-now-in-Cygwin-packages-tp28077699p28159896.html
Sent from the LibUSB Dev mailing list archive at Nabble.com.
Tim Roberts
2010-04-06 21:49:29 UTC
Permalink
Post by kenichi_cui
the following data is in setupapi.log, Please help me check
=============================================
[SetupAPI Log]
...
"c:\winusbdriver\libusb_device.inf" for driver "Jetway Security Crypto Disk"
will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF
does not contain digital signature information.
All of the warnings up to this point can be ignored. You'll get those
with any driver package that has not been signed by WHQL.
Post by kenichi_cui
#I163 Device not started: Device has problem: 0x0a: CM_PROB_FAILED_START.
#I121 Device install of "USB\VID_1B60&PID_3296\5&12BCD0C8&0&3" finished
successfully.
CM_PROB_FAILED_START is the real problem. It indicates that WinUSB
tried to start up but returned an error during its initialization. Is
the WinUSB GUID in your INF file formatted correctly? Does your device
have isochronous pipes?
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
Loading...