LibUsbDotNet read write USB Port
-
Hello guys, I am struggling for 3 days now with the problem of reading and writing form/to an usb port. For this I tried to use LibUsbDotNet. The library has a very nice and at first I though useful documentation. My problem is that I cannot reference the UsbDevice object that I want to use. I tried to iterate through the UsbDeviceList but have no success because the List is empty (I cannot understand why) . I tried with different sticks and card reader device and the result is the same the DeviceList is empty obviosly I doing something wrong but I cannot figure what .
UsbDeviceList usbDeviceList = new UsbDeviceList(); IEnumerator enumerator = usbDeviceList.GetEnumerator(); while (enumerator.MoveNext()) { usbDevice = enumerator.Current; if (usbDevice.Info.IdVendor == infoDevice.IdVendor) break; }
LibUsbDotNew Library[^] Hope some of you worked with this library and cam help me with some useful tips. Thanks -
Hello guys, I am struggling for 3 days now with the problem of reading and writing form/to an usb port. For this I tried to use LibUsbDotNet. The library has a very nice and at first I though useful documentation. My problem is that I cannot reference the UsbDevice object that I want to use. I tried to iterate through the UsbDeviceList but have no success because the List is empty (I cannot understand why) . I tried with different sticks and card reader device and the result is the same the DeviceList is empty obviosly I doing something wrong but I cannot figure what .
UsbDeviceList usbDeviceList = new UsbDeviceList(); IEnumerator enumerator = usbDeviceList.GetEnumerator(); while (enumerator.MoveNext()) { usbDevice = enumerator.Current; if (usbDevice.Info.IdVendor == infoDevice.IdVendor) break; }
LibUsbDotNew Library[^] Hope some of you worked with this library and cam help me with some useful tips. ThanksTry this: http://www.icsharpcode.net/OpenSource/SharpUSBLib/default.aspx[^] but it will need this installed: http://libusb-win32.sourceforge.net/[^] I've tried it in 2 previous projects and it works like a charm. I haven't tried LibUsbDotNet so I can't help you with that one, sorry.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "You're an idiot." John Simmons, THE Outlaw programmer "I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon
-
Try this: http://www.icsharpcode.net/OpenSource/SharpUSBLib/default.aspx[^] but it will need this installed: http://libusb-win32.sourceforge.net/[^] I've tried it in 2 previous projects and it works like a charm. I haven't tried LibUsbDotNet so I can't help you with that one, sorry.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "You're an idiot." John Simmons, THE Outlaw programmer "I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon
First I did not wnat to use that library but seems that I have no other sollution. The problem with that library is that I didn't find a decent documentation and that it isn't maintained anymore. Also you need to install the LibUSBwin 32 first ... If you have some documentation or if you know a link please send a reply Thanks.
-
First I did not wnat to use that library but seems that I have no other sollution. The problem with that library is that I didn't find a decent documentation and that it isn't maintained anymore. Also you need to install the LibUSBwin 32 first ... If you have some documentation or if you know a link please send a reply Thanks.
Sadly, no. The projects were accomplished by looking at the samples that came with the download, that gave me an idea of what to do. Their object model isn't convoluted at all from what I remember.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "You're an idiot." John Simmons, THE Outlaw programmer "I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon
-
Sadly, no. The projects were accomplished by looking at the samples that came with the download, that gave me an idea of what to do. Their object model isn't convoluted at all from what I remember.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "You're an idiot." John Simmons, THE Outlaw programmer "I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon