USB OTG

904 views
Skip to first unread message

Timothee Cruse

unread,
Feb 26, 2013, 4:21:01 AM2/26/13
to cubie...@googlegroups.com
Hey everyone,

Has anyone managed to use the USB OTG feature ?

Here is what I'm trying to do.
I have the Cubieboard running Ubuntu server (thanks Guillaume's website).
Everything is working fine.
I have a USB drive connected to it, that is automounted via the fstab.

What I would like to do is have this autonomous system (cubieboard + external usb) to work in 2 ways:
- via the network as an autonomous server
- via the usb OTG and thus to be "seen" as an external HDD by a computer it is connected to.

Is there a way to achieve this ?

Thanks

Simos Xenitellis

unread,
Feb 26, 2013, 1:26:18 PM2/26/13
to cubie...@googlegroups.com
On Tue, Feb 26, 2013 at 11:21 AM, Timothee Cruse
<timothe...@gmail.com> wrote:
> - via the usb OTG and thus to be "seen" as an external HDD by a computer it
> is connected to.

AFAIK, when you connect the Cubieboard through OTG to a computer that
expects a storage device, the Cubieboard appears as a storage device.
Did you try that?

Simos

Mathieu Stephan

unread,
Feb 28, 2013, 9:59:30 AM2/28/13
to cubie...@googlegroups.com
Hi Timothee, 

Please let me know if you succeed, as I would like to do the same :)

Cheers,
Mathieu

Sam Crooks

unread,
Apr 22, 2013, 2:59:10 AM4/22/13
to cubie...@googlegroups.com
I got this working.  It took some doing to get a kernel with it compiled in (i have yet to compile my own).  

I found that the linaro rootfs gave me a kernel with support compiled in.

Then, i have a partition formatted as FAT32, and then..

modprobe g_file_storage file=/dev/sda2 

and after a VERY long time, it shows up on my Mac as a removable device.

have not yet gotten it working on auto presenting as a flash mass storage device at boot, but that is my goal..


use case is:

via wifi, rsync a partition of MP3s on a schedule, present the partition to the Kenwood heat unit in my car  

aKumar

unread,
Apr 29, 2013, 9:44:31 AM4/29/13
to cubie...@googlegroups.com
Hi all,
I've also been trying to use the USB OTG to use my board as an external HDD with no sucess so far :(
I'm currently running linaro server 13.04 with a version of roman 3.4.39 server kernel :
http://romanrm.ru/dl/a10/kernels/server-3.4/3.4.29-20130418.1754-s-rm3%2b/config-3.4.29-20130418.1754-s-rm3%2b.txt

I did slightly modified roman's kernel by adding a few modules (hdmi and snd_usb_caiaq) but nothing has been removed.

Here's the current status :
linaro@cubie:706:/media/boot$ ll /dev/sda
brw-rw---- 1 root disk 8, 0 Apr 22 20:46 /dev/sda
linaro@cubie:707:/media/boot$ sudo modprobe g_file_storage file=/dev/sda
FATAL: Error inserting g_file_storage (/lib/modules/3.4.29-custom1+/kernel/drivers/usb/gadget/g_file_storage.ko): No such device

Do i need to plug the USB plug to my desktop _before_ inserting the kernel module ?
Does this module has unmet dependencies ?

I might try some other kernels this week (including the original linaro kernel).

Thanks.

aKumar

unread,
May 1, 2013, 9:14:00 AM5/1/13
to cubie...@googlegroups.com
All,

I've followed Sam's advice and tried the orginal kernel that came with the cubieboard hwpack and the modprobe command did work !

linaro@cubie:877:~$ uname -a
Linux cubie 3.0.62 #8 PREEMPT Fri Mar 29 19:55:45 UTC 2013 armv7l armv7l armv7l GNU/Linux

Roman's 3.0.62-r1-rm2 kernel did also work :
Linux gargacubie 3.0.62-r1-rm2 #75 Fri Mar 15 18:45:31 YEKT 2013 armv7l armv7l armv7l GNU/Linux

It seems there is a issue with all 3.4.29 kernels I'm using :(

aKumar

unread,
May 1, 2013, 1:27:09 PM5/1/13
to cubie...@googlegroups.com
OK there's probably something wrong with linux-sunxi 3.4 kernels as per issue listed on GitHub :
https://github.com/linux-sunxi/linux-sunxi/issues/29

I've rebuilt a custom 3.0.62 kernel and everything is running smoothly using g_mass_storage.
If someone manages to get a 3.4 kernel working with g_mass_storage or g_file_storage, please let me know.
Reply all
Reply to author
Forward
0 new messages