CubePilot CubeNode ETH¶

The CubePilot CubeNode ETH ethernet adapter allows STM32 H7 autopilots without built-in ethernet support to connect to ethernet peripherals. This is often used in combination with a CubeLAN 8 Port Switch
Some images courtesy of CubePilot
Where To Buy¶
The CubeNode ETH can be purchased from CubePilot resellers
Optionally the CubeLAN 8 Port Switch may be useful to connect multiple devices via Ethernet
Connecting to the Autopilot¶

Connect one of the autopilot’s serial ports to the CubeNodeETH’s UART port. For optimum performance the autopilot’s serial port should support flow control which normally means using Serial1 or Serial2. In the image above Serial2 is used.
Connect one of the autopilot’s CAN ports to the CubeNodeETH’s CAN port. This connection is only used to configure the device and so it maybe removed after the configuration is completed. In the image above the autopilot’s CAN1 is used.
While difficult to see in the image above, the CubeNodeETH has a 5-pin ethernet connector with the same pin layout as the CubeLAN 8 Port Switch

The general rule when connecting ethernet devices is:
When connecting a device to a switch the pins should be connected straight through (e.g. RX+ to RX+, RX- to RX-, TX+ to TX+, TX- to TX-)
When connecting a device to a device the pins should be crossed (e.g. RX+ to TX+, RX- to TX-, TX+ to RX+, TX- to RX-)
Install ArduPilot with PPP Support¶
PPP allows an autopilot to communicate over Ethernet using a serial port but with the exception of the CubePilot CubeOrangePlus, PPP is not included by default in the ArduPilot firmware.
Use the Custom Firmware Build Server to build a firmware that includes PPP support

Alternatively build the code yourself and enable PPP by adding
--enable-PPP
to the waf configuration step
Autopilot Configuration¶
See the PPP configuration
and ArduPilot Port Configuration
sections of Ethernet / Network Setup but in short set these parameters:
CAN_P1_DRIVER = 1 (First driver)
CAN_D1_DRIVER = 1 (DroneCAN)
NET_ENABLE = 1
SERIAL2_PROTOCOL = 48 (PPP)
SERIAL2_BAUD = 12500000 (12.5MBaud)
To allow the autopilot to eventually communicate with other ethernet devices, the NET_P1_TYPE, NET_P1_PROTOCOL, etc parameters will need to be set. More details on the settings required can be found in the “Ethernet Conectivity” sections of the ArduPilot wiki page for the device. For example Siyi camera setups can be found on this page
CubeNodeETH Setup¶

The CubeNodeETH’s parameters can be set using Mission Planner’s DroneCAN screen or the DroneCAN GUI tool. The following instructions assume Mission Planner is used:
Connect to the AutoPilot with Mission Planner
Open the Setup, Optional Hardware, DroneCAN/UAVCAN screen
From the top-left drop-down select MAVLinkCAN1 (or MAVLinkCAN2 if the autopilot’s CAN2 is used)
Press “Connect” and the table should be populated with the available DroneCAN devices including “org.ardupilot.CubePilot-PPPGW”
Press the “Menu” button on the right side and select “Parameters”
Set the following parameters and press the “Write” button
NET_DHCP = 0 (to disable dynamic IP assignment)
NET_IPADDR0 = 192 (default)
NET_IPADDR1 = 168 (default)
NET_IPADDR2 = 144
NET_IPADDR3 = 14
NET_GWADDR0 = 192 (default)
NET_GWADDR1 = 168 (default)
NET_GWADDR2 = 144
NET_GWADDR3 = 1
Reboot the system or from the DroneCAN screen select “Menu”, “Restart”
On the next autopilot reboot, messages like those shown below should appear. Note that the autopilot’s IP address’s final octet is one higher (e.g. “15”) than the CubeNodeETH’s IP address (e.g. “14”)

The IP addresses chosen above are somewhat arbitrary but work well for many systems. In general all ethernet devices on the drone should be in the same subnet meaning the first three octets of the IP address (e.g. 192.168.144.x) should match while the last octet should be unique to each device.