Servers by jDrones

MavProxy.py "link 1 down" w/ RasPi

All-
I am trying to control my Pixhawk via MavProxy on a Raspberry Pi 3 B. I have installed everything successfully, enabled serial port hardware so I can utilize the ttyS0 connection.

Every time I run mavproxy.py, I only receive the following:

Auto-detected serial ports are:
/dev/ttyS0
Connecting to /dev/ttyS0
Connect /dev/ttyS0 source_system=255
Log Directory:
Telemetry log mav.tlog
Waiting for heartbeat from /dev/ttyS0
MAV> link 1 down

First, should I be concerned that nothing follows the “Log Directory”. Secondly, I am not very familiar with all the tools MavProxy has to help troubleshoot this connection. What should I start with? (If I append --startup, I can see data, but it is gibberish ie. question marked boxes appear in console).’

Thanks in advance!

Dear Sterling_Ralph,

The Pixhawk connected to Raspberry 3 B hardware from TX/RX/GND, 5V(if Raspberry have its own power, not necessary) and the hardware setting can be easily get from website or google.

Pixhawk connect to Raspberry from Mavlink connected. Please ensure your install is right.

I have a similar problem connecting Pixhawk to Raspberry Pi 3 B+ :

root@raspberrypi:/home/pi# mavproxy.py --master=/dev/serial0 --baudrate 57600 --aircraft MyCopter
Connect /dev/serial0 source_system=255
no script MyCopter/mavinit.scr
Log Directory: MyCopter/logs/2019-12-04/flight6
Telemetry log: MyCopter/logs/2019-12-04/flight6/flight.tlog
Waiting for heartbeat from /dev/serial0
MAV> link 1 down

I have confirmed the hw wiring is correct, all sw installs per http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html#raspberry-pi-via-mavlink

I have also tried various baudrates.

I am using the HKPilot32 fc which I understand should be the same as a Pixhawk. It is being powered by a LiPo.

At first I tried installing the apsync image, but was unable to boot the RPi using that - but that’s another issue.

Otherwise I have checked around the various ardupilot discussion forums and failed to find a solution. Some of the tutorials and responders indicate it should be an effortless exercise, yet for many of us it is not.

Hopefully someone with a very good understanding of SBC comms can help! :wink:

@jax200 - I’ve recently released a companion computer image for my ‘Raspian-server’ software. It’s similar to Apsync, so that may work for you: New Companion Computer software: Rpanion-server

@stephendade Stephen, I cannot log in. I’ve tried rpanion/rpanion123, rpanion/rpanion, ardupilot/ardupilot, pi/raspberry… no joy.

And to be clear, we use 10.1.1.1:3000, not 10.0.1.128:22 for ssh?

Jack

The website is at 10.0.1.1:3000.

SSH has the default port username/password. So:
ssh pi@10.0.1.1, then input the password raspberry

Have you confirmed that you’re connected to the Pi’s Wifi network and can access the website?

I cannot ssh or connect to website. yet see it listed as “ardupilot”.
I used keyboard to change pw as requested.

I’m not sure what you mean by this. Where do you see “ardupilot”?

That is what the RPi is broadcasting as the network. Would that come from the volume label when I formatted the sd card?

I used apsync-Raspian-20191123030859.img.

Ahh, we’re talking about different software. I thought you were running the Rpanion-server software, rather than apsync.

Since you’re running apsync, the IP address is 10.0.1.128

Apologies if this thread was in regards to the server software. Should have suspected when you started referring to a website… Regardless, still cannot ssh in.

btw, I am new at this so your help is definitely appreciated.

Ok, in that case:

  1. Connect to the “ardupilot” Wifi (password “ardupilot”)
  2. Check you can ping the Pi ping 10.0.1.128
  3. SSH to the pi via ssh pi@10.0.1.128, then enter password “raspberry”

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)

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

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.

Servers by jDrones