From: Xiaofan C. <xia...@gm...> - 2010-08-18 23:51:19
|
On Thu, Aug 19, 2010 at 5:39 AM, Travis <tra...@co...> wrote: >> On 2010.08.18 21:01, Travis wrote: >>> 1) First find all the DeviceInterfaceGUIDs >>> 2) find all the DevicePaths for each device in each device interface GUID >>> 3) remove duplicate device paths and your golden. > >> Pete Batard wrote: >> That's what we do (and that was the really easy part to implement >> actually). If you have a closer look at set_device_paths, you'll see >> that this is what's actually going on there. >> The problem is that, when you also need to build the actual USB tree >> (find the parent child relations), it becomes slightly more complex... ;) >> > > lol.. agreed. Your dealing with a much more complex implementation. > > pbr298 is fixed. > Hmm, does not seem to work for me under Windows 7 x64. I will try to get the debug log this evening. D:\work\libusb1win32\Test>lsusb-with-open.exe 1d6b:0001 (bus 0, device 255) 046d:c058 (bus 0, device 1) 1234:0001 (bus 0, device 2) -12:Operation not supported or unimplemented on this platform failed opening device 1234:0001 D:\work\libusbdotnet\LibUsbDotNet_Bin.2.2.7>BenchmarkCon.exe vid=0x1234 pid=0x0001 driver=libusb-win32 LibUsbDotNet USB Benchmark v2.2.7.85 Copyright (c) 2010 Travis Robinson. <lib...@gm...> website: http://sourceforge.net/projects/libusbdotnet Benchmark device 1234:0001 opened.. Loop Test Information Vid / Pid : 1234h / 0001h Interface # : 00h Priority : Normal Buffer Size : 4096 Buffer Count : 1 Display Refresh : 1000 (ms) Transfer Timeout: 5000 (ms) Retry Count : 0 Verify Data : Off Bulk Read (Ep81h) max packet size: 64 Bulk Write (Ep01h) max packet size: 64 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: 510418.13 Transfers: 121 Bytes/s: 510418.13 Avg. Bytes/s: 510961.46 Transfers: 246 Bytes/s: 511488.51 Avg. Bytes/s: 510967.05 Transfers: 371 Bytes/s: 510978.04 qAvg. Bytes/s: 510581.72 Transfers: 495 Bytes/s: 509432.30 stopped Ep81h thread. stopped Ep01h thread. Loop Test Information Vid / Pid : 1234h / 0001h Interface # : 00h Priority : Normal Buffer Size : 4096 Buffer Count : 1 Display Refresh : 1000 (ms) Transfer Timeout: 5000 (ms) Retry Count : 0 Verify Data : Off Bulk Read (Ep81h) max packet size: 64 Total Bytes : 2031616 Total Transfers : 496 Avg. Bytes/sec : 510584.57 Elapsed Time : 3.98 seconds Bulk Write (Ep01h) max packet size: 64 Total Bytes : 2031616 Total Transfers : 496 Avg. Bytes/sec : 510584.57 Elapsed Time : 3.98 seconds Press any key to exit.. D:\work\libusbdotnet\LibUsbDotNet_Bin.2.2.7>BenchmarkCon.exe vid=0x1234 pid=0x0001 driver=winusb LibUsbDotNet USB Benchmark v2.2.7.85 Copyright (c) 2010 Travis Robinson. <lib...@gm...> website: http://sourceforge.net/projects/libusbdotnet Benchmark device 1234:0001 opened.. Loop Test Information Vid / Pid : 1234h / 0001h Interface # : 00h Priority : Normal Buffer Size : 4096 Buffer Count : 1 Display Refresh : 1000 (ms) Transfer Timeout: 5000 (ms) Retry Count : 0 Verify Data : Off Bulk Read (Ep81h) max packet size: 64 Bulk Write (Ep01h) max packet size: 64 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: 512000.00 Transfers: 117 Bytes/s: 512000.00 Avg. Bytes/s: 511471.62 Transfers: 242 Bytes/s: 510978.04 Avg. Bytes/s: 511477.37 Transfers: 367 Bytes/s: 511488.51 qstopped Ep81h thread. stopped Ep01h thread. Loop Test Information Vid / Pid : 1234h / 0001h Interface # : 00h Priority : Normal Buffer Size : 4096 Buffer Count : 1 Display Refresh : 1000 (ms) Transfer Timeout: 5000 (ms) Retry Count : 0 Verify Data : Off Bulk Read (Ep81h) max packet size: 64 Total Bytes : 2019328 Total Transfers : 493 Avg. Bytes/sec : 511610.84 Elapsed Time : 3.95 seconds Bulk Write (Ep01h) max packet size: 64 Total Bytes : 2019328 Total Transfers : 493 Avg. Bytes/sec : 511610.84 Elapsed Time : 3.95 seconds Press any key to exit.. D:\work\libusbdotnet\LibUsbDotNet_Bin.2.2.7>BenchmarkCon.exe vid=0x1234 pid=0x0001 driver=libusb10 LibUsbDotNet USB Benchmark v2.2.7.85 Copyright (c) 2010 Travis Robinson. <lib...@gm...> website: http://sourceforge.net/projects/libusbdotnet Unhandled Exception: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at MonoLibUsb.MonoUsbApi.Init(IntPtr& pContext) at MonoLibUsb.MonoUsbSessionHandle..ctor() at MonoLibUsb.MonoUsbEventHandler.Init(UnixNativeTimeval unixNativeTimeval) at MonoLibUsb.MonoUsbEventHandler.Init() at MonoLibUsb.MonoUsbApi.InitAndStart() at LibUsbDotNet.LudnMonoLibUsb.MonoUsbDevice.get_MonoUsbDeviceList() at LibUsbDotNet.UsbDevice.get_AllLibUsbDevices() at LibUsbDotNet.BenchmarkConsole2.GetBenchmarkDeviceList(BENCHMARK_TEST_PARAM testParam) at LibUsbDotNet.BenchmarkConsole2.Bench_Open(BENCHMARK_TEST_PARAM test) at LibUsbDotNet.BenchmarkConsole2.Main(String[] argv) -- Xiaofan |