Stephan Meyer | 7 Jul 2009 19:06

Re: Possibility to release the current SVN version as 0.1.12.2

I've compiled the latest SVN version and released it as 0.1.12.2

Stephan

On Mon, Jun 22, 2009 at 4:43 AM, Xiaofan Chen<xiaofanc <at> gmail.com> wrote:
> Hello Stephan,
>
> http://www.nabble.com/LibUSB---composite-USB-devices-td11027391.html
>
> On Sun, Jun 10, 2007 at 4:13 PM, Stephan Meyer<ste_meyer <at> web.de> wrote:
>>
>> Version 0.1.12.1 doesn't support composite device interfaces but adding
>> this feature is easy.
>> Attached to this mail you'll find a patched version of the driver that supports
>> this feature.
>>
>> To install it you'll have to:
>>
>> * rename libusb0_sys.pdf to libusb0.sys
>> * copy libusb0.sys to <windir>/system32/drivers
>> * unplug and replug all USB devices handled by libusb
>>
>
> Apparently the latest SVN version 161 (22 months old)
> solved this problem.
>
> Is it possible to release this version as 0.1.12.2?
> It seems to me that people in the OpenOCD mailing
> list has problems with the released 0.1.12.1 with
> libftdi on FT2232x based Jtag debuggers. But it is
(Continue reading)

Xiaofan Chen | 8 Jul 2009 02:00
Picon

Re: Possibility to release the current SVN version as 0.1.12.2

On Wed, Jul 8, 2009 at 1:06 AM, Stephan Meyer<ste.meyer1 <at> googlemail.com> wrote:
> I've compiled the latest SVN version and released it as 0.1.12.2
>
> Stephan

Thanks a lot for the help.

Just one question, the 64bit version is build from DDK/WDK so that
it is only available for MSVC and not MinGW GCC, right? Is it
possible for MinGW GCC based program to access the DLL
under XP 64?

--

-- 
Xiaofan http://mcuee.blogspot.com

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
Stephan Meyer | 8 Jul 2009 08:06

Re: Possibility to release the current SVN version as 0.1.12.2

On Wed, Jul 8, 2009 at 2:00 AM, Xiaofan Chen<xiaofanc <at> gmail.com> wrote:
> On Wed, Jul 8, 2009 at 1:06 AM, Stephan Meyer<ste.meyer1 <at> googlemail.com> wrote:
>> I've compiled the latest SVN version and released it as 0.1.12.2
>>
>> Stephan
>
> Thanks a lot for the help.
>
> Just one question, the 64bit version is build from DDK/WDK so that
> it is only available for MSVC and not MinGW GCC, right? Is it
> possible for MinGW GCC based program to access the DLL
> under XP 64?

Yes, the 64bit version is compiled with MSVC but you can
use it with MinGW:

* add /lib/dynamic/libusb_dyn.c to your project
* in line 25 replace "libusb0.dll" with "libusb0_x64.dll"
* compile
* the 64bit DLL will now be loaded dynamically at runtime

This method should work with any compiler on any system.

Stephan

>
> --
> Xiaofan http://mcuee.blogspot.com
>
> ------------------------------------------------------------------------------
(Continue reading)

Martin Panter | 8 Jul 2009 09:05
Picon

Re: Possibility to release the current SVN version as 0.1.12.2

On 08/07/2009, Stephan Meyer <ste.meyer1 <at> googlemail.com> wrote:
> On Wed, Jul 8, 2009 at 2:00 AM, Xiaofan Chen<xiaofanc <at> gmail.com> wrote:
>  > Just one question, the 64bit version is build from DDK/WDK so that
>  > it is only available for MSVC and not MinGW GCC, right? Is it
>  > possible for MinGW GCC based program to access the DLL
>  > under XP 64?
>
>
> Yes, the 64bit version is compiled with MSVC but you can
>  use it with MinGW:
>
>  * add /lib/dynamic/libusb_dyn.c to your project
>  * in line 25 replace "libusb0.dll" with "libusb0_x64.dll"
>  * compile
>  * the 64bit DLL will now be loaded dynamically at runtime
>
>  This method should work with any compiler on any system.

