Ethernet and TCP/IP in ArduPilot

Amazing. For Ajax dyslexics like me, it would already be very helpful if the script contained examples of how LUA can be used to react to button clicks and text inputs.

Rolf

I’m having a problem with ppp on the AP timing out before the Pi connects. Here’s 2 scenarios.

I have an existing plane running a Durandal with a Raspberry Pi Zero. I previously had uart2 connected to the Pi using mavlink so I know it works. (I can actually get ppp to work by force rebooting the AP after the Pi is up).

Scenario 1: Pi takes longer to boot than the AP

  1. Plugin the flight battery. AP and PI start to boot.
  2. AP completes booting and starts listening for ppp connections
  3. AP gets no ppp connections, throws an error and stops listening
  4. Pi finishes booting (It’s a Pi Zero so it takes about 60 seconds)
  5. Pi fires up pppd, tries to connect to AP but fails because it’s no longer listening

Scenario 2: Set up AP on USB power before booting the Pi

  1. Plugin the AP to a PC using USB
  2. Spend some time (5 - 10 minutes???) setting up a mission or whatever on the AP
  3. ppp on AP times out because it got no connections
  4. Plugin flight battery (USB still connected) - Pi starts booting
  5. 60 seconds later (10-15 minutes after AP booted) Pi finishes booting
  6. Pi fires up pppd, tries to connect to AP but fails because it’s no longer listening

My thought is that ppp on the AP should not timeout and die, it should loop, maybe with a delay, and continue to listen for attempts to connect. The companion computer may not connect on ppp within any hard time limit.

this PR should fix it: AP_Networking: auto-restart PPP on error by tridge · Pull Request #25893 · ArduPilot/ardupilot · GitHub

Yes that works. Thanks @tridge

So I now have ppp running on a Durandal providing IP over serial connection to a Raspberry Pi Zero connected to SERIAL2.

I have the net_webserver.lua running on the Durandal, giving me a web server which can (among other things) download logs direct over http to my PC.

I also have mavp2p on the Pi getting mavlink from the Durandal over the same ppp link and forwarding it securely over Tailscale VPN to my PC(s)

Oh and I’m running nginx as a proxy on the pi so I can also access the web server over my Tailscale VPN.

I have now connected “ArduPilot Cloud” aka Drone Engage via ppp to a vehicle, so I can access the vehicle securely over the internet. Drone Engage Project Website — Ardupilot Cloud EcoSystem documentation

2 Likes

I have now got mavlink2rest connected to the ppp ethernet service, this time on a Zealot H743. In summary, a single ppp connection (over serial/UART) to a flight controller supports (concurrently!):

  • net_webserver.lua running on the AP
  • mavp2p routing to
    • Mission Planner on a PC
    • QGroundControl on a PC
  • ArduPilot Cloud aka Drone Engage
  • mavlink2rest - providing REST based interface to the FC

Screenshot 2024-01-06 at 1.08.06 PM

2 Likes

I have connected the SIYI MK32E ground station to the server:


Details there: SIYI MK32 Enterprise Ground Station - 7" Display, 15KM Range, 4G+64G Android, Dual Operator, Abundant Interface - #121 by Rolf

Rolf

4 Likes

Hi @tridge
i have successfully done the unicast UDP connection between Pixhawk 6X and mission planner(my PC).

Now i am trying to do Multicast and broadcast connection method as you described in the blog here,but unfortunately i could able to do the multicast as well as the broadcast connection.

i am not well knowledged in networking protocols so i kindly help me if possible.
Here are the my flight controller parameter setting and my PC static IP configuration.

Here are the message tap to show the IP configuration and port Number for the UDP
Screenshot 2024-02-05 172625

here are the my Flight controller Local IP parameters.

Here is the Multicast Ip address for the Port 1 .i suspect that here i doing something wrong configuration.How to system know the Destination IPs?

Screenshot 2024-02-05 172731

my PC static IP address:

i can still able to ping the flight controller IP that 192.168.29.14

i have tried broadcast ip 255.255.255.255 also but as i set i am not well knowledge in networking i cant able to find out where i am doing wrong.

NOTE: DHCP set to disabled and NET_P1_TYPE i have tried UDP client and UDP server.

Hi @tridge if you can please guide me on the above thing?

check with wireshark if you are getting the packets onto your local network. It could be an issue with multicast setup on the windows side.
When debugging things like this learning to use wireshark is essential

1 Like

i am not sure MP support Multicast ?
just curious to know about it.

I can confirm I have Ethernet working using a DP83825 PHY on my H7 Stamp Board.

1 Like

Is the PHY integrated in the board? If not can you post a photo of it and a link where to shop?

Yes, the PHY (and Magnetics) take up the bottom right corner. System Overview