Arduino+Atmel Zero/Due USB host libs

603 views
Skip to first unread message

Pieter van der Meer

unread,
Sep 3, 2015, 6:38:52 AM9/3/15
to Developers
Dear Arduino lib developers,

In the last weeks I have experimented with USB host code on the Arduino Due. My conclusion is that the present Arduino USBHost lib is not mature enough yet, for what application developers would like to have. I made some progress with a hack of the USBHost library. I turned most functions into state machines, to enable multitasking. However, I also wanted to add CDC and mass storage device classes, and this just seemed too big a "job on the side" for one person.
 
So, on the Arduino forum I heard of a joint effort between Arduino and Atmel to make a new, more powerful USB Host library for the Zero. If possible, I'd like to join as a developer, or if that's not possible, as a beta tester. Would that be possibe? And where can I find the latest updates on this project?

With kind regards,

Pieter van der Meer

Thibaut VIARD

unread,
Sep 3, 2015, 7:45:01 AM9/3/15
to devel...@arduino.cc

Hi Pieter,

Can you point us to the forum posts you are refering to, please?

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Cristian Maglie

unread,
Sep 3, 2015, 8:21:44 AM9/3/15
to devel...@arduino.cc
Il 02/09/2015 14:46, Pieter van der Meer ha scritto:
> So, on the Arduino forum I heard of a joint effort between Arduino and
> Atmel to make a new, more powerful USB Host library for the Zero. If
> possible, I'd like to join as a developer, or if that's not possible, as
> a beta tester. Would that be possibe? And where can I find the latest
> updates on this project?

The only recent effort I know about is the porting of the USB_Host_2.0
library (made by circuits@home for their USB Host Shield) to the Zero:

https://github.com/felis/USB_Host_Shield_2.0
https://www.circuitsathome.com/

This porting is the one that is currently shipped with the Zero core.

For the record: this is the same work done by Atmel for the SAM3X/Due
two years ago. No updates has been done in the meantime on both ports
(neither for the Zero nor the Due).

ATM I see that the c@h folks released the USB Host Library 3 in alpha,
maybe it's worth waiting a little more and try to port their new API
once it became stable, but this is just an hypothesis, I don't know how
much Atmel is going to invest in that.

C


Kristian Sloth Lauszus

unread,
Sep 3, 2015, 10:41:41 AM9/3/15
to devel...@arduino.cc
The only recent effort I know about is the porting of the USB_Host_2.0
library (made by circuits@home for their USB Host Shield) to the Zero:

https://github.com/felis/USB_Host_Shield_2.0
https://www.circuitsathome.com/

This porting is the one that is currently shipped with the Zero core.

For the record: this is the same work done by Atmel for the SAM3X/Due
two years ago. No updates has been done in the meantime on both ports
(neither for the Zero nor the Due).

The port is actually based on the version 1 of the library: https://github.com/felis/USB_Host_Shield. I previously worked on adding support to the USB host shield 2.0 library for the Zero, but I would just hang and not read the descriptor correctly. I can push it to Github if anyone want to take a look? But personal I believe it is not worth it, as we should add support for it in 3.0 version of the library.

ATM I see that the c@h folks released the USB Host Library 3 in alpha,
maybe it's worth waiting a little more and try to port their new API
once it became stable, but this is just an hypothesis, I don't know how
much Atmel is going to invest in that.

Yes we released the library several month back, but I have not worked that much on it since,  as I am very busy with school and a project I am working on as a consultant, but maybe Andrew/xxxajk have more time?

I will properly not work on the backend, as he is more experienced in the USB core, but I will port all my different driver PS3, PS4, Wii, Xbox etc. at some point.

Regards
Lauszus

Andrew Kroll

unread,
Sep 3, 2015, 10:49:29 AM9/3/15
to devel...@arduino.cc

Busy as well, but if the framework is followed, due and zero are easily added.
The only caveat is that you need to commandeer an irq to be used as a soft isr.
Iirc the due has an unused  irq for the unimplemented Ethernet interface.

Pieter van der Meer

unread,
Sep 4, 2015, 6:54:57 AM9/4/15
to Developers
Thanks for your replies.

So far, I see no proof of a coop between Atmel and Arduino, then. Which would leave the USBHost 3.0 lib to be ported to Due (and Zero)..

If nobody has the time, I would like to do this conversion. I guess I understand how the interrupt would work. A delay() would issue a one-shot timer that would trigger re-entry of the usb host code.. Sacrificing an irq would be ok for me. I'm in urgent need of support for MSC and hubs, so I'm willing to do the work. Even if it takes weeks.

I might ask some questions, be prepared ;)

Cheers,

Pieter
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

Alex Albino

unread,
Sep 4, 2015, 12:01:08 PM9/4/15
to devel...@arduino.cc

Hi Pieter, and everyone,

I'd like to contribute to USB 3.0 work. Is there a github repo I can fork and contribute to? (I have the open source FemtoUSB and FemtoBeacon, using the SAM D21 and SAM R21 respectively)

- Alex

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Andrew Kroll

unread,
Sep 4, 2015, 1:59:10 PM9/4/15
to devel...@arduino.cc
Reply all
Reply to author
Forward
0 new messages