0
ravelo

usb gadget, g_ether.. on tritium h5

Recommended Posts

Hi all,

I've read on the forum that support for usb gadget using the µ-usb port on the libre computer tritium needed a kernel reconfigure &  recompile.

I tried to start with that, but during configuration, I've seen full support already.

So, was it supposed to just work ?

I target armbian buster server variant.

my need is to use IP over an usb (and power) cable between a linux machine (x86 and then arm) and a  tritium h5

Thanks in advance

 

Share this post


Link to post
Share on other sites

this was my command line (host=ubuntu 18)

./compile.sh docker BOARD=tritium-h5 BRANCH=current KERNEL_ONLY=yes KERNEL_CONFIGURE=yes

after 89minutes, all ended ok apparently,

and which are the relevant files among..

 

Quote

raxy@raxy-HP-ED-800-G1:~/Documents/build$ ls -l output/debs
total 511620
-rw-r--r-- 1 root root       43976 juil.  4 20:44 armbian-config_20.08.0-trunk_all.deb
-rw-r--r-- 1 root root     6493740 juil.  4 20:45 armbian-firmware_20.08.0-trunk_all.deb
-rw-r--r-- 1 root root   126321152 juil.  4 20:49 armbian-firmware-full_20.08.0-trunk_all.deb
drwxrwsr-x 2 root docker      4096 juil.  4 19:19 extra
-rw-r--r-- 1 root root       58156 juil.  4 20:44 linux-dtb-current-sunxi64_20.08.0-trunk_arm64.deb
-rw-r--r-- 1 root root    10973444 juil.  4 20:44 linux-headers-current-sunxi64_20.08.0-trunk_arm64.deb
-rw-r--r-- 1 root root    34245536 juil.  4 20:44 linux-image-current-sunxi64_20.08.0-trunk_arm64.deb
-rw-r--r-- 1 root root   345485224 juil.  4 20:44 linux-source-current-sunxi64_20.08.0-trunk_all.deb
-rw-r--r-- 1 root root      253768 juil.  4 19:54 linux-u-boot-current-tritium-h5_20.08.0-trunk_arm64.deb

 

at boot time, 

no usb0 is created, and g_ether is not loaded, as per commands below..

raxy@tritium:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 02:01:e9:b0:da:21 brd ff:ff:ff:ff:ff:ff
    inet 192.168.200.17/24 brd 192.168.200.255 scope global dynamic noprefixroute eth0
       valid_lft 863982sec preferred_lft 863982sec
    inet6 2a01:e0a:592:5030:f482:2a40:5939:2721/64 scope global dynamic noprefixroute 
       valid_lft 86384sec preferred_lft 86384sec
    inet6 fe80::c8cb:661b:7238:e753/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
raxy@tritium:~$ lsmod|grep g_ether
raxy@tritium:~$ 

so, i manually loaded g_ether...

raxy@tritium:~$ sudo modprobe g_ether
[sudo] password for raxy: 
raxy@tritium:~$ lsmod|grep g_ether
g_ether                16384  0
usb_f_rndis            36864  1 g_ether
u_ether                28672  2 usb_f_rndis,g_ether
libcomposite           61440  3 usb_f_rndis,g_serial,g_ether

but still no trace of eth0,

wtf !?

 

so, i made the module load at boot time like this (as root)...

cd /etc/modules-load.d/

echo "g_ether" >> modules.conf

sync; reboot

 

after reboot,

lsmod shows g_ether, fine,

but still no usb0, and i have this error in dmesg..

 

[    5.496280] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
 

again, wtf !?

 

 

Share this post


Link to post
Share on other sites
17 hours ago, ravelo said:

[    5.496280] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers

USB Gadget is a device-independent kernel subsystem. For its operation it needs device specific UDC (USB Device Controller) support.

E.g.:usb-stack.png.9966d25928b55be5e55ddd0335e8e0b3.png
You at least missing proper hardware (DT) configuration and may be missing kernel UDC support.

Share this post


Link to post
Share on other sites
1 hour ago, ravelo said:

what woulkd you recommend us to do

If I picked it out correctly, the USB IP of your h5 SOC will be driven by the musb driver.
So check if your kernel config has all components for OTG support enabled and the DT is configured for peripheral mode.
This is usually not the case with a default configuration because host mode is used more frequently.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0