| 
 | 
 
 Edited by EduardMe1 at 2015-12-16 20:39  
 
Dear community, 
 
Im trying to get an USB gadget via OTG running on Linux (OrangePI PC).  
For example g_mass_storage or g_hid or g_serial is interesting. 
 
What I want to achieve is, when I connect the OTG cable to OrangePI PC, it should be detected as a device on a PC. One of the above. 
First challenge is to get it detected at all. Currently nothing happens, if I connect the cable. 
 
I attempted the following: 
 
I used loboris repo to re-build the kernel: https://github.com/loboris/OrangePI-Kernel 
I changed the kernel config like this (described here): 
 
-  Device Drivers  --->
 
 -              USB support  --->
 
 -                    <*>    NOP USB Transceiver Driver
 
 -                     [*]    SUNXI USB2.0 Dual Role Controller support --->
 
 -                              [*]    Sunxi USB2.0 Manager
 
 -                                   USB0 Controller support (otg support) --->
 
 -                                         (*) otg support
 
  Copy code 
 
Additionally I activated as <M> the OTG gadget drivers for g_mass_storage, g_hid and g_serial. 
After the compilation, I have copied the uImage and the lib/modules folder onto the SD Card. The SD Card has a Linux image installed. In this case the Ubuntu_vivid_mini.img from loboris. 
 
After replacing the above, the board is booting normally, but Im not able to activate the gadget drivers.  
Im using following commands as root: 
 
output is: insmod /lib/modules/3.4.39-02-lobo/kernel/drivers/usb/gadget/g_hid.komodrpobe: ERROR: could not insert g_hid: No such device 
 
Although the module is there at the same location. I can modprobe the g_mass_storage, but still nothing shows up on the PC connected to OrangePI PC. 
 
From my understanding, OrangePI PC should be detected as some device on a PC. 
Any clues, tips or references how to setup OTG correctly? 
 
Thanks! 
 
 
 |   
 
 
 
 |