winusbnet | WinUSB .NET wrapper library | Form library

 by   madwizard-thomas C# Version: v2.1.0 License: Non-SPDX

kandi X-RAY | winusbnet Summary

kandi X-RAY | winusbnet Summary

winusbnet is a C# library typically used in User Interface, Form, Xamarin applications. winusbnet has no bugs, it has no vulnerabilities and it has low support. However winusbnet has a Non-SPDX License. You can download it from GitHub.

WinUSBNet is a .NET class library that provides easy access to the WinUSB API from C#, VB.NET and other .NET languages. WinUSB is a user mode API available for Windows XP, Vista and 7 (XP will require an update), allowing low level access to USB devices such as control transfers and reading from and writing to endpoints. Please note that there is at least one different project with the same name (at codeplex), this libary is not related.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              winusbnet has a low active ecosystem.
              It has 104 star(s) with 47 fork(s). There are 18 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 6 open issues and 25 have been closed. On average issues are closed in 117 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of winusbnet is v2.1.0

            kandi-Quality Quality

              winusbnet has 0 bugs and 0 code smells.

            kandi-Security Security

              winusbnet has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              winusbnet code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              winusbnet has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              winusbnet releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of winusbnet
            Get all kandi verified functions for this library.

            winusbnet Key Features

            No Key Features are available at this moment for winusbnet.

            winusbnet Examples and Code Snippets

            No Code Snippets are available at this moment for winusbnet.

            Community Discussions

            Trending Discussions on winusbnet

            QUESTION

            Windows API USB IO (winusb.dll)
            Asked 2018-Dec-28 at 05:56

            Edit: This question evolved over time. The basic question was about how to connect to a and read/write to/from a USB device in Windows. Eventually I answered the question with the help of @benvoigt.

            I have written a Hid library which writes and reads to/from Hid USB devices. It works well. However, the device I am connecting to has switched from Hid access to vanilla USB. The Hid code does not work when connecting to the different type of device. My aim now is to connect to the USB interface (as opposed to the Hid interface) and read/write to/from it.

            On all platforms that access USB, we have to query the interfaces that exist for the USB device, and then "claim" an interface for reading and writing. Here is some code from a LibUsbDotNet sample (LibUsb is a working C USB library and LibUsbDotNet wraps it) https://github.com/LibUsbDotNet/LibUsbDotNet/blob/master/src/Examples/Read.Write/ReadWrite.cs.

            ...

            ANSWER

            Answered 2018-Dec-26 at 21:47

            Well, the weirdness you are seeing around 64 byte transfers is well known:

            Delimiting write transfers with short packets

            The USB driver stack driver does not impose the same restrictions on packet size, when writing to the device, that it imposes when reading from the device. Some client drivers must make frequent transmissions of small quantities of control data to manage their devices. It is impractical to restrict data transmissions to packets of uniform size in such cases. Therefore, the driver stack does not assign any special significance to packets of size less than the endpoint's maximum size during data writes. This allows a client driver to break a large transfer to the device into multiple URBs of any size less than or equal to the maximum.

            The driver must either end the transmission by means of a packet of less than maximum size, or delimit the end of the transmission by means of a zero-length packet. The transmission is not complete until the driver sends a packet smaller than wMaxPacketSize. If the transfer size is an exact multiple of the maximum, the driver must send a zero-length delimiting packet to explicitly terminate the transfer

            Delimiting the data transmission with zero-length packets, as required by the USB specification, is the responsibility of the client driver. The USB driver stack does not generate these packets automatically.

            From USB Transfer and Packet Sizes on MSDN

            As for the rest... depending on whether the device declares itself to be a composite device or not, Windows's driver loader will pick either one or multiple device drivers to connect to the device. Those drivers handle choosing which endpoint on the device to talk to. So from userspace, it is normally enough to open the driver interface and begin doing I/O. The HID class driver, for example, knows how to identify and enable the HID endpoint.

            Since you have things working with UWP, it seems likely that you have the WinUSB driver loaded (since that's Step #1). Therefore you'll use the WinUSB API to talk to it.

            Here's the documentation for the C and C++ API for WinUSB. It has examples of endpoint setup, and looks quite a bit less messy than the libusb code you quoted (although that may have to do with code formatting and style as well).

            Source https://stackoverflow.com/questions/53689682

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install winusbnet

            You can download it from GitHub.

            Support

            Library reference onlineOnline wiki with short howtoChangelogWinUSB overviewHow to Access a USB Device by Using WinUSB FunctionsJan Axelson's page on WinUSB
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/madwizard-thomas/winusbnet.git

          • CLI

            gh repo clone madwizard-thomas/winusbnet

          • sshUrl

            git@github.com:madwizard-thomas/winusbnet.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link