Mosaic-x5 HAT Web UI not reconnecting after Hard or Soft reset

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.

  1. 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

  2. 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
    • 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
            }
      }

Alex of Septentrio pointed out that the default address of Mosaic is 192.168.3.1 if I connected the USB-C cable to the RPi from the Mosaic and I enabled “Outgoing Internet Access Over USB”.I realized that I had not read the Mosaic Firmware User Manual well enough, otherwise I would have seen that. So my earlier setup was incorrect and it explained why it wasn’t working after a reset hard/soft of the Mosaic HAT. In order to simplify things, I decided to use Static IPs for both Mosaic and RPi.

My current /etc/systemd dependency diagram is as follows:

network.target
|
v
mosaic-usb0.service (sets static IP 192.168.3.1 on usb0 and 192.168.3.2 for RPi)
|
v
wait-modem-device.service (waits for SIM7670G serial device)
|
v
ppp-sim7670g-usb.service (starts PPP for cellular)
|
v
fix-resolvconf-after-ppp.service (overwrites /etc/resolv.conf to add loopback, Cloudflare and Google DNS)
|
v
unbound.service (starts Unbound after resolv.conf is set)
|
v
refresh-arp-usb0.service (optionally refreshes ARP cache)

Now I am back to the Mosaic not being able to resolve the NTRIP caster hostname, but at least now the Mosaic settings can be modified and it be reset without having me do a reboot!

Next step is to figure out the logging system on the Mosaic HAT, so that I can trace its execution.

1 Like