On Linux ethernet usb0 device shows up, but DHCP fails to get an answer.
Similarly on Mac - device shows up, but DHCP fails to get an IP address.
Below are included relevant logs from a Fedora 32 Linux box (the pcap has .log extension since github doesn't want to allow .pcap).
This is a FreeRTOS build of IPoverUSB.
diff --git a/Makefile b/Makefile
index 4a27072..aecde89 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ XPD_DIR = STM32_XPD
USBD_DIR = USBDevice
LWIPDIR = lwIP/src
CONTRIBDIR = lwip-contrib
-OS_DIR =
+OS_DIR = FreeRTOS/FreeRTOS/Source
##++---- Included files ----++##
include $(LWIPDIR)/Filelists.mk
This is using a:
https://www.amazon.com/gp/product/B00CW9AKDY/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
[STM32F4DISCOVERY] ST STM32 STM32F4 STM32F407 MCU Discovery Evaluation Development Board kit embedded ST-LINK/V2 debugger @xyg
Best guess is Linux/Mac and the IPoverUSB device are not agreeing on USB URB (possibly MBIM) framing and thus frames don't flow successfully in either direction.
[ 0.000000] Linux version 5.8.9-200.fc32.x86_64 ([email protected]) (gcc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1), GNU ld version 2.34-4.fc32) #1 SMP Mon Sep 14 18:28:45 UTC 2020
...
[316478.147751] cdc_ncm 1-6:1.1 enp0s20f0u6i1: unregister 'cdc_ncm' usb-0000:00:14.0-6, CDC NCM
[316484.539176] usb 1-6: new full-speed USB device number 7 using xhci_hcd
[316484.666861] usb 1-6: New USB device found, idVendor=0483, idProduct=ffff, bcdDevice= 1.00
[316484.666873] usb 1-6: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[316484.666881] usb 1-6: Product: IP over USB Demonstrator
[316484.666886] usb 1-6: Manufacturer: STMicroelectronics
[316484.666891] usb 1-6: SerialNumber: 19004100
[316484.690225] cdc_ncm 1-6:1.1: MAC-Address: 00:80:e1:00:00:00
[316484.690671] cdc_ncm 1-6:1.1 usb0: register 'cdc_ncm' at usb-0000:00:14.0-6, CDC NCM, 00:80:e1:00:00:00
[316484.708297] cdc_ncm 1-6:1.1 enp0s20f0u6i1: renamed from usb0
[316552.462093] device enp0s20f0u6i1 entered promiscuous mode
[316552.463409] cdc_ncm 1-6:1.1 enp0s20f0u6i1: 10 mbit/s downlink 10 mbit/s uplink
[316552.479401] cdc_ncm 1-6:1.1 enp0s20f0u6i1: network connection: connected
[316552.479457] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s20f0u6i1: link becomes ready
[316619.602751] device enp0s20f0u6i1 left promiscuous mode
ip link set enp0s20f0u6i1 up; tcpdump -s 10000 -w dump.pcap -i enp0s20f0u6i1
tcpdump -r dump.pcap
reading from file dump.pcap, link-type EN10MB (Ethernet)
dropped privs to tcpdump
17:07:47.493508 ARP, Request who-has 192.168.0.1 tell 192.168.0.1, length 28
17:07:47.495812 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
17:07:47.606866 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
17:07:48.438819 IP6 :: > ff02::1:ff00:0: ICMP6, neighbor solicitation, who has zeus.lan, length 32
17:07:49.462910 IP6 zeus.lan > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
17:07:49.462926 IP6 zeus.lan > ff02::2: ICMP6, router solicitation, length 16
17:07:49.958865 IP6 zeus.lan > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
17:07:53.110865 IP6 zeus.lan > ff02::2: ICMP6, router solicitation, length 16
17:08:00.726869 IP6 zeus.lan > ff02::2: ICMP6, router solicitation, length 16
17:08:15.574873 IP6 zeus.lan > ff02::2: ICMP6, router solicitation, length 16
17:08:21.490129 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:80:e1:00:00:00 (oui Unknown), length 300
17:08:27.113025 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:80:e1:00:00:00 (oui Unknown), length 300
17:08:38.358633 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:80:e1:00:00:00 (oui Unknown), length 300
17:08:46.294864 IP6 zeus.lan > ff02::2: ICMP6, router solicitation, length 16
dhclient -4 -d -v enp0s20f0u6i1
Internet Systems Consortium DHCP Client 4.4.2b1
Copyright 2004-2019 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/enp0s20f0u6i1/00:80:e1:00:00:00
Sending on LPF/enp0s20f0u6i1/00:80:e1:00:00:00
Sending on Socket/fallback
DHCPDISCOVER on enp0s20f0u6i1 to 255.255.255.255 port 67 interval 6 (xid=0xbb3dfe7c)
DHCPDISCOVER on enp0s20f0u6i1 to 255.255.255.255 port 67 interval 11 (xid=0xbb3dfe7c)
DHCPDISCOVER on enp0s20f0u6i1 to 255.255.255.255 port 67 interval 18 (xid=0xbb3dfe7c)
^C
dmesg.txt
dump.pcap.log