Architecture of raspberry PI and VAVIO2

Hi,
I have some questions about the architecture scheme of the raspberry PI connected to NAVIO2.
As I understood correctly, raspberry PI and NAVIO2 could communicate through MavLink protocol using serial. Most of the questions are related to this fact.

  1. Is it true that Rasp PI and NAVIO2 could communicate through serial port? How the informations needed by NAVIO2 or rasp PI are exchanged?
  2. It does exist an UART port managed by NAVIO2 firmware?
  3. If I mount raspberrry and Navio2 as described in https://docs.emlid.com/navio2/hardware-setup/ , would the UART of raspberry be connected to the UART of NAVIO2 (if exists)?
  4. I’m trying to follow this guide https://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html (in particular, the MavProxy paragraph) to test the UART connection between NAVIO2 and raspberry PI but when I perform the following command
    python3 mavproxy.py --master=/dev/serial0 --baudrate 921600 --aircraft MyCopter
    I get the following response:
    pyton3: can’t open file ‘mavproxy.py’ : Errno 2 No such file or directory
    Seems that pyton3 can not localte the mavproxy.py: what is the path? Is there a way to make it recognizeble?
  5. param show ARMING_CHECK : how this command is routed from PI to NAVIO2? Through UART connection?
  6. For example the set pwm for the motors. How these commands are routed to NAVIO2?
  7. How mission planner can communicate with NAVIO2? (Mission planner communicates with raspberry PI throw UDP and PI communicates with NAVIO2 through UART?

I’m using arducopter v 4.0.
Thanks for the answers,
Marco.

No,

Navio is a Raspberry Hat. All communication between the Navio Hat and Raspberry is by the 40 pin GPIO

https://docs.emlid.com/navio2/dev/pinout

Yes, It is used for Sik telemetry (primary use) TELEM2="-C /dev/ttyAMA0"

Navio2 can connect to Mission planner via Raspberry Wifi UDP to your Mission planner computer or Mission planner can connect to Navio2 UART (Sik Radio) when Wifi is not available.

Well… actually PIN8 and PIN10 are for ttyAMA0 serial, which is connected to NAVIO2 board… isn’t it?

I enabled the serial port using ‘raspi-config’ command. Then I followed the MAV proxy paragraph . I also enabled “TELEM2=”-C /dev/ttyAMA0" line from the ardupilot file (in etc/default). I performed the command:
python3 mavproxy.py --master=/dev/serial0 --baudrate 921600 --aircraft MyCopter
from the directory /usr/local/bin
but it says the link is down and I cannot issue commands like “param show ARMING_CHECK”. What is the correct procedure to estabilish connection?

Navio2 UART (Sik Radio) and Uart ttyAMA0 (from PI) are the same interface?

Thanks,
Marco.

Hi Marco,

I believe Marc meant that Navio2 and Raspberry Pi are communicating via a 40-pin GPIO header.

Can you double-check what exact file you’ve changed in /etc/default? I see that you work with ArduCopter, then it should be this file: /etc/default/arducopter.

Generally, yes. We simply route the UART from the Raspberry Pi. If you connect a device to the UART port on Navio2, it will be accessible on /dev/ttyAMA0.

Hi,

Ok, clear.

Yes, I meant /etc/default/arducopter:

Ok, clear. But does Navio2 send data to PI itself? I’m not connecting anything to the UART 6-pin connector.

This is the interface enabled:

The PI and NAVIO2 are mounted as follows:
mount

But I’m failing with this command:

Maybe I’m expecting anything that could not happen?
In these conditions and with this setup I’m expecting a response to “ARMING_CHECK” and a “link up”

Please let me know,
Marco.

Hi Marco,

Yes, you’re right. According to the ArduPilot guide, you should see the ARMING_CHECK parameter with the value after typing param show ARMING_CHECK.

Is it possible that the ArduCopter isn’t not running when you work with MAVProxy? Did you run sudo systemctl daemon-reload after changing the launching options?

Hi,

I performed the systemctl status command just before executing the pyton3 mavproxy.py … command.
The systemctl status command is reporting me state:running. So I consider the service correctly running.
Yes, I also performed the systemctl daemo-reload command without any success.

Is there an other way to check this “heart beat”? I beliene it’s a kind of message counter transmitted by NAVIO2.
What if I connect my oscilloscope to the TX pin of the NAVIO? Could you tell me the pin number in the 6-pin connector?
I really don’t know what I’m doing wrong.
Thanks,
Marco.

Hi Marco,

I believe it’s rather some software configuration issue, not a hardware one. Have you tried changing the baudrate in the string? You can set it to 57600 and check how it works.

Hi,

are you the same Marco who asked this question over at the ardupilot forum? I gave the exact lines for mavproxy and /etc/default/arducopter (more than once)
Why do you keep insisting on connecting mavproxy over /dev/ttyAMA0? The guide you were following is meant for MCU based flightcontrollers like the Pixhawk etc.
The Navio is a dumb (sorry Emlid, just to make it clear) collection of sensors, it can not do anything without a Raspberry Pi running an ardupilot executable which accesses the sensors through different connections (SPI and I2C, not UART!) The UART port is just passed through to the 6pin connector on the Navio2.
So, if you want to use mavproxy on a Raspberry Pi with the Navio attached, the ardupilot executable has to output the mavlink telemetry to localhost and mavproxy has to pickup the telemetry from localhost. There is no UART port involved!

The telemetry -A option should read:
-A udp:127.0.0.1:14550
(you got that right)

the mavproxy master option should read:

–master=udp:127.0.0.1:14550 --out:IPofyourGCS:14550