How to read USB devices?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: How to read USB devices?

  1. #1
    Join Date
    Jan 2008
    Posts
    3

    How to read USB devices?

    I have a USB controller that plugs in and can be used for various things. It has it's own drivers that are installed and it's a Microsoft product. I'm wondering how, with C++ , I can read the data sent from the USB device?

    What I want to do in the long term is create a C++ app that can be converted into a browser plugin that will read this USB device. Basically, it's going to end up being a Flash game that reads a USB controller...

    Can anyone help me with reading this device?

    I've been searching high and low. I'm not a very very experienced C++ programmer, but I'm familiar with syntax.. I'm fluent in PHP, VB, know a fair amount ASP, and have experimented a bit with C++. So I can know what you're talking about, but don't assume I'm a fluent C++ programmer cause I'm not.. yet.


    Thanks!

  2. #2
    Join Date
    Jan 2008
    Posts
    3

    Re: How to read USB devices?

    I'm using Visual Studio 2005

  3. #3
    Join Date
    Oct 2005
    Posts
    199

    Re: How to read USB devices?

    You should read the manual to see if there is any description of the API of the device. Without knowing what kind of stuff goes in or comes out, it is quite impossible to know how to control anything.

    Some USB device drivers create virtual COM-port that can be used to read/write data between computer and the device.
    'You help me, and I, in turn, am helped by you!'
    -H.S.

  4. #4
    Join Date
    Jan 2008
    Posts
    3

    Re: How to read USB devices?

    Well there is no actual documentation I can find. It's an XBOX controller so it's made by microsoft and it works via USB with some of their products or whatnot, but I don't know how to use it. There's not actual programming guide that I know of for it, but I've used a USB sniffer and seen the packets back and forth if that helps.

  5. #5
    Join Date
    Nov 2007
    Posts
    613

  6. #6
    Join Date
    Apr 2008
    Posts
    6

    Re: How to read USB devices?

    hello there

    I am having similar difficulties in interfacing with a usb device using C++. Did you have any luck on your behalf on getting that to work? If so could you please help me out by pointing me in the right direction as to how to interface with a usb device ??

  7. #7
    Join Date
    Feb 2008
    Posts
    65

    Re: How to read USB devices?

    I recently bought a USB interface device to learn how to program such an application. The sample software that was supplied with the board is written in Visual Basic so I converted it to CSharp. I have it working in a Forms Application for testing and then I incorporated the USB interface code into a Console Morse Code Application.
    The following URLs are a place to start if you choose to get a board for learning purposes.
    Good luck in learning how to do the interface.

    http://www.elexp.com/tst_bkit.htm

    http://www.delcom-eng.com/downloads/USBPRGMNL.pdf

  8. #8
    Join Date
    Apr 2008
    Posts
    6

    Re: How to read USB devices?

    Thanks a lot Jim
    the pdf file you linked is awesome!!

    Goodluck to you too!

  9. #9
    Join Date
    Feb 2008
    Posts
    65

    Re: How to read USB devices?

    Glad the link was of some use to you.The following link describes the packets that the USB controllers in Delcom products recognize and respond to. I am sure that the device that you want to interface to uses different commands, but the Delcom info might be helpful to you.

    http://www.delcom-eng.com/downloads/USBIODS.pdf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center