<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.radxa.com/mw/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.radxa.com/mw/index.php?action=history&amp;feed=atom&amp;title=Zero%2FLinux%2Fusbnet</id>
		<title>Zero/Linux/usbnet - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.radxa.com/mw/index.php?action=history&amp;feed=atom&amp;title=Zero%2FLinux%2Fusbnet"/>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/mw/index.php?title=Zero/Linux/usbnet&amp;action=history"/>
		<updated>2026-07-21T13:54:29Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>https://wiki.radxa.com/mw/index.php?title=Zero/Linux/usbnet&amp;diff=7048&amp;oldid=prev</id>
		<title>RadxaYuntian: Created page with &quot;{{zero_header}}  {{Languages|Zero/Linux/usbnet}}       Radxa Zero &gt;  Working with Linux  &gt;  Enable USB Ethernet gadget  === En...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/mw/index.php?title=Zero/Linux/usbnet&amp;diff=7048&amp;oldid=prev"/>
				<updated>2021-12-07T02:20:20Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{zero_header}}  {{Languages|Zero/Linux/usbnet}}      &lt;a href=&quot;/Zero&quot; title=&quot;Zero&quot;&gt; Radxa Zero&lt;/a&gt; &amp;gt; &lt;a href=&quot;/Zero/Linux&quot; title=&quot;Zero/Linux&quot;&gt; Working with Linux &lt;/a&gt; &amp;gt; &lt;a href=&quot;/Zero/Linux/usbnet&quot; title=&quot;Zero/Linux/usbnet&quot;&gt; Enable USB Ethernet gadget&lt;/a&gt;  === En...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{zero_header}}&lt;br /&gt;
&lt;br /&gt;
{{Languages|Zero/Linux/usbnet}}&lt;br /&gt;
&lt;br /&gt;
    [[zero | Radxa Zero]] &amp;gt; [[zero/Linux | Working with Linux ]] &amp;gt; [[Zero/Linux/usbnet | Enable USB Ethernet gadget]]&lt;br /&gt;
&lt;br /&gt;
=== Enable USB Ethernet gadget on Radxa Zero ===&lt;br /&gt;
&lt;br /&gt;
This guide describes how to enable USB Ethernet gadget on Radxa Zero. USB Ethernet gadget emulates a normal Ethernet NIC over OTG port, allowing both the host computer and Radxa Zero to communicate over standard Ethernet protocol, like SSH and HTTP.&lt;br /&gt;
&lt;br /&gt;
==== Requirement ====&lt;br /&gt;
&lt;br /&gt;
* Radxa Zero with a Linux distro&lt;br /&gt;
* USB A to C cable&lt;br /&gt;
* Any host computer&lt;br /&gt;
* Any means to configure Radxa Zero. Some possibilities are SSH over WiFi, direct keyboard and monitor, and [[Zero/dev/serial-console | serial console]].&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Make sure the port is not used ====&lt;br /&gt;
&lt;br /&gt;
In some Linux distros bundle and enable &amp;lt;code&amp;gt;amlogic-adbd&amp;lt;/code&amp;gt; in their image. Some examples are [https://github.com/radxa/radxa-zero-images-released/releases our official images] and [https://github.com/manjaro-arm/radxa-zero-images/releases Manjaro].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;amlogic-adbd&amp;lt;/code&amp;gt; also uses OTG port to emulate an Android debug bridge device. As such you need to disable this device to free the resource for USB gadget.&lt;br /&gt;
&lt;br /&gt;
Run the following command to check if you have &amp;lt;code&amp;gt;amlogic-adbd&amp;lt;/code&amp;gt; running. The output will show '''Active: active (running)''' if it is running:&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl status amlogic-adbd.service&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;amlogic-adbd&amp;lt;/code&amp;gt; is indeed running, disable it with the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl disable amlogic-adbd.service&lt;br /&gt;
&lt;br /&gt;
Then shutdown your Zero, unplug the cable, and replug to computer of your choice.&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Enable USB Ethernet gadget ====&lt;br /&gt;
&lt;br /&gt;
Run the following commands to enable USB Ethernet gadget:&lt;br /&gt;
&lt;br /&gt;
 # Based on https://www.collabora.com/news-and-blog/blog/2019/02/18/modern-usb-gadget-on-linux-and-how-to-integrate-it-with-systemd-part-1/&lt;br /&gt;
 sudo -i&lt;br /&gt;
 modprobe libcomposite&lt;br /&gt;
 # different distro could have a different configfs mounting point: /sys/kernel/config&lt;br /&gt;
 # if the following command fails you need to check with your distro&lt;br /&gt;
 mkdir /sys/kernel/config/usb_gadget/radxa/&lt;br /&gt;
 cd /sys/kernel/config/usb_gadget/radxa/&lt;br /&gt;
 echo 0x1d6b &amp;gt; ./idVendor&lt;br /&gt;
 echo 0x104 &amp;gt; ./idProduct&lt;br /&gt;
 mkdir -p ./strings/0x409&lt;br /&gt;
 echo &amp;quot;Radxa&amp;quot; &amp;gt; ./strings/0x409/manufacturer&lt;br /&gt;
 echo &amp;quot;ECM&amp;quot; &amp;gt; ./strings/0x409/product&lt;br /&gt;
 mkdir -p ./configs/r.1&lt;br /&gt;
 mkdir -p ./functions/ecm.usb0&lt;br /&gt;
 ln -s ./functions/ecm.usb0/ ./configs/r.1/&lt;br /&gt;
 # ls /sys/class/udc to see available UDCs&lt;br /&gt;
 # the value below could be different on your system&lt;br /&gt;
 echo ff400000.usb &amp;gt; ./UDC&lt;br /&gt;
&lt;br /&gt;
The above commands were tested on our official Ubuntu Server [https://github.com/radxa/radxa-zero-images-released/releases/download/radxa-zero-v20211122/radxa-zero-ubuntu-focal-server-arm64-20211120-1315-mbr.img.gz 211120 image], and Manjaro by one of [https://forum.radxa.com/t/radxa-zero-as-usb-c-gadget-for-ipad-pro/8013/6 our forum user].&lt;/div&gt;</summary>
		<author><name>RadxaYuntian</name></author>	</entry>

	</feed>