As for actually linking rather than dynamic loading, have you actually
tried getting GCC to link to the MSVC library? I'm pretty sure I've
done this in the past (to 32 bit .lib files and .dll files, not 64
bits though). Eg something like one of these

gcc file1.o file2.o libusb.lib
gcc file1.o file2.o libusb0_x64.dll

Or even if the file name is of the right format in the right directory:

gcc file1.o file2.o -llibusb (or -lusb0_x64 maybe?)

(Continue reading)

Spiro Trikaliotis | 9 Jul 2009 20:17

Re: Possibility to release the current SVN version as 0.1.12.2

Hello Stephan,

* On Wed, Jul 08, 2009 at 08:06:51AM +0200 Stephan Meyer wrote:

> Yes, the 64bit version is compiled with MSVC but you can
> use it with MinGW:
[...]

This reminds me: I have a problem with the MingW compiled libusb
0.1.12.1. I load the libusb DLL dynamically from my own DLL. On cleanup
("FreeLibrary()"), I have a crash.

If I replace the libusb DLL with my own one, compiled with the DDK, the
problem vanishes.

I must say that everything in my project (DLL, Applications) is compiled
with the DDK compiler.

I did not have time yet to investigate this issue, so I cannot give you
a more detailed report. However, someone else might have noticed this
same problem before?

Regards,
Spiro.

--

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/

------------------------------------------------------------------------------
(Continue reading)

Mark Brooks | 19 Jul 2009 21:13
Picon

Using Libusb-win32 from C# (Visual Studio)

Hi,

 

I have been using libusb-win32 from Visual C++ and Visual Basic. I now come to try to use libusb-win32 from Visual Studio C#. Can it be used directly and does anyone have a simple example of doing so?

 

Thanks in advance,

Mark

 

 

 

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Picon

Re: Using Libusb-win32 from C# (Visual Studio)

Hi Mark,

We use that library - libusbdotnet.sourceforge.net

2009/7/19 Mark Brooks <bro <at> oticon.dk>:
> Hi,
>
>
>
> I have been using libusb-win32 from Visual C++ and Visual Basic. I now come
> to try to use libusb-win32 from Visual Studio C#. Can it be used directly
> and does anyone have a simple example of doing so?
>
>
>
> Thanks in advance,
>
> Mark
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> Libusb-win32-devel mailing list
> Libusb-win32-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>
>

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
Luca Ottaviano | 27 Jul 2009 17:59
Favicon

Amontec JTAGkey and libusb under Vista 32-bit

Hi all,
I can't get a device recognized under Vista. I'm using Amontec JTAGkey
to flash an embedded board using Openocd; the problem is that WinXp
correctly recognizes the device, while Vista doesn't.

These are the what I'm doing to install the driver:
- download binary distribution (libusb-win32-device-bin-0.1.12.2.tar.gz)
- extract the archive and create an .inf file (see attachment) using inf
wizard and edit to suit my system
- attach the device; when prompted for drivers, use the directory bin/.
The driver for both channels seem properly installed
- run testlibusb-win, which will report the message "Couldn't retrieve
descriptors"

If I run testlibusb under WinXp, instead, I get the listing of all
device's properties.

