MavProxy.py "link 1 down" w/ RasPi

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 Communicating with Raspberry Pi via MAVLink — Dev documentation, 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 Installation and running | Navio2

Same problem here …
i’ve been trying to connect a pixhawk cube black to a RPI4B . i did all the steps on mavling documentation already 3 times as i am really fresh on raspberry .
changed the serial port as said, added the line droverlay=disable-bt on boot config. after the MAV> link 1 down i can switch flighht modes but have no return. rebuilt the cable 2 times already…
Any sollutions?

trac@raspberrypi:~ $ mavproxy.py --master=/dev/ttyAMA0
WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
Connect /dev/ttyAMA0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyAMA0
MAV> link 1 down
MANUAL

Cheers

EDIT
i “purged” modemmanager as shown on the message above. now;
Connect /dev/serial0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/serial0
MAV> link 1 down

I’m having the exact same problem with Jetson Nano
it runs fine but after some time i get :
RTL> no link
link 1 down
no link
no link
… repeated forever…

any solution for this ?

i solved the problem, i was using MATEK743 wing which has STM32 Mcu.
I updated the Ardupilot within Mission Planner, which is not recommended.
so i fully erased and programmed the flight controller using STM32CubeProgrammer in dfu mode which is the right way to do it.

I have same issue. I think mavproxy crashs Raspberry serial port.