Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PX4 Ping Message Protocol #9233

Closed
weiminshen99 opened this issue Apr 3, 2018 · 7 comments
Closed

PX4 Ping Message Protocol #9233

weiminshen99 opened this issue Apr 3, 2018 · 7 comments

Comments

@weiminshen99
Copy link

weiminshen99 commented Apr 3, 2018

Inspired by #6721, has someone implemented the complete PING protocol among PX4s and QGC? The current code does only a part of the job: https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_receiver.cpp#L1718-L1728

According to the spec in http://mavlink.org/messages/common#PING, a ping message should be either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. It is particularly useful when multiple UAVs and PX4s are flying in a swarm formation. Given the fact that more and more people are interested in multiple-UAVs, could someone please take the lead and implement the complete protocol? Thank you very much in advance!

@dagar
Copy link
Member

dagar commented Apr 4, 2018

Doesn't this just need the time and sequence filled in before broadcast?

@mhkabir
Copy link
Member

mhkabir commented Apr 4, 2018

Yep. And a way to expose ping stats via mavlink status.

I already have a working branch for this. Let me share it via a PR after some cleanup.

@weiminshen99
Copy link
Author

Hi, @mhkabir,
Thank you and that is great! I see you already made some enhancement milestones.
I do have a question about this protocol. According to the spec, which says that the target_system is "0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system". If this is the only thing it does, then how do people ping from one particular UAV to another particular UAV?

@mhkabir
Copy link
Member

mhkabir commented Apr 6, 2018

You can send a PING message with 0 and then check the returned PING for the sysid of the UAV you are interested in.

@weiminshen99
Copy link
Author

I see. Thanks!

@mhkabir
Copy link
Member

mhkabir commented Apr 7, 2018

WIP branch is here : https://github.com/PX4/Firmware/tree/pr-ping-protocol. QGC does not seem to respond to pings, so I need help on that side to add support for returning pings.

@DonLakeFlyer How hard would it be to add a PING response functionality in QGC?

@dagar
Copy link
Member

dagar commented May 27, 2018

Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants