Zak Escano | 1 Feb 2012 01:21

Re: saving enumerated devices

Thanks Vitali, that's what I ended up doing.
 
I wasn't after an automated way of detecting changes between scans, I just wanted to know how I could differentiate between devices over different scans, handling devices being added and removed. After reading through the source of libusb-win32 I decided that saving the "filename" of each device externally and comparing that after a rescan was the only safe way to do so.

On Tue, Jan 31, 2012 at 5:40 PM, Vitali Lovich <vlovich <at> gmail.com> wrote:
You can also just set up a timer to poll.  But yes - you're likely to
get garbage with libusb-win32.  You should be able to use the file
path within the device structure in libusb-win32 as the cookie to use
to find devices between scans.

-Vitali

On Fri, Jan 27, 2012 at 2:20 AM, Xiaofan Chen <xiaofanc <at> gmail.com> wrote:
> On Wed, Jan 25, 2012 at 6:59 AM, Zak Escano <zak <at> dxeltd.com> wrote:
>> I do want to use libusb-win32, I am not so concerned about hot-plugging, I
>> just want to user to be able to plug in the device after starting the app,
>> without having to close and restart the app. In my app I will show a list of
>> devices in the gui and have a button near the list allowing to "rescan for
>> devices" if the user notices their device isn't on the list and so plugs in
>> their device.
>
> It that case, you probably want to use setupapi (out of libusb-win32)
> to handle the task.
>
> There are examples here which shows how how to use
> RegisterDeviceNotification and WM_DEVICE_CHANGE
> messages to detect when a device is attached or removed.
> http://www.lvr.com/hidpage.htms
>
>
> --
> Xiaofan
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Libusb-win32-devel mailing list
> Libusb-win32-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Winson Yung | 1 Feb 2012 04:59
Picon

usb_bulk_write() sending 512byte data timeout

Hi all, I recently downloaded libusb-win32-bin-1.2.6.0 so that I can
use it to build a windows application for bulk transfer testing under
Windows 7. One thing I noticed when calling usb_bulk_write(), usb
write timeout if data size is 512bytes. However if data size is
64bytes or 10 bytes, timeout error never occur. I used the bulk.c file
located under examples folder as the baseline for my test app, and I
have purposely disable using async bulk transfer.

On the USB device side, I have descriptor setup for handling max
64byte for full speed, and 512byte for high speed. So is the problem I
am seeing because host test app only setup with device in USB full
speed mode, therefore limit the max packet transfer to 64bytes? If so,
how do I choose to setup USB high speed mode with device in the test
app?

Thanks in advance for the help

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Xiaofan Chen | 1 Feb 2012 07:55
Picon

Re: usb_bulk_write() sending 512byte data timeout

On Wed, Feb 1, 2012 at 11:59 AM, Winson Yung <winson.yung <at> gmail.com> wrote:
> Hi all, I recently downloaded libusb-win32-bin-1.2.6.0 so that I can
> use it to build a windows application for bulk transfer testing under
> Windows 7. One thing I noticed when calling usb_bulk_write(), usb
> write timeout if data size is 512bytes. However if data size is
> 64bytes or 10 bytes, timeout error never occur. I used the bulk.c file
> located under examples folder as the baseline for my test app, and I
> have purposely disable using async bulk transfer.
>
> On the USB device side, I have descriptor setup for handling max
> 64byte for full speed, and 512byte for high speed. So is the problem I
> am seeing because host test app only setup with device in USB full
> speed mode, therefore limit the max packet transfer to 64bytes? If so,
> how do I choose to setup USB high speed mode with device in the test
> app?
>
> Thanks in advance for the help

You asked in libusb mailing list as well. Here is my answer there.

You do not choose the USB high speed mode with your application.
The OS will choose the high speed mode or full speed mode.
You can use USBView to check whether the system recognizes
your device as full speed or high speed.
http://www.ftdichip.com/Support/Utilities.htm
http://www.ftdichip.com/Support/Utilities/usbview.zip

--

-- 
Xiaofan

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Nik Kov | 1 Feb 2012 08:38
Picon

Re: libusbK: Isochronous OUT

Hello all!

Has someone really working code isochronous OUT for windows with libusbK?

Nikolay

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Travis | 2 Feb 2012 15:32
Picon

Re: libusbK: Isochronous OUT

On 1/31/2012 11:38 PM, Nik Kov wrote:
> Hello all!
>
> Has someone really working code isochronous OUT for windows with libusbK?
>

I actually do not have any examples that use the UsbK_IsoWritePipe() 
function; I will try and add one before the next release.

On the other hand, generally the regular UsbK_WritePipe() function is 
sufficient for ISO OUT endpoints.

I use the MCP benchmark firmware to test most of the ISO codes.  Below 
is the console output and the driver log for an HS, ISO, 1024 byte OUT ep.

Regards,
Travis

Z:>kbench write list altf=6 ep=0x6 notestselect buffersize=8192
device-count=1
1. CY-Stream (USB\VID_0404&PID_1003\10000000) [libusbK]
Select device (1-1) :1

opened CY-Stream (USB\VID_0404&PID_1003\10000000)..
Write Test Information
         Driver          : libusbK
         Vid / Pid       : 0404h / 1003h
         DevicePath      : 
\\?\USB#VID_0404&PID_1003#10000000#{cdc626e8-e538-5ac6-23a8-2b5ad5c1963b}
         Device Speed    : High
         Interface #     : 00h
         Alt Interface # : 06h
         Num Endpoints   : 2
         Priority        : 0
         Read Size       : 8192
         Write Size      : 8192
         Buffer Count    : 2
         Display Refresh : 1000 (ms)
         Transfer Timeout: 5000 (ms)
         Retry Count     : 0
         Verify Data     : Off

Isochronous Write (Ep06h) max packet size: 1024

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 8200208.42 Transfers: 999 Bytes/s: 8200208.42
Avg. Bytes/s: 8196071.57 Transfers: 2013 Bytes/s: 8192000.00
Avg. Bytes/s: 8194707.20 Transfers: 3027 Bytes/s: 8192000.00
Avg. Bytes/s: 8194027.72 Transfers: 4041 Bytes/s: 8192000.00
Avg. Bytes/s: 8193620.89 Transfers: 5055 Bytes/s: 8192000.00
Avg. Bytes/s: 8193350.03 Transfers: 6069 Bytes/s: 8192000.00
Avg. Bytes/s: 8193156.74 Transfers: 7083 Bytes/s: 8192000.00
Avg. Bytes/s: 8193011.86 Transfers: 8097 Bytes/s: 8192000.00
waiting for Ep06h thread..
stopped Ep06h thread.   ExitCode=0
Write Test Information
         Driver          : libusbK
         Vid / Pid       : 0404h / 1003h
         DevicePath      : 
\\?\USB#VID_0404&PID_1003#10000000#{cdc626e8-e538-5ac6-23a8-2b5ad5c1963b}
         Device Speed    : High
         Interface #     : 00h
         Alt Interface # : 06h
         Num Endpoints   : 2
         Priority        : 0
         Read Size       : 8192
         Write Size      : 8192
         Buffer Count    : 2
         Display Refresh : 1000 (ms)
         Transfer Timeout: 5000 (ms)
         Retry Count     : 0
         Verify Data     : Off

Isochronous Write (Ep06h) max packet size: 1024
         Total Bytes     : 66338816
         Total Transfers : 8098
         Avg. Bytes/sec  : 8177861.93
         Elapsed Time    : 8.11 seconds

Press any key to exit..

[DriverEntry](libusbK.sys) v3.0.5.2 built-on: Jan 28 2012 16:54:25
(libusbK.sys)[Registry_ReadAllDeviceKeys] Found 1 DeviceInterfaceGUIDs 
strings.
(libusbK.sys)[Device_OnAdd] [dev-id=#1] 
SymbolicLink=\DosDevices\libusb0-0255
(libusbK.sys)[Device_OnAdd] [dev-id=#1] assigned DeviceInterfaceGUID 
{CDC626E8-E538-5AC6-23A8-2B5AD5C1963B}.
(libusbK.sys)[Device_Create] DeviceSpeed=High RemoteWakeCapable=True 
SelfPowered=False
(libusbK.sys)[Device_Configure] Using single interface configuration..
(libusbK.sys)[Pipe_InitContext] pipeID=00h Creating pipe queue.
(libusbK.sys)[Pipe_InitContext] pipeID=00h queue starting..
(libusbK.sys)[Interface_InitContext] configured Read pipe: PipeID=82h 
MaximumPacketSize=512 MaximumTransferSize=2097152 PipeType=Bulk
(libusbK.sys)[Pipe_InitContext] pipeID=82h Creating pipe queue.
(libusbK.sys)[Pipe_InitQueue] Configuring sequential queue..
(libusbK.sys)[Pipe_InitContext] pipeID=82h starting..
(libusbK.sys)[Pipe_InitContext] pipeID=82h queue starting..
(libusbK.sys)[Device_OnD0Entry] Entering D0. Leaving D4.
AllK required contiguous memory = 146784 (64bit)
   8 HotK Handles: HandleSize 2112 PoolSize 16904 (bytes)
   64 LstK Handles: HandleSize 64 PoolSize 4104 (bytes)
   128 LstInfoK Handles: HandleSize 56 PoolSize 7176 (bytes)
   64 UsbK Handles: HandleSize 96 PoolSize 6152 (bytes)
   32 DevK Handles: HandleSize 112 PoolSize 3592 (bytes)
   1024 OvlK Handles: HandleSize 96 PoolSize 98312 (bytes)
   64 OvlPoolK Handles: HandleSize 80 PoolSize 5128 (bytes)
   32 StmK Handles: HandleSize 168 PoolSize 5384 (bytes)
KLST_DEVINFO = 2332 bytes
(libusbK.sys)[Device_OnFileCreate] begins
(libusbK.sys)[Device_OnFileCreate] ends
(libusbK.lib)[k_Init_Version] libusbK.sys v3.0.5.2
(libusbK.sys)[XferCtrl] bmDir=DeviceToHost(1) bmType=Standard(0) 
bmRecipient=Device(0) bmReserved=000 bRequest=6 wIndex=0 wValue=512 
wLength=0
(libusbK.sys)[XferCtrl] bmDir=DeviceToHost(1) bmType=Standard(0) 
bmRecipient=Device(0) bmReserved=000 bRequest=6 wIndex=0 wValue=512 
wLength=0
(libusbK.sys)[XferCtrl] bmDir=DeviceToHost(1) bmType=Standard(0) 
bmRecipient=Device(0) bmReserved=000 bRequest=6 wIndex=0 wValue=256 
wLength=0
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1 
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1 
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 2 
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1 
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1 
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1 
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 2 
does not exists.
(libusbK.sys)[Interface_SetAltSetting] selected alt setting index 6 on 
interface number 0
(libusbK.sys)[Interface_DeletePipeQueues] pipeID=82h Destroying pipe queue.
(libusbK.sys)[Interface_InitContext] configured Read pipe: PipeID=82h 
MaximumPacketSize=1024 MaximumTransferSize=1048576 PipeType=Isochronous
(libusbK.sys)[Interface_InitContext] configured Write pipe: PipeID=06h 
MaximumPacketSize=1024 MaximumTransferSize=1048576 PipeType=Isochronous
(libusbK.sys)[Pipe_InitContext] pipeID=82h Creating pipe queue.
(libusbK.sys)[Pipe_InitQueue] Configuring parallel queue..
(libusbK.sys)[Pipe_InitContext] pipeID=82h starting..
(libusbK.sys)[Pipe_InitContext] pipeID=82h queue starting..
(libusbK.sys)[Pipe_InitContext] pipeID=06h Creating pipe queue.
(libusbK.sys)[Pipe_InitQueue] Configuring parallel queue..
(libusbK.sys)[Pipe_InitContext] pipeID=06h starting..
(libusbK.sys)[Pipe_InitContext] pipeID=06h queue starting..
(libusbK.sys)[DefaultQueue_OnIoControl] QueryDeviceInformation: 
informationType=01h valueLength=4
(libusbK.sys)[Pipe_Reset] pipeID=06h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF817Dh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF817Eh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF817Fh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8180h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8181h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8182h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8183h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8184h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8185h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8186h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8187h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8188h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8189h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Ah 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Bh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Ch 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Dh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Eh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Fh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8190h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8191h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8192h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8193h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8194h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8195h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8196h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8197h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8198h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8199h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Ah 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Bh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Ch 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Dh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Eh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Fh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A0h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A1h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A2h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A3h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A4h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A5h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A6h 
Errors=0 Status=00000000h
..snip..
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94EEh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94EFh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F0h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F1h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F2h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F3h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F4h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F5h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F6h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F7h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F8h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F9h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FAh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FBh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FCh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FDh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FEh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FFh 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF9500h 
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF9501h 
Errors=0 Status=00000000h
(libusbK.sys)[Pipe_Abort] pipeID=06h
(libusbK.sys)[Pipe_Abort] pipeID=06h
[WRN](libusbK.sys)[XferIsoWrComplete] [Cancelled] PipeID=06h 
Status=C0000120h
(libusbK.sys)[Interface_ReleaseAll] releasing all interfaces bound to 
file object 0xb8c8850
(libusbK.sys)[Device_OnFileClose] OpenedFileHandleCount=0

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Xiaofan Chen | 4 Feb 2012 04:51
Picon

Re: saving enumerated devices

On Wed, Feb 1, 2012 at 8:21 AM, Zak Escano <zak <at> dxeltd.com> wrote:
> Thanks Vitali, that's what I ended up doing.
>
> I wasn't after an automated way of detecting changes between scans, I just
> wanted to know how I could differentiate between devices over different
> scans, handling devices being added and removed. After reading through the
> source of libusb-win32 I decided that saving the "filename" of each device
> externally and comparing that after a rescan was the only safe way to do so.

Thanks for the updates. Just wondering if this works well or not under
the following cases.
1) You have a few device with the same VID/PID but no
serial number.
2) You have a few device with the same VID/PID but with unique
serial number.
3) You unplug a device with no serial number into a different
USB port.

