This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:usb:device_mode:gdaget_eth [15 Jul 2020 08:54] – [Example Usage] sullivan liu | resources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:usb:device_mode:gdaget_eth [27 Jan 2021 22:35] (current) – use wp> interwiki links Robin Getz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== USB Gadget Ethernet ====== | ====== USB Gadget Ethernet ====== | ||
- | Gadget Ethernet allows [[https:// | + | Gadget Ethernet allows [[wp>Ethernet_over_USB|Ethernet emulation over USB]], allowing the reading/ |
---- | ---- | ||
Line 42: | Line 42: | ||
| | ||
</ | </ | ||
- | <WRAP center round todo 100%> | + | |
- | ifconfig and some commands depend on the ethnert feature | + | |
- | </ | + | |
---- | ---- | ||
Line 93: | Line 91: | ||
With following command you should be able to see the USB Ethernet device is there on your HOST: | With following command you should be able to see the USB Ethernet device is there on your HOST: | ||
<code c++> | <code c++> | ||
- | # sudo su | + | test@madara: |
- | test@madara:~# lsusb | + | root@madara:~# lsusb |
Bus 002 Device 040: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/ | Bus 002 Device 040: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/ | ||
- | test@madara:~# dmesg | + | root@madara:~# dmesg |
[84172.819820] usb 2-1.4: new high-speed USB device number 41 using ehci-pci | [84172.819820] usb 2-1.4: new high-speed USB device number 41 using ehci-pci | ||
[84172.929056] usb 2-1.4: New USB device found, idVendor=0525, | [84172.929056] usb 2-1.4: New USB device found, idVendor=0525, | ||
Line 105: | Line 103: | ||
[84172.940300] cdc_ether 2-1.4:1.0 eth2: register ' | [84172.940300] cdc_ether 2-1.4:1.0 eth2: register ' | ||
</ | </ | ||
- | so the " | + | |
<code c++> | <code c++> | ||
- | test@madara: | + | test@madara: |
- | test@madara: | + | enp2s0: flags=4163< |
- | $ ifconfig | + | inet 10.99.24.131 |
- | eth2: flags=4163< | + | inet6 fe80::939d: |
- | inet 192.168.1.56 | + | ether f4: |
- | inet6 fe80::2dc:c8ff:fef7:7505 | + | RX packets 1927975 |
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 1836232 | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | enx00dcc8f77505: | ||
+ | inet6 fe80::5e85:dcad:f5f7:1bfc | ||
ether 00: | ether 00: | ||
- | RX packets | + | RX packets |
RX errors 0 dropped 0 overruns 0 frame 0 | RX errors 0 dropped 0 overruns 0 frame 0 | ||
- | TX packets | + | TX packets |
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | lo: flags=73< | ||
+ | inet 127.0.0.1 | ||
+ | inet6 ::1 prefixlen 128 scopeid 0x10< | ||
+ | loop txqueuelen 1000 (Local Loopback) | ||
+ | RX packets 11377 bytes 1017513 (1.0 MB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 11377 bytes 1017513 (1.0 MB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | </ | ||
+ | |||
+ | Thought compared the commands output of dmesg and ifconfig, we can see the ether address of enx00dcc8f77505 | ||
+ | <code c++> | ||
+ | test@madara: | ||
+ | test@madara: | ||
+ | |||
+ | enx00dcc8f77505: | ||
+ | inet 192.168.1.67 | ||
+ | inet6 fe80:: | ||
+ | ether 00: | ||
+ | RX packets 40 bytes 7373 (7.3 KB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 86 bytes 18058 (18.0 KB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | </ | ||
---- | ---- | ||
Ping the target board: | Ping the target board: |