Sonar data in real time

I know this question has been up before but I could not find a definite answer.

I am currently running the APM 2.5 (ArduCopter V3.1.4) together with a Beaglebone Black and I am trying to retrieve the sonar data in real time so I can use it on the Beaglebone. My question is if it is possible?

As far as I have figured out there should be two ways of doing this, either by reading the mavlink message directly or by using the telemetry log.

Easiest for me would if I could just read the mavlink message (rangefinder ID 173) but I can't seem to find how to request the APM to start transmitting this data. Is this something that is implemented in the APM copter firmware? If so, how should I proceed to request this data stream? I have tried to request all of the data streams listed on but none of them seem to activate the rangefinder data.


You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Maybe this will help:

    Re: [ardupilot] Copter: add support for mavlink do-sonar-test (#1081) (

    Randy Mackay has told me that "AC3.2-rc2 will report the sonar distance to the ground station so then MP could display that distance on the sonar set-up page to make it easier to test.
    In fact the sonar distance will be displayed already (once AC3.2-rc2 goes out) in the Flight Data screen's Status tab. There's a lot of data there though and it's hard to find things so maybe a separate display on the sonar setup page would be helpful.

    I've raised an issue over on MP, so I'm going to close this one.

This reply was deleted.