If I try to run Openocd, it segfaults when trying to access to the
device (which is reasonable, as it's not correctly installed).

Versions used:
libusb: 0.12.2
openocd: 0.2.0

I've also tried to use libusb-filter, which however it's not the
recommended method to install the driver, without luck.

Do you have any clues on how to make it work?
-- 
Ing. Luca Ottaviano - lottaviano <at> develer.com
Develer S.r.l. - http://www.develer.com/
.hardware . software .innovation
Tel.: +39 055 3986627 - ext.: 218
[Version]
Signature = "$Chicago$"
provider  = %manufacturer%
DriverVer = 07/07/2009,0.1.12.2
CatalogFile = libusb.cat
CatalogFile.NT = libusb.cat
CatalogFile.NTAMD64 = libusb_x64.cat

Class = LibUsbDevices
ClassGUID = {EB781AAF-9C70-4523-A5DF-642A87ECA567}

[ClassInstall]
AddReg=libusb_class_install_add_reg

[ClassInstall32]
AddReg=libusb_class_install_add_reg

[libusb_class_install_add_reg]
HKR,,,,"LibUSB-Win32 Devices"
HKR,,Icon,,"-20"

[Manufacturer]
%manufacturer%=Devices,NT

;--------------------------------------------------------------------------
; Files
;--------------------------------------------------------------------------

[SourceDisksNames]
1 = "Libusb-Win32 Driver Installation Disk",,

[SourceDisksFiles]
libusb0.sys = 1,,
libusb0.dll = 1,,

[DestinationDirs]
libusb_files_sys = 10,system32\drivers
libusb_files_dll = 10,system32

[libusb_files_sys]
libusb0.sys

[libusb_files_dll]
libusb0.dll

;--------------------------------------------------------------------------
; Device driver
;--------------------------------------------------------------------------

[LIBUSB_DEV]
CopyFiles = libusb_files_sys, libusb_files_dll
AddReg    = libusb_add_reg

[LIBUSB_DEV.NT]
CopyFiles = libusb_files_sys, libusb_files_dll

[LIBUSB_DEV.HW]
DelReg = libusb_del_reg_hw
AddReg = libusb_add_reg_hw

[LIBUSB_DEV.NT.HW]
DelReg = libusb_del_reg_hw
AddReg = libusb_add_reg_hw

[LIBUSB_DEV.NT.Services]
AddService = libusb0, 0x00000002, libusb_add_service

[libusb_add_reg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,libusb0.sys

; Older versions of this .inf file installed filter drivers. They are not
; needed any more and must be removed
[libusb_del_reg_hw]
HKR,,LowerFilters
HKR,,UpperFilters

; Device properties
[libusb_add_reg_hw]
HKR,,SurpriseRemovalOK, 0x00010001, 1

;--------------------------------------------------------------------------
; Services
;--------------------------------------------------------------------------

[libusb_add_service]
DisplayName    = "LibUsb-Win32 - Kernel Driver 07/07/2009, 0.1.12.2"
ServiceType    = 1
StartType      = 3
ErrorControl   = 0
ServiceBinary  = %12%\libusb0.sys

;--------------------------------------------------------------------------
; Devices
;--------------------------------------------------------------------------

[Devices]
"Amontec JTAGkey (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_00
"Amontec JTAGkey (Channel B)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_01

"egnite Turtelizer 2 (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_bdc8&MI_00

"JTAG-lock-pick - USB <=> JTAG adapter"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_00

[Devices.NT]
"Amontec JTAGkey (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_00
"Amontec JTAGkey (Channel B)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_01

"egnite Turtelizer 2 (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_bdc8&MI_00

"JTAG-lock-pick - USB <=> JTAG adapter"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_00

;--------------------------------------------------------------------------
; Strings
;--------------------------------------------------------------------------

[Strings]
manufacturer = "Amontec"

------------------------------------------------------------------------------
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Stephan Meyer | 28 Jul 2009 08:18

Re: Amontec JTAGkey and libusb under Vista 32-bit

Check %windir%\setupapi.log
Any errors in there?

Stephan

On Mon, Jul 27, 2009 at 5:59 PM, Luca Ottaviano<lottaviano <at> develer.com> wrote:
> Hi all,
> I can't get a device recognized under Vista. I'm using Amontec JTAGkey
> to flash an embedded board using Openocd; the problem is that WinXp
> correctly recognizes the device, while Vista doesn't.
>
> These are the what I'm doing to install the driver:
> - download binary distribution (libusb-win32-device-bin-0.1.12.2.tar.gz)
> - extract the archive and create an .inf file (see attachment) using inf
> wizard and edit to suit my system
> - attach the device; when prompted for drivers, use the directory bin/.
> The driver for both channels seem properly installed
> - run testlibusb-win, which will report the message "Couldn't retrieve
> descriptors"
>
> If I run testlibusb under WinXp, instead, I get the listing of all
> device's properties.
>
> If I try to run Openocd, it segfaults when trying to access to the
> device (which is reasonable, as it's not correctly installed).
>
> Versions used:
> libusb: 0.12.2
> openocd: 0.2.0
>
> I've also tried to use libusb-filter, which however it's not the
> recommended method to install the driver, without luck.
>
> Do you have any clues on how to make it work?
> --
> Ing. Luca Ottaviano - lottaviano <at> develer.com
> Develer S.r.l. - http://www.develer.com/
> .hardware . software .innovation
> Tel.: +39 055 3986627 - ext.: 218
>
> [Version]
> Signature = "$Chicago$"
> provider  = %manufacturer%
> DriverVer = 07/07/2009,0.1.12.2
> CatalogFile = libusb.cat
> CatalogFile.NT = libusb.cat
> CatalogFile.NTAMD64 = libusb_x64.cat
>
> Class = LibUsbDevices
> ClassGUID = {EB781AAF-9C70-4523-A5DF-642A87ECA567}
>
> [ClassInstall]
> AddReg=libusb_class_install_add_reg
>
> [ClassInstall32]
> AddReg=libusb_class_install_add_reg
>
> [libusb_class_install_add_reg]
> HKR,,,,"LibUSB-Win32 Devices"
> HKR,,Icon,,"-20"
>
> [Manufacturer]
> %manufacturer%=Devices,NT
>
> ;--------------------------------------------------------------------------
> ; Files
> ;--------------------------------------------------------------------------
>
> [SourceDisksNames]
> 1 = "Libusb-Win32 Driver Installation Disk",,
>
> [SourceDisksFiles]
> libusb0.sys = 1,,
> libusb0.dll = 1,,
>
> [DestinationDirs]
> libusb_files_sys = 10,system32\drivers
> libusb_files_dll = 10,system32
>
> [libusb_files_sys]
> libusb0.sys
>
> [libusb_files_dll]
> libusb0.dll
>
> ;--------------------------------------------------------------------------
> ; Device driver
> ;--------------------------------------------------------------------------
>
> [LIBUSB_DEV]
> CopyFiles = libusb_files_sys, libusb_files_dll
> AddReg    = libusb_add_reg
>
> [LIBUSB_DEV.NT]
> CopyFiles = libusb_files_sys, libusb_files_dll
>
> [LIBUSB_DEV.HW]
> DelReg = libusb_del_reg_hw
> AddReg = libusb_add_reg_hw
>
> [LIBUSB_DEV.NT.HW]
> DelReg = libusb_del_reg_hw
> AddReg = libusb_add_reg_hw
>
> [LIBUSB_DEV.NT.Services]
> AddService = libusb0, 0x00000002, libusb_add_service
>
> [libusb_add_reg]
> HKR,,DevLoader,,*ntkern
> HKR,,NTMPDriver,,libusb0.sys
>
> ; Older versions of this .inf file installed filter drivers. They are not
> ; needed any more and must be removed
> [libusb_del_reg_hw]
> HKR,,LowerFilters
> HKR,,UpperFilters
>
> ; Device properties
> [libusb_add_reg_hw]
> HKR,,SurpriseRemovalOK, 0x00010001, 1
>
> ;--------------------------------------------------------------------------
> ; Services
> ;--------------------------------------------------------------------------
>
> [libusb_add_service]
> DisplayName    = "LibUsb-Win32 - Kernel Driver 07/07/2009, 0.1.12.2"
> ServiceType    = 1
> StartType      = 3
> ErrorControl   = 0
> ServiceBinary  = %12%\libusb0.sys
>
> ;--------------------------------------------------------------------------
> ; Devices
> ;--------------------------------------------------------------------------
>
> [Devices]
> "Amontec JTAGkey (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_00
> "Amontec JTAGkey (Channel B)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_01
>
> "egnite Turtelizer 2 (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_bdc8&MI_00
>
> "JTAG-lock-pick - USB <=> JTAG adapter"=LIBUSB_DEV,
> USB\VID_0403&PID_cff8&MI_00
>
> [Devices.NT]
> "Amontec JTAGkey (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_00
> "Amontec JTAGkey (Channel B)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_01
>
> "egnite Turtelizer 2 (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_bdc8&MI_00
>
> "JTAG-lock-pick - USB <=> JTAG adapter"=LIBUSB_DEV,
> USB\VID_0403&PID_cff8&MI_00
>
>
> ;--------------------------------------------------------------------------
> ; Strings
> ;--------------------------------------------------------------------------
>
> [Strings]
> manufacturer = "Amontec"
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Libusb-win32-devel mailing list
> Libusb-win32-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Xiaofan Chen | 28 Jul 2009 09:40
Picon

Re: Amontec JTAGkey and libusb under Vista 32-bit

On Mon, Jul 27, 2009 at 11:59 PM, Luca Ottaviano<lottaviano <at> develer.com> wrote:
> Hi all,
> I can't get a device recognized under Vista. I'm using Amontec JTAGkey
> to flash an embedded board using Openocd; the problem is that WinXp
> correctly recognizes the device, while Vista doesn't.

Is this Vista 32bit? Hopefully you are not using Vista 64bit.
Since nobody has donated the digital signature, libusb-win32
is not working for Vista 64.

> These are the what I'm doing to install the driver:
> - download binary distribution (libusb-win32-device-bin-0.1.12.2.tar.gz)
> - extract the archive and create an .inf file (see attachment) using inf
> wizard and edit to suit my system
> - attach the device; when prompted for drivers, use the directory bin/.
> The driver for both channels seem properly installed

Do you see any yellow mark? Do you find any errors
in Check %windir%\setupapi.log? For Vista, it may be
in %Windir%\Inf\.
http://msdn.microsoft.com/en-us/library/aa477114.aspx

> - run testlibusb-win, which will report the message "Couldn't retrieve
> descriptors"

What if you run as admin or disable UAC? This should not be a
problem but no harm trying.

> If I run testlibusb under WinXp, instead, I get the listing of all
> device's properties.
>
> If I try to run Openocd, it segfaults when trying to access to the
> device (which is reasonable, as it's not correctly installed).
>
> Versions used:
> libusb: 0.12.2
> openocd: 0.2.0

Actually I think it should not segfaults but rather quit while
complaining something. Please report this problem to the
OpenOCD mailing list.
http://lists.berlios.de/mailman/listinfo/openocd-development

> "Amontec JTAGkey (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_00
> "Amontec JTAGkey (Channel B)"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_01
>
>"egnite Turtelizer 2 (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_bdc8&MI_00
>
>"JTAG-lock-pick - USB <=> JTAG adapter"=LIBUSB_DEV, USB\VID_0403&PID_cff8&MI_00

I know the above inf file comes from Freddie Chopin to solve the problem
of USB composite device FT2232 based JTAG debuggers. For example,
Interface 0 of Turtelizer 2 is used for JTAG and interface 1 is for serial
port (using FTDI driver).

What happens if you change it to the following?
"Amontec JTAGkey (Channel A)"=LIBUSB_DEV, USB\VID_0403&PID_cff8"

Another option is to build your own OpenOCD from source using
the FTDI ftd2xx to see if it works under Vista.
http://forum.sparkfun.com/viewtopic.php?t=11221

Due to licensing issues, OpenOCD binary built with ftd2xx can no
longer be distributed without violating GPL.
http://openocd.berlios.de/web/?p=80

--

-- 
Xiaofan http://mcuee.blogspot.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

Gmane