Hi community experts,
I have a Raspberry Pi 5 connected to the Sparkfun Mosaic-x5 HAT via USB-C, serving the device a static IP (or DHCP-reserved IP) on usb0
.
Issue:
After a soft or hard reset of the Mosaic-x5 (via Web UI, console, or erst, SOFT, None
or erst, HARD, None
command), the USB0 device appears in lsusb
and Pi’s DHCP server logs a lease offer/acknowledgment, but the device does not come up at the assigned IP (192.168.3.18)—ARP is incomplete, and it does not reply to ping or connect via web.
Only a full cold boot of the Pi, or disconnect/reconnect of the Mosaic-x5’s USB-C cable, restores connectivity.
I have validated this with:
- Direct Pi-side IP/ARP flush and reconfiguration
- Full DHCP restart
- Recovery scripts
- Checking with
lsusb
,arp -n
,ping
, and direct Web UI access attempts
I have read other similar topics, but I have not been able to resolve my issue, hence this new topic. I have also contacted Septentrio about this, in case it is a Mosaic HAT issue.
Any help on this is appreciated.
Cheers,
-atin
My Setup:
Usually, I have the WiFi (wlan0) disabled, so that I can use the cellular network via the ppp0 device, but I have wlan0 and ppp0 rules in the NFTables conf. They are irrelevant to my current issue, so please ignore that data.
- Sparkfun Mosaic-x5 HAT:
- DHCP –
-
$R: gips
IPSettings, DHCP, “192.168.3.18”, “255.255.255.0”, “192.168.3.1”, “”, “192.168.3.1”, “”, 1500
-
- USB Internet Access – ON
-
$R: guia
USBInternetAccess, on
-
- DHCP –
- Raspberry Pi 5:
* Mosaic-x5: USB0-
ip addr: 3: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link/ether 1a:32:02:99:15:45 brd ff:ff:ff:ff:ff:ff
inet 192.168.3.1/24 scope global usb0
valid_lft forever preferred_lft forever -
ip link: 3: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 1a:32:02:99:15:45 brd ff:ff:ff:ff:ff:ff -
Dnsmasq is used for DHCP. It is configured to always assign 192.168.3.18 for the Mosaic-x5’s MAC address via the /etc/dnsmasq.conf:
- port=0
domain-needed
bogus-priv
no-resolv
server=127.0.0.1
interface=usb0
bind-interfaces
dhcp-range=192.168.3.10,192.168.3.20,12h
dhcp-host=56:1d:69:ea:93:f1,192.168.3.18
dhcp-option=3,192.168.3.1
dhcp-option=6,192.168.3.1
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
- port=0
-
Unbound is used for DNS
-
NFTables are used for NAT, routing/forwarding between interfaces via /etc/nftables.conf:
-
table inet filter {
chain input {
type filter hook input priority filter; policy drop;
ct state established,related accept
iifname "lo" accept
tcp dport 22 accept
udp dport 53 accept
iifname "usb0" udp dport 67 accept
iifname "usb0" udp sport 67 accept
iifname "usb0" udp dport 68 accept
iifname "usb0" udp sport 68 accept
}
chain forward {
type filter hook forward priority filter; policy drop;
ct state established,related accept
iifname "usb0" oifname "ppp0" accept
iifname "ppp0" oifname "usb0" accept
iifname "usb0" oifname "wlan0" accept
iifname "wlan0" oifname "usb0" accept
}
chain output {
type filter hook output priority filter; policy accept;
}
}
table ip nat {
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
oifname "ppp0" masquerade
oifname "wlan0" masquerade
}
}