Thread: read data from USB Port

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    1

    read data from USB Port

    hi
    i am new in this forum. I need to write a c or c++ program to read data from / write data to a USB port. can anyone please tell me the steps i need to follow to write the program.
    thank you in advance

  2. #2
    Registered User
    Join Date
    Sep 2009
    Location
    USA
    Posts
    63
    This is a good help..try searching the forum under usb

    Quote Originally Posted by MK27 View Post
    Hardware is a "kernel space" realm; the things you refer to are "user space" applications that rely on the kernel 100% to inform them.

    So, you could write a simple kernel module and that will be a sure fire, custom method if you want notification of USB events. But then you have to learn some kernel programming.

    On the other hand, I have not looked at the API for libusb. "kudbd" or whatever is a distro specific thing, maybe you could use that. There are more universal high level methods you could use such as putting a hook into the kernel log, or into /proc, both of which record USB events.

    Just keep googling and find a method that works for what you want to do...but on a low level, using the kernel C API is probably the only way.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I need help as soon as possible.
    By hyrule in forum C++ Programming
    Replies: 7
    Last Post: 11-09-2005, 05:49 PM
  2. Replies: 1
    Last Post: 09-10-2005, 06:02 AM
  3. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  4. how to make parallel port read data
    By lwong in forum Windows Programming
    Replies: 0
    Last Post: 01-05-2004, 08:14 PM
  5. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM

Tags for this Thread