Lines from the network connection
What ArduPilot says:
- NET: Failed to allocate buffers
- UDP[N]: bound to …:N
- TCP[N]: bound to …:N
- TCP[N]: disconnected
- NET: Gateway …
- PPP: failed to create link
Also explained here: 23 more
- PPP: got addresses
- PPP: error N
- NET: backend init failed
- UDP[N]: connected to …:N
- TCP[N]: closed connection
- NET: backend_PPP init failed
- NET: macInit failed
- UDP[N]: Failed to bind to …:N
- PPP[N]: reconnecting
- PPP[N]: failed to create link
- PPP[N]: got addresses
- PPP: reconnecting
- PPP[N]: error N
- UDP[N]: Failed to connect to …
- PPP: started
- TCP[N]: connection from …:N
- NET: Mask …
- TCP[N]: Failed to bind to …:N
- NET: backend failed
- PPP[N]: started
- TCP[N]: connected to …:N
- NET: IP …
- NET: Initialized
A board with an Ethernet port, or a PPP link over a serial port (SERIALn_PROTOCOL 48), can carry MAVLink and other data over a network when NET_ENABLE is 1. “NET: IP”, “Mask” and “Gateway” show the address in use, at start-up and whenever it changes, for instance when DHCP answers. “TCP[n]” and “UDP[n]” lines belong to network port n (NET_P1_TYPE and the following): bound, connected, disconnected. “PPP” lines follow the PPP link: started, got addresses, reconnecting, error.
What to do, most likely first
“backend failed”, “backend init failed”, “macInit failed”, “Failed to allocate buffers”: networking could not start.
CheckDoes this board have Ethernet at all, and enough free memory? Without either,
NET_ENABLE1 cannot work.FixSet
NET_ENABLEto 0 on a board without networking, or free memory and reboot.“Failed to bind” or “Failed to connect”: the address or port number of a network port is wrong, or already in use.
CheckCompare the address in the line with the “NET: IP” and “Mask” lines: are they on the same network?
FixCorrect that network port's address and port parameters and reboot.
Parameters to look at
| Parameter | What it is |
|---|---|
NET_ENABLE | Networking Enable |
NET_DHCP | DHCP client |
NET_IPADDR0 | IPv4 Address 1st byte |
NET_P1_TYPE | Port type |
Where to do it:Board & Wiring Planner
The code that sends it
NET: Failed to allocate buffers
libraries/AP_Networking/AP_Networking_ChibiOS.cpp AP_Networking_ChibiOS::init() · Open in ArduPilot Copter-4.7.1
UDP[N]: bound to …:N
libraries/AP_Networking/AP_Networking_port.cpp AP_Networking::Port::udp_server_loop() · Open in ArduPilot Copter-4.7.1
TCP[N]: bound to …:N
libraries/AP_Networking/AP_Networking_port.cpp AP_Networking::Port::tcp_server_loop() · Open in ArduPilot Copter-4.7.1
TCP[N]: disconnected
libraries/AP_Networking/AP_Networking_port.cpp AP_Networking::Port::send_receive() · Open in ArduPilot Copter-4.7.1
And 25 more messages, sent from the same places.