Coffeehouse Thread

9 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

C# and universal serial bus (USB)

Back to Forum: Coffeehouse
  • User profile image
    rezaElc87

    hi-

    I have spent hours in MDSN and I couldn't find any efficient method for communicating with USB using C#.

    I want to create an application to select an MP3 and send it to the circuit I have designed and connected to USB (AM modulator), and then receive and play it with a regular radio. so I need to define the USB to C# and I don't know how to do it.

    regards

  • User profile image
    evildictait​or
  • User profile image
    rezaElc87

    @evildictaitor:

    thanks, but I have already tried that. 

    no satisfactory results!!!

  • User profile image
    figuerres

    try this out:

    http://sourceforge.net/projects/libusbdotnet/

     

    PS:  USB via .net can in some cases need a bunch of work.

  • User profile image
    BitFlipper

    I'm new to USB programming on .Net as well. Specifically I need to communicate with this IO controller. The way that one works is that it uses a "CDC USB" driver that makes the USB port look like a regular old serial port, meaning the SerialPort class can be used to easily communicate with it (although don't be fooled by baud rate, stop bits etc as I believe it just ignores those settings - bandwidth is not limited to the baud rate).

    That controller came with its own driver but I'm sure you might be able to find a generic driver that can make the USB port look like a serial port. Look here for some info in CDC drivers.

  • User profile image
    figuerres

    , BitFlipper wrote

    I'm new to USB programming on .Net as well. Specifically I need to communicate with this IO controller. The way that one works is that it uses a "CDC USB" driver that makes the USB port look like a regular old serial port, meaning the SerialPort class can be used to easily communicate with it (although don't be fooled by baud rate, stop bits etc as I believe it just ignores those settings - bandwidth is not limited to the baud rate).

    That controller came with its own driver but I'm sure you might be able to find a generic driver that can make the USB port look like a serial port. Look here for some info in CDC drivers.

     

    USB Serial is good for a lot of stuff but then you lose a whole lot of what USB can do.

    just depends....

  • User profile image
    BitFlipper

    , figuerres wrote

    *snip* 

    USB Serial is good for a lot of stuff but then you lose a whole lot of what USB can do.

    just depends....

    True. That last link I gave shows a lot of different USB drivers you can use depending on how you want to use it. The CDC driver is just for the most basic read/write type of access. The advantage it has is that it already has .Net support. I'm not sure how many of those other drivers have .Net support.

  • User profile image
    figuerres

    Recenty i needed to talk to a USB Printer (not a normal desktop printer, a special Point of Sale /Kiosk One) and found it a real pain. I wish there was a better .Net library for that stuff.  the one i posted the link for can work but the developers are way more into custom device stuff and have no real info for just starting out ... they speak USB and C++ more than C# and .Net ... at least that's the best i can explain it.

  • User profile image
    jh71283

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.