Endian-ness setting

83 views
Skip to first unread message

Ankan Sardar

unread,
Jan 24, 2020, 2:15:18 AM1/24/20
to MAVLink
I am communicating between two systems one of which is big-endian and another is in little-endian. I didn't handle anything in MAVLink protocol to cater for that. So the parsing of every message I am receiving in the little-endian machine is failing with bad checksum. What should I do about that?

james pattison

unread,
Jan 24, 2020, 3:04:10 AM1/24/20
to mav...@googlegroups.com
The problem is likely the big endian system. Mavlink is little endian on the wire, and the tooling defaults that way. See

Regards,

James 

On 24 Jan 2020, at 6:15 pm, Ankan Sardar <ankans...@gmail.com> wrote:


I am communicating between two systems one of which is big-endian and another is in little-endian. I didn't handle anything in MAVLink protocol to cater for that. So the parsing of every message I am receiving in the little-endian machine is failing with bad checksum. What should I do about that?

--
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/mavlink/1dfa7787-4e57-4999-8036-f515ade59336%40googlegroups.com auf.

Ankan Sardar

unread,
Jan 24, 2020, 4:27:28 AM1/24/20
to MAVLink
So should I just define NATIVE_BIG_ENDIAN in protocol.h in the big endian machine and and it would work?


On Friday, January 24, 2020 at 1:34:10 PM UTC+5:30, james pattison wrote:
The problem is likely the big endian system. Mavlink is little endian on the wire, and the tooling defaults that way. See

Regards,

James 

On 24 Jan 2020, at 6:15 pm, Ankan Sardar <ankans...@gmail.com> wrote:


I am communicating between two systems one of which is big-endian and another is in little-endian. I didn't handle anything in MAVLink protocol to cater for that. So the parsing of every message I am receiving in the little-endian machine is failing with bad checksum. What should I do about that?

--
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an mav...@googlegroups.com.

james pattison

unread,
Jan 24, 2020, 5:00:17 AM1/24/20
to mav...@googlegroups.com
I’ve pointed you in the right direction.
Whether your code will work I’m not going to guess.

Regards,

James 

On 24 Jan 2020, at 8:27 pm, Ankan Sardar <ankans...@gmail.com> wrote:


Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/mavlink/712a2fa4-106a-4d49-a715-830c0245634e%40googlegroups.com auf.
Reply all
Reply to author
Forward
0 new messages