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

MAVLINK heartbeats from recent SIK firmware not detected #144

Open
syn-tax-err opened this issue Sep 7, 2018 · 0 comments
Open

MAVLINK heartbeats from recent SIK firmware not detected #144

syn-tax-err opened this issue Sep 7, 2018 · 0 comments

Comments

@syn-tax-err
Copy link

Recent versions of SIK use a different radio status message ID in MAVLINK, which is currently not detected by servald, causing new RFD radios to appear no-op (key symptom is "TX: 1, RX: 0" in the interface packet counters).

The relevant change in SIK is here:
ArduPilot/SiK@697c8a4#diff-9991bbe30c29719d7f8948c2d4fb3b56R47
TL;DR: new message 109 (0x6d) replaces old message 166 (0xa6), message format is unchanged.

Currently, servald only tests for old MAVLINK heartbeats, ignoring the new ones. This happens at two locations in the code:

#define MAVLINK_MSG_ID_RADIO 166

serval-dna/radio_link.c

Lines 346 to 350 in c252644

if (payload[0]==0xFE
&& payload[1]==9
&& payload[3]==RADIO_SOURCE_SYSTEM
&& payload[4]==RADIO_SOURCE_COMPONENT
&& payload[5]==MAVLINK_MSG_ID_RADIO){

serval-dna/radio_link.c

Lines 476 to 480 in c252644

if (p[0]==0xFE
&& p[1]==9
&& p[3]==RADIO_SOURCE_SYSTEM
&& p[4]==RADIO_SOURCE_COMPONENT
&& p[5]==MAVLINK_MSG_ID_RADIO){

The issue is fixed by testing payload[5] against both message type IDs.

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

No branches or pull requests

1 participant