Thread: How to write program for Serial and USB which connect to external hardware?

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    81

    Question How to write program for Serial and USB which connect to external hardware?

    I am new to hardware programming.

    I need to write a program for reading data from Card Reader which connects to the PC windows 2000/XP OS through Interfacing The Serial / RS-232 Port / USB / Bluetooth / Infrared.

    May I ask does serial port equal to com port?

    The program needs to read and write data of the smart card which places on top of the card reader. The card reader has serveral models, they support Serial / RS-232 Port / USB / Bluetooth / Infrared.

    After reading the data, the data will be passed to server's database through internal network.

    On the other hand, the program can write data to the card through card reader.

    Now, I want to know

    Which programming language, SDK and IDE should I use? The program is only running on windows OS.

    Languages: C++ / VC++ / VC.net / C# / J2SE

    IDE: VC++ 6.0 / Borland C++ Builder / VS.net

    I downloaded a Serial SDK from http://home.arcor.de/groschh/SerToolInfo.htm, but how can I use it?

    Any online tutorial, code sample or open source project are available?

    Please advise.


  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > I downloaded a Serial SDK from http://home.arcor.de/groschh/SerToolInfo.htm, but how can I use it?
    I don't think it's an SDK at all.
    From what I understand, it's just a replacement for hyperterm, with some additional features to make debugging serial line problems (so in that respect, its worth having).

    It should be easy (easier) to just plug your device into the serial port, and use this tool to play with the device (practice sending it commands, and getting responses). Once you're familiar with it, then you can start putting those ideas in code.

    > May I ask does serial port equal to com port?
    Yes, RS-232 is COM1 in DOS/Window-speak.
    Windows has support for those other device types as well, but I don't know how you would go about accessing them.
    The way you talk to COM1 in win32 is by using this
    http://msdn.microsoft.com/library/de...createfile.asp
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. USB Connect
    By CorX in forum Networking/Device Communication
    Replies: 3
    Last Post: 05-12-2009, 09:50 AM
  2. Write protecting USB drive
    By stevesmithx in forum Tech Board
    Replies: 8
    Last Post: 01-17-2009, 04:37 PM
  3. usb webcam program
    By i589b in forum C++ Programming
    Replies: 4
    Last Post: 11-05-2008, 10:51 AM
  4. USB hardware...
    By Coder87C in forum Windows Programming
    Replies: 0
    Last Post: 03-10-2004, 11:10 PM
  5. Will linux support this hardware?
    By Leeman_s in forum Linux Programming
    Replies: 0
    Last Post: 01-19-2003, 01:30 PM