Directly hooking up the MOD to the network via an USB-Network dongle?

At LAC workshop I’ve learned that the MOD can be hooked up via the USB-OTG port using the network gadget driver to another host.

I’d rather hook up the MOD directly to the network (e.g. switch) via the USB-Slave port with an USB-Network dongle. Does the MOD support that?

Actually, it is not OTG. It just a device port.

Not sure and unfortunately we don’t have those dongles here to test.

I have one at home, I’ll see if I can test it in the next few evenings or over the weekend.

I’d expect it to work since most of those are plug and play on linux.

I did something like this in the past. The router (not a switch) here as a USB port which supports USB/Ethernet.

I’ve setup the MOD: disabled dnsmasq (the DHCP server) via systemctl, edited /etc/network/interfaces changed the static IP to the LAN. Then I’ve configured the router to accept that static IP on the USB interface and route it.

That worked fine, the MOD was reachable from all devices on the LAN/WIFI… until the next MOD update reset things.

2 Likes

yes, this would be the fallback solution, e.g. another small ARM dev board that does the routing…

No dice.The problem is that the MOD does not set a default gateway for outbound traffic.

I tried something like this:

myDesktop/other device in LAN <–> LAN/WAN router <–WIFI–> dedicated MOD-Router/RPi <–USB–> MOD

  1. MOD-Router/RPi public interface gets an IP in the LAN/WAN from the LAN/WAN router.
  2. MOD-Router/RPi USB interface gets an IP from the MOD in the 192.168.51.0/24 subnet
  3. LAN/WAN router has a static route to 192.168.51.0/24 via MOD-Router/RPi
  4. MOD-Router/RPI is configure to route echo 1 > /proc/sys/net/ipv4/ip_forward

So far so good. All devices from the LAN can reach the MOD, but only one way! The MOD won’t send anything back.

Solution: figure out the IP that the MOD assigns to the MOD-Router/RPi (here 192.168.51.106)
ssh into the mod (from the RPi), /sbin/route add default gw 192.168.51.106 and after that it works.

So the MOD needs to be reconfigured, in which case one might just as well re-configure it to be part of the LAN/WAN directly.

PS. one way to make it work is to change your LAN/WAN to also use 192.168.51.0/24 and exclude the range which the MOD uses 192.168.51.50,192.168.51.150 and reserve 192.168.51.1. – but really I’d be a lot nice if one could configure persistent settings on the MOD which survive updates.

3 Likes