--

-- 
Xiaofan

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
nikkov | 4 Feb 2012 06:11
Picon

Re: libusbK: Isochronous OUT

Thank you Travis!

I found problem in USB sniffer. Now I use usblyzer and all OK!
I previously use USBTrace and USBTrace did not show the packet size if I run
my program with libusbk but did show the packet size if used usb audio
driver.

Nikolay

--
View this message in context: http://libusb.6.n5.nabble.com/libusbK-Isochronous-OUT-tp5434629p5455767.html
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Travis | 4 Feb 2012 16:59
Picon

Re: libusbK: Isochronous OUT

On 2/3/2012 9:11 PM, nikkov wrote:
> Thank you Travis!
>
> I found problem in USB sniffer. Now I use usblyzer and all OK!
> I previously use USBTrace and USBTrace did not show the packet size if I run
> my program with libusbk but did show the packet size if used usb audio
> driver.
>

Glad you are having some success.

If we are talking about the packet length field of the individual ISO 
packets then libusbK will always set it to 0 before submitting.  This 
field is not assigned by the user.  It is set by the host after 
completing a transfer to an IN EP only.  It indicates the number of 
bytes that were actually accepted by the device.
http://msdn.microsoft.com/en-us/library/windows/hardware/ff539084%28v=vs.85%29.aspx

Some drivers set this length field for IN and OUT transfers before 
subitting.  I believe libusb-win32 does, and apparently so does the usb 
audio driver. ;)  ..but it is not needed.

Regards,
Travis

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Toni | 6 Feb 2012 07:34
Picon

Problem

Hi,

First of lemme tell you how happy I am I've found your project, it's made a lot of things possible. However I have a small problem, as an AVR programmer I'd like to use USBasp programmer that utilizes your libusb. I'm running Windows 7 64bit and I have yet to succeed with installing a driver via your software.

Every time, after following each step on how to use your inf-wizard the device manager just tells me to try again since the inf file that i'm pointing it to doesn't seam to work with x64 Windows. Many of the other users did the same steps as I did yet somehow it works for them and not for me.

My windows are fully updated, I've used 1.2.6 version of the driver.

I hope that you might suggest some kind of a solution to this problem.

Thank you in advance.

Toni Kostelac

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Travis | 6 Feb 2012 08:07
Picon

Re: Problem

On 2/5/2012 10:34 PM, Toni wrote:
>
>     Hi,
>
>     First of lemme tell you how happy I am I've found your project,
>     it's made a lot of things possible. However I have a small
>     problem, as an AVR programmer I'd like to use USBasp programmer
>     that utilizes your libusb. I'm running Windows 7 64bit and I have
>     yet to succeed with installing a driver via your software.
>
>     Every time, after following each step on how to use your
>     inf-wizard the device manager just tells me to try again since the
>     inf file that i'm pointing it to doesn't seam to work with x64
>     Windows. Many of the other users did the same steps as I did yet
>     somehow it works for them and not for me.
>
>     My windows are fully updated, I've used 1.2.6 version of the driver.
>
>     I hope that you might suggest some kind of a solution to this problem.
>

Try the libusbK InfWizard here:
http://code.google.com/p/usb-travis/downloads/list
Download the newest "bin" package and run libusbK-inf-wizard.exe.

1) On the first page, select the libusb-win32 driver.

2) On the second page, connect your device then select it in the list. 
(you may have to click "Show All Devices")

3) On the final page, click "Open Package Folder" and execute 
InstallDriver.exe

If the installation fails, post your dpinst.log located in the main 
windows directory. eg: C:\WINDOWS\DPINST.LOG

Regards,
Travis

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2

Gmane