MavProxy.py "link 1 down" w/ RasPi

Hi Stephen

I successfully connected to the ardupilot access point.

However, I was unable to connect to the FC via MP/UDP at 14550. The SIK radio is ok.

Also, I am unable to load pymavlink and mavproxy as I was when configuring it with the raspbian image.


Could you clarify use of the server software vs the apsync image? As I understand, either one is used for FC/companion communication and telemetry downloads? Is it because the former offers communication via the internet?

A flight operation could then involve use of the WiFi link, the SIK radio link for GCS communication and the TX transmitter for flight control? So three comm protocols are simultaneously occurring? Which of the three is used to monitor data downloading? For example, from sensors that I would like to connect to a companion board? I want to fly to WPs, measure a physical parameter, then time/GPS stamp it.

Sorry for all the questions - again the help is very much appreciated.

Are you able to confirm if the Pi is getting telemetry? Go to the APWeb interface at http://10.0.1.128 and check if you’re getting telemetry there.

Both pymavlink and mavproxy are already installed on APSync. You can start mavproxy with mavproxy.py --master=udpout:10.0.1.128:14550

Both APSync and Rpanion-server are similar, in that they both offer: Wifi access point, video streaming, telemetry forwarding, web interface. Just different options.

Correct. Note that the Wifi link and SiK radio link are sending exactly the same data - MAVLink telemetry.

Yep, that’s definitely possible. You’d likely need to write the software yourself though, depending on what sort of existing software support there is for the exact sensor you’re using.

I confirmed the web interface
image

Mavproxy provided MAV>, but as before I got “link 1 down”.

Curiously, when I later rebooted, it would constantly crash after the end of the boot sequence. So I reflashed the image and it was ok. But still getting “link 1 down”.

If I tried to reboot the “Flight Board”, nothing happened. Looking at System Status, I’m not seeing data.
I supose I might conclude there is something wrong in the hardwiring between boards, but I have confirmed the continuity of the cable and the proper RPi GPIOs are used.

Not sure what the next step would be other than to try other boards.

I put it on a RPi 2 B, but instead of “ardupilot” I get “Hidden Network” and rpanion/rpanion123 doesn’t get me in.

This looks great. I sadly have a Pix Cube with Intel Edison carrier board and Intel Edison that does not seem worth pursuing – I got it used but APSync seems like abandonware. When I get a chance I will slap a Pixracer on a RPi3.

Have you configured the telemetry settings on your flight controller?

  • SERIAL1_BAUD 921
  • SERIAL1_OPTIONS 2
    (ensuring you’re using the TELEM1 port in this case)

@stephendade Well… I went back to my RPi 3 B+, and got this

image

To reiterate, the process used was (copter example):

  1. RPi 3 B+
  2. HK Pilot32 FC (ie, Pixhawk 2.1)
  3. Proper hardwiring between boards confirmed as per ardupilot.org/dev
  4. apsync-Raspian-20191123030859.img
  5. FC settings per ardupilot.org/dev (using SERIAL2)
  6. Opened “ardupilot” AP
  7. Confirmed at http://10.0.1.128
  8. Issued commands w/o going root
  9. mavproxy.py --master=udpout:10.0.1.128:14550 --baudrate 921600 --aircraft MyCopter

So now it is working, but questions remain:

  1. Why did this not work previously? (Perhaps my wiring was not secure?)
  2. Why does ardupilot/dev recommend running commands as root?
  3. Why don’t the ardupilot/dev instructions work if followed directly ?
  4. Why does the rpanion AP sometimes fail?
    image

BTW, there is no “SERIAL1_OPTIONS” on MP that I can see.

Many thanks for your help Stephen. This has helped me get past a rather frustrating obstacle.

I followed up to execute mavproxy after login automatically as per ardupilot.org/dev “Configure MAVProxy to always run”, but no luck.

Does apsync preclude this modification?

Ok, that’s good. That means that mavlink-router is routing the telemetry from the serial port to over udp.

What commands? The apsync img file is preconfigured. No extra commands are required.

You don’t need to use the --baud option when using a udp source

Generally, you should only run as root when making system modifications that require it.

Looking at the https://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html, those instructions are quite old and probably don’t work anymore. They need updating (thanks for pointing that out!). Hopefully I’ll have some time over the Christmas break to update them.

Rpanion is a completely different software with a different img file to download and install. You can have Rpanion or Apsync running on your Pi, not both.

Oops, that was a typo. I meant the SERIAL1_PROTOCOL (set to 2)

APSync uses mavlink-router to distribute the telemetry, and is already set to auto-start in the imgfile. You don’t need to use MAVProxy for that.

OK, why is “Server connection interrupted” occurring (see image in prior response)? Everything is located within feet of one another.

What are the limitations of employing this configuration in flight, and what can be done to ensure signal connectivity?

Also, which of the “open hardware” does/will apsync work with ?
https://ardupilot.org/copter/docs/common-autopilots.html#open-hardware

Also, you mentioned above

What are the different options? How does one choose between the two?

That would mean your Wifi connection is cutting out. I’m not sure why.

The Wifi range would be the limiting factor. From what I recall the Pi’s Wifi range isn’t brilliant. The exact range would depend on the Pi’s mounting in the vehicle and any potential interference from other devices. You’d need to measure it yourself for an accurate number.

All of it. Apsync will talk with any controller that runs Ardupilot.

I wrote Rpanion-server, so I’m probably a bit biased :slight_smile: Rpanion-server is designed to be easier to use and install, but it’s quite new software so there may still be a few bugs in it.

Thanks again for your guidance.

@stephendade can we use higher power WiFi through the USB ports?

Yes, that would work.

I have my RPI zero w connected to my pixhawk 4 mini telem port and get the same error as the original post.
I only connected the tx & rx of my pi. The pi it’s powered on USB. Is GND necessary for a stable connection?

yes it is…

Hi guys. I have a rpi4 with the same link 1 down issue on ttyS0. Any idea how to get a link. on the web portal I can get read all the parameters and stuff. Just can’t connect via MAVProxy.

Is there anyone working on Pixhawk with Jetson Xavier NX. I have the issue that the command mavproxy.py --master=/dev/tthTHS0 --out=udp:192.168.0.119:14550 --cmd='set shownoise 0'
works sometimes, while sometimes not. Moreover, even when it does, it only works for a few min , then showing "link 1 down’ as the pic show below.
While I’m connecting the Jetson Xavier NX to Pixhawk Cube with arducopter v3.6.11 via TX RX GND to pixhawk cube telem2
Does anyone have any idea about this?

Dear ardupilot community, we are two German computer scientist guys working on a bachelor thesis for programming a drone to fly automatically through a room while measuring it. We found the following tutorial using a raspberry pi, the navio2 hat and the ardupilot software including mavlink. (Integration of ArduPilot and VIO tracking camera (Part 4): non-ROS bridge to MAVLink in Python) Unfortunately we are not able to make the raspberry pi communicate with the navio2 board via the serial0 / ttyS0 connection, although the system is correctly up and running. We always get the error “MAV link1 down” and no connection is established. As you can see from our shell, all components seem to be quite updated and running correctly. Do you have any idea what we can try next to make it working? Any help is very appreciated! Thanks in advance and regards from Germany! Stay healthy.

The Navio board does not interface via serial port, rather it uses network ports. See https://docs.emlid.com/navio2/ardupilot/installation-and-running#mavproxy