Working with USB devices in .NET

前端 未结 12 1221
暖寄归人
暖寄归人 2020-11-27 10:56

Using .Net (C#), how can you work with USB devices?

How can you detect USB events (connections/disconnections) and how do you communicate with devices (read/write).

12条回答
  •  盖世英雄少女心
    2020-11-27 11:29

    I'd recommend LibUSBDotNet, the library I have been using for 2 years. If you have to work with an USB device (send requests, process responses), this library was the best solution I could find.

    Pros:

    • Has all methods you need to work in synch or asynch mode.
    • Source code provided
    • Enough samples to start using it straight away.

    Cons:

    • Poor documentation (it's common problem for open source projects). Basically, you can find just common description of methods in the CHM help file and that's it. But I still find provided samples and source code is enough for coding. Just sometimes I see a strange behaviour and want to know why it was implemented in this way and can't get even a hint...
    • Seems unsupported any more. Last version was issued in Oct 2010. And it's hard to get answers sometimes.

提交回复
热议问题