Access USB or Serial in C#

15,184

Solution 1

Example of simple usb app here.

Use the serial port class, found here for serial port.

Decent example of LPT here.

Solution 2

For accessing USB ports you can use LibUsbDotNet library

Share:
15,184
Arlen Beiler
Author by

Arlen Beiler

I like programming, astronomy, history, language, and music. Come unto me, all ye that labor and are heavy laden, and I will give you rest. Take my yoke upon you and learn of me for I am meek and lowly in heart and ye shall find rest unto your soul. For my yoke is easy and my burden is light.

Updated on June 04, 2022

Comments

  • Arlen Beiler
    Arlen Beiler almost 2 years

    How do I send and receive via USB in C#? And what about Serial and LPT?

  • GorillaApe
    GorillaApe almost 12 years
    i think that this is a bit misleading as it is for HID usb not all usb ports
  • Gabe
    Gabe almost 12 years
    @Parhs, OP selected this as the answer to question. Doesn't sound like they were mislead.
  • fnc12
    fnc12 over 7 years
    Links are invalid
  • Gabe
    Gabe over 7 years
    @fnc12, Only one link is missing and considering this was posted six years ago I am not surprised.
  • jp2code
    jp2code over 5 years
    @Gabe, can you post an updated link, please?