Re: Simple USB raw data drivers or APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Jan 2010, Ron Madrid wrote:

> Hello all,
> 
> I am working with a custom MPC8313 based board running
> linux and want to have USB communication between my board
> and a host machine.  I would like to make a few
> statements and find out if my assumptions are correct.
> 
> 1.  I need to write a gadget driver for my board.

Yes.  And a USB device controller driver, if there isn't already one in 
the kernel.

> 2.  I need to write a device driver for my host
> machine.

Not necessarily.

> 3.  I need to write application programs that open
> each (respective) driver in order to define the
> communication between each device.

It's possible for applications to talk directly to the device without 
using a special-purpose host driver.  See <http://www.libusb.org>.  But 
it's certainly true that you will need to write application programs.

> Basically, what I want to be able to do is access data from
> my board and send it back to my host machine via USB, in a
> similar fashion as send() recv() in socket
> programming.  Does there already exist any drivers that
> implement a generic raw data transfer capability that can be
> interfaced in this manner?

The HID driver does, and Windows makes it simple for programs to do HID 
transfers.  But your device may not be suited to the HID model.

Linux has a generic USB-serial driver which you might be able to use.  
Your device would appear to applications as an ordinary tty.  This 
might be the simplest and easiest approach.

> I do already know about the ethernet over usb drivers and
> have tried them in the past.  I want something more
> direct and with less overhead.
> 
> Thanks for any advice and help in this matter.

Hope this helps,

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux