Thread: C++ usb/serial package?

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    221

    C++ usb/serial package?

    does one exsist that helps communicate with the usb and/or serial port?
    if so where can it be found?

    thanks

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Which OS/Compiler?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    221
    microsoft visual studio.net
    or
    dev c++ for windows or gcc or linux (but im using cygwin so i dunno if its a TRUE linux evniornment)

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    The serial port isn't too hard. I don't have a reference at-hand, but as I recall, with Windows, you can open the port as a file. Try searching the board. There was a post about this awhile back. Any of the Windows "beyond" Win98 will block direct user-mode access to hardware addresses. So, I think opening the port as a file gets-around this.

    USB is another story. You have to write a driver, and this is advanced shtuff. I've never done it. (Again for Windows) You have to get the DDK (Driver Development Kit) and use the compiler & libraries that come with the DDK to write a kernel mode driver.

    There is a good introductory article about USB drivers in the current issue of Dr.Dobbs Journal. (That's NOT a link to the article... it's not online free. )

    There is also a good book on Windows Drivers by Walter Oney.

    [EDIT]-
    BeyondLogic.org has lots of information about interfacing.
    Last edited by DougDbug; 03-12-2004 at 01:15 PM.

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    There's an awsome C++ wrapper class for serial I/O under windows right here.

    gg

  6. #6
    Registered User
    Join Date
    Dec 2002
    Posts
    221
    Originally posted by Codeplug
    There's an awsome C++ wrapper class for serial I/O under windows right here.

    gg
    i shall try that

    thank you all for ur help

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to get RSSI value, send to sensor, sensor receive package, repackage it?
    By techissue2008 in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-04-2009, 10:13 AM
  2. Cannot install lrzsz package, please help
    By ssharish2005 in forum Tech Board
    Replies: 2
    Last Post: 06-20-2007, 05:36 AM
  3. 'portable' package
    By janklojo in forum C++ Programming
    Replies: 2
    Last Post: 12-22-2006, 01:58 PM
  4. C++ usb/serial package?
    By Hankyaku in forum C++ Programming
    Replies: 2
    Last Post: 12-08-2004, 12:39 PM
  5. Possible Loss of data
    By silicon in forum C Programming
    Replies: 3
    Last Post: 03-24-2004, 12:25 PM