Using IOIO in host mode with a non-Android Linux device

229 views
Skip to first unread message

Felix Hädicke

unread,
Apr 28, 2015, 10:34:49 AM4/28/15
to ioio-...@googlegroups.com
Hi,

has someone managed to connect a Linux device to IOIO v1? What I am going to do is connection a Kobo Mini to the IOIO. With a modified kernel (for OTG mode on the Kobo), communicating with the IOIO-OTG works fine, just like on a normal Linux-PC. But is there a way to connect a IOIO v1 to this device, when the Kobo is in gadget mode?

Some ideas:
* Using the Android Composite USB kernel driver with Open Accessory support. I already tried to port this driver to the Kobo Kernel, but I didn't get it working.
* Implementing a simpler USB gadget driver (maybe in userspace, using Linux USB GadgetFS) on the Kobo, which supports a subset of the Open Accessory protocol. Which functionality would be neccessary for this? https://source.android.com/accessories/aoa.html descibes the Accessory protocol. Would it be sufficient to implement a USB gadget with PID 0x2D00 / VID 0x18D1 and two bulk endpoints for reading and writing? Does the USB interface and endpoints require any special attributes, do I need to implement any control transfers?
* Using the Linux Gadget Serial Driver (g_serial) which turns the Kobo into a CDC/ACM device (this works fine to establish a serial connection between a PC and the Kobo). But it seems that this would reqire changes to the IOIO firmware, because it only support CDC/ACM in gadget mode, right?

Regards
Felix

Ytai Ben-Tsvi

unread,
Apr 28, 2015, 12:33:05 PM4/28/15
to ioio-...@googlegroups.com
My hunch is that your second bullet point is probably the easiest way forward. Indeed, only a pair of bulk endpoints is all it would take. Nothing funny going on otherwise, all the funny stuff has to do with how to put an Android device into the AOA mode, but it doesn't apply in your case, since you can be in AOA mode constantly.

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Felix Hädicke

unread,
Jul 1, 2015, 5:53:24 AM7/1/15
to ioio-...@googlegroups.com
I found out that it is possible to create a very simple USB device with two bulk endpoints with the g-serial kernel driver with ACM mode turned off:
modprobe g-serial idVendor=0x18D1 idProduct=0x2D00 use_acm=0

See attached "lsusb -v" output of the created gadget device. On the host side, a very simple "Hello World" program works (to write "Hello World" to the gadget, which can be read from /dev/ttyGS0 on the gadget side), see attached source file.

But the IOIO does unfortunately not connect to this gadget. Do you have any idea why? Does it require special endpoint addresses or other device descriptor properties? Tried idProduct=0x2D01, but it does not work as well.
libusb-helloworld.c
lsusb-openaccessory.txt

Felix Hädicke

unread,
Jul 2, 2015, 6:33:31 PM7/2/15
to ioio-...@googlegroups.com
Now i got the Android Accessory function driver (f_accessory.c) working, and the IOIO is connecting :-)

So it works at least with my USB3380 PCI-E gadget development board on Linux 4.1.1. I am going to port this to the Kobo kernel.

Christian Jürges

unread,
Nov 28, 2015, 3:25:38 PM11/28/15
to ioio-users
Hi Felix,

is your solution only funcional with kobo mini? What settings do you use in nmea settings of xcsoar?

Chris

glips...@googlemail.com

unread,
Mar 31, 2016, 6:20:57 PM3/31/16
to ioio-users
Hi Felix and Christian,

i am struggeling with getting me beloved KOBO Mini back to work after the Winterbreak as well (My Club has convertet the setup of all our XC-Gliders from PDA (where a hat a working setup using the serial Port and an empty IPAQ CASE for connection) tu Andorports.

Unless you make me belive that it will finally be possible to get IOIO (OTG) working on the kobo i am at the moment playing with a beaglebone black as a possible translator (possibbly using Cristians IOIO XCSoar Bridge).

So are there any news? Would be too nice too dream :-)

Regards and thankk you for your efforts!

Gero

iwl

unread,
Aug 3, 2016, 11:04:35 AM8/3/16
to ioio-users
Hi,

does the ioio Host only work for somebody with the kobo now?
Is a completely new system image necessary or can a driver be added?

iwl

Reply all
Reply to author
Forward
0 new messages