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

generator/C: Don't parse messages outside CRC_EXTRA #990

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julianoes
Copy link
Contributor

I have been wondering for a while why I sometimes see MAVLink components "appear" with random sysid/compid when I leave a system running for some time.

Today I finally caught the bytes of such a case, the offending bytes were:
{253, 0, 1, 0, 0, 3, 1, 1, 42, 0, 185, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

This is msgid 10753 from sysid 3, compid 1 with payload len 0. It's presumably signed, hence the trailing zeros.

It turns out the msgid is way out of the CRC_EXTRA table and hence the mavlink_get_msg_entry(msgid) function returns NULL. In that case 0 is ignored and we carry on parsing.

My suggestion is to reset parsing when we don't know the CRC_EXTRA of the message to avoid flagging noise as a valid message.

I have been wondering for a while why I sometimes see MAVLink
components "appear" with random sysid/compid when I leave a system
running for some time.

Today I finally caught the bytes of such a case, the offending bytes
were:
{253, 0, 1, 0, 0, 3, 1, 1, 42, 0, 185, 186,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

This is msgid 10753 from sysid 3, compid 1 with payload len 0.
It's presumably signed, hence the trailing zeros.

It turns out the msgid is way out of the CRC_EXTRA table and hence the
mavlink_get_msg_entry(msgid) function returns NULL.
In that case 0 is ignored and we carry on parsing.

My suggestion is to reset parsing when we don't know the CRC_EXTRA of
the message to avoid flagging noise as a valid message.

Signed-off-by: Julian Oes <[email protected]>
@julianoes
Copy link
Contributor Author

Any comment @peterbarker?

FYI @auturgy

@hamishwillee
Copy link
Contributor

@peterbarker Is probably at the conference and @auturgy is away this week. So probably they won't get back to you this week.

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

Successfully merging this pull request may close these issues.

2 participants