Sending, receiving through the USB interface
Ok. I need help bad. I am trying to make a program that will receive data through a USB port, and then retransmit it accross TCP/IP, so a client can talk with the device over TCP/IP.
I don't know anything about USB. So how do I talk to a USB device (say I want to get raw input from a keyboard... I know, I can do this simpler ways, but this is just an example, and the only USB device I have at the moment in which I can talk with) in an OS independant way. If there aren't any good libraries for USB that are OSI, I'll just write my code so it is OSI by using native Windows and Linux and Mac drivers. I must do this. I must do it relitivly soon. I don't know even where to start. Please help me!!! |
What you are asking about sounds like the usbnet driver.
http://www.linux-usb.org/usbnet/ |
Sorry, when I re-read your post, I realize I misunderstood what you wanted. If you are talking about a device such as the keyboard or the mouse, then you can do that using x-windows. For example, using the secure shell, you can forward x-windows events.
Also, remember the Unix design philosophy that everything is a file. So you can redirect the output of an audio device for example to a socket. However whatever you do should be going through the secure shell, or one or the other computer will be wide open. This link should help some: http://howtos.linux.com/guides/abs-guide/devref1.shtml |
What is wrong with this code?
Code:
#include <stdio.h> |
Here is a site on a library you may want to use when it it released.
http://libusb.sourceforge.net/doc/index.html Also, here is a Linux USB Programmers Guide that may help you. Sorry I haven't supplied a specific answer to your question, but I'm not qualified enough to do that. However, does your code run as root? |
I didn't include a link in my previous post.
http://wwwbode.cs.tum.edu/Par/arch/usb/usbdoc/ This is a programmers guide from a University site. |
All times are GMT -5. The time now is 12:53 AM. |