I have a robot with an onboard computer, that communicates via Ethernet to the base station (by way of radio, but the interface on the robot's computer is Ethernet). The Robot has a particular sensor mounted, which i'm able to communicate with using the sensor's API, the sensor connects to the robot via USB and appears on the robots list of networks as USB0, presumably by way of some USB Ethernet gadget.
The Ip address of USB0 is provided by DHCP from the sensor, but the ethernet network must use a static ip address.
I'd like to bridge the Ethernet - Eth0 network and the USB0 networks so that I can access the sensors webserver from the base station.
I'm not sure how one goes about bridging a static ip to a dhcp one (the dhcp ip address is always the same), or even if a bridge is the appropriate solution.
Here's my current netplan config file -
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
dhcp4: false
addresses: [192.168.1.150/24]
gateway4: 192.168.1.254
nameservers:
addresses: [8.8.8.8,8.8.4.4]
optional: true
wifis:
wlan0:
dhcp4: true
optional: true
access-points:
"Robot-AP":
password: "SomePassword"
mode: ap
The IP address of the sensor is 192.168.42.1
and the IP address of USB0 is 192.168.42.2