We are pleased to release a new library: USBHost!

About the USBHost library
A USBHost library has been developed in order to communicate with USB devices. Currently, the library supports:
- USB mice
- USB keyboards
- Mass storage devices
- Virtual serial port devices
In addition to the drivers already implemented, the USBHost stack provides some cool features of USB such as:
- Hub auto-detection
- You can use exactly the same code if you are using a hub to connect a usb device to an mbed
- Plug n Play support
- You can detect when a device is attached and detached to and from the usb bus
Where to get started?
Hardware details and helloWorld examples are provided in order to get started quickly with the USBHost library:
Community contribution
It would be great if the USBHost stack development involves several developers. There is plenty of work to be done such as:
- core modification by adding support of isochronous transfer
- develop drivers on top of the USBHost stack:
- Bluetooth class
- Webcam class
- ...
Any contribution from the mbed community would be greatly appreciated!
Have fun with USBHost!
7 comments on USBHost library now in Beta!:
ShaneSpencer
#
18 Mar 2013
Just tryed the USB Host Serial,
Nothing realy appears to happen,
Also, how do I get my MBED, to send serial,
I have attempted to use the code with an FTDI Serial <-> USB cable,
and a second MBED (M0) as device, sending short message repeatedly,
Reset MBED ..
MBED - active @ 10:10:46
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:130]usb_thread could not read dev descr
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:130]usb_thread could not read dev descr
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:130]usb_thread could not read dev descr
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:130]usb_thread could not read dev descr
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:130]usb_thread could not read dev descr
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:130]usb_thread could not read dev descr
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:130]usb_thread could not read dev descr
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:130]usb_thread could not read dev descr
[USB_ERR: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp[USB_INFO: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:158]New device connected: 10002acc [hub: 0 - port: 1]
[USB_INFO: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHostSerial/USBHostSerial.cpp:71]New Serial device: VID:0d28 PID:0204 [dev: 10002acc - intf: 2]
[USB_WARNING: /workspaces/USBHostSerial_HelloWorld/src/USBHost/USBHost/USBHost.cpp:238]td 20080410 processed but not in idle state: USB_TYPE_DEVICE_NOT_RESPONDING_ERROR [ep: 1000176c - dev: 10002acc - Serial]
but does not appear to do anything,
..
The HOST MBED is in a coolcomponents workshop board,
with & withought resistors ??
Cheers
Ceri
Does this library support long filenames and properly timestamp the files when accessing MSD's?
@Ceri: i don't understand how you are using the ftdi cable. Actually i tested the USBHostSerial class with an mbed plugged into another mbed over USB. So it should work :) To send serial messages:
- from the usb host mbed: use
USBHostSerial serial;
serial.printf("hello\r\n");
Serial pc(USBTX, USBRX);
pc.printf("hello again\r\n");
@Tick Tock: Yes the library supports timestamp and long file names. The fat file system used in this library is the same as the one used for the sd filesystem
Is there any way to sent USB Serial (Host) messages from with-in the main loop ??
so far tthe only way to do it is to set a flag in my main, and test it in the thred.
As for the FTDI cable, (which did not get recognised by my MBED)
I pluged it (the USB end) into my coolcomponents MBED board.
and tested the code, with , and withought the pull resistors.
Cheers
Ceri
Hi Ceri,
It is my understanding that the FTDI USB<=>Serial cables need the FTDI virtual com port driver to be installed on the host (usually a pc) to allow the device to be recognised and configured - see http://www.ftdichip.com/Drivers/VCP.htm. Since there is no driver that we can install on the mbed, the converter device in the cable will not be recognised.
Tim
Why are you looking to use ftdi serial when the unit has 3 rs232 ports built in?
Surely a cheap wifi solution is more interesting? or am i missing something?
(just my 2p).
Please login to post comments.
It is a great news but please assist me how to do so that i can do from my own.
http://www.asyana.com.au/