Home        Store        Docs        Blog

Waiting for heartbeat from /dev/ttyAMA0 msg when connecting rsp and pixhawk

(DS Wang) #21

I followed this page to connect my RPi and pixhawk.

http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

And I already had downloaded mavproxy before.


0 Likes

(DS Wang) #22

This is another direction for my connection between RPi and pixhawk

Thank you very much!!!

 

DS Wang


0 Likes

(Jacob) #23

When mavproxy just shows ‘Mav>’ it has not yet connected to a vehicle. Check that you have correct port and baudrate.

0 Likes

(Jacob) #24

The correct usage is ‘arm throttle’ to arm and ‘disarm’ to disarm. Also note that the MANUAL_CONTROL and RC_CHANNELS_OVERRIDE messages will be rejected by the autopilot if the sysid of the sender does not match the SYSID_MYGCS parameter.

0 Likes

(Jacob) #25

Again, you are not actually connected to a vehicle.

0 Likes

(Jacob) #26

You need to specify the right serial port and baud rate that the Pixhawk is connected to with the --master option. If you are using usb, the pixhawk will appear as /dev/ttyACM0 or /dev/ttyACM1 (you can do ls /dev/tty* to see which ports you have). If you are using the UART on the raspberry pi, like in your pictures, you should connect to /dev/ttyAMA0 if you are using a raspberry pi 2 or /dev/ttyS0 if you are using a raspberry pi3. If you want to use the UART, you will also have to disable the console. The baudrate is controlled by the SERIAL parameters on the pixhawk http://ardupilot.org/copter/docs/parameters.html#serial-parameters.

 

-Jacob

0 Likes

Does ardusub-3.4 support telem1/2 communication with pixhawk?
(DS Wang) #27

I followed this page to connect.

http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

I want to use the UART, and I’m using RPi3 now

So I connected it by /dev/ttyS0 (0 is zero)

And the picture is the result after I connected

It still didn’t connect, right?


0 Likes

(DS Wang) #28

I used mission planner to connect pixhawk, and checked the parameters.

I used telemetry2, so I checked the parameters of it.

This picture is the parameters of telemetry.

Is it right? Or I need to change something?


0 Likes

(DS Wang) #29

By the way, I’m not only connecting RPi and pixhawk by UART, but also by USB.

Just like this picture.

Do I need to disconnect the USB port?

Or I need to change something?

I really appreciate your help and effort!!!

Thank you!!!


0 Likes

(Jacob) #30

Mavlink2 is the name of a new version of the mavlink protocol, it does not mean a second mavlink connection. Mavlink2 is not officially supported yet by mavproxy. Select Mavlink1 as the protocol for the port that you will use.

0 Likes

(DS Wang) #31

Hello! Jacob!
I replaced Mavlink2 to Mavlink1, and I thought maybe the mistake is in my wire, so I changed the wire to a new one.
But…it still didn’t work…
http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

I want to consult with you what else mistakes that be ignored by me?
Appreciate for any help!!!

You are my lifesaver, Jacob!
Thank you!!

0 Likes

(James Troeth) #32

@dswang Did you solve this problem? I am having the same problem using rpi3 and px4. In a simple serial connection using putty I can connect but get random characters. (My baud rates are set correctly).

Any help would very much be appreciated

0 Likes

(Jacob) #33

@jtroeth

MAVLink is a binary protocol, so if you are looking at the serial data being sent over the MAVLink connection, then will see the binary data which looks like garbage. If you want to use the data, you need to parse it with code generated by mavgen.py, which is part of the mavlink repository where the messages are defined. MAVProxy is a great development tool and application that will parse the data and handle it for you.

-Jacob

0 Likes

(DS Wang) #34

Not yet…
I’m still stopped on this step…

0 Likes

(James Troeth) #35

Ive fixed mine now. Just check all your baud rates in mission planner. I set all mine but gps to 57600 and connected telem2 through a usb to uart adapter in to the usb ports on the pi. It is then used as /dev/ttyUSB0. I am trying to avoid using the gpio pins to the px4 to minimise issues.

0 Likes

(Sethuraj) #36

Hi,
I have some issues while trying to connect my rpi 3 to APM2.8 over the telemetry port. Is seems like the connection is established, but APM is not receiving any commands from rpi 3.No parameters are received from APM during the connection.

Please help me to get this fixed

0 Likes

(Jacob) #37

What firmware and version is on the apm?

ArduSub will not run on an apm.

0 Likes

(Sanjay panwar) #38

Dear Sir,

We have bought a new Blue ROV2 and we are running a BlueROV2 with advanced electronics package smoothly with QGC on a Windows topside computer. We would like to use MAVproxy simultaneously with QGC to send additional ROV control messages, but have not yet found step-by-step guidance for getting running with MAVproxy.

Little guidance is required so that we can give direct commands from Rpi to ardusub for arming, moving ROV forward/lateral etc.

0 Likes

(Patrick José Pereira) #39

Hello @sjpanwar,

To add more mavlink outputs:

  1. Connect companion with ssh (ssh pi@192.168.2.2), the password is companion.
  2. Edit the mavproxy.param file, and modify the file to be something like this.
--master=/dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v2.x_0-if00,115200
--load-module='GPSInput,DepthOutput'
--source-system=200
--cmd="set heartbeat 0"
--out udpin:localhost:9000
--out udp:192.168.2.1:14550
--out udp:192.168.2.1:14777

Where 1477 is the second port.

  1. Restart companion.

In the client side, if you want to test the two connections, run mavproxy.py --master=udp:192.168.2.1:14550 and mavproxy.py --master=udp:192.168.2.1:14777.

0 Likes

Getting started with MAVproxy
(Sanjay panwar) #40

Dear Sir,
Thanks for quick response.

On login to Rpi
when we try to connect to mavproxy by wiring

sudo -smavproxy.py --master=/dev/ttyACM0 --baudrate 115200

Probably it is getting connected, but start sending continuous junk
but now have suggested by modifying mavproxy.param file.

We will try that and will come back to you.

0 Likes