#9894·firmware

[Bug]: cpu big-Endian problem

Author: stm32repoCreated Mar 12, 2026Updated Sep 18, 2026
Labelsbughelp wantedfirst-contribution

Category

Hardware Compatibility

Hardware

Linux Native

Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?

  • Meshtastic UI aka MUI colorTFT
  • InkHUD ePaper
  • OLED slide UI on any display

Firmware Version

v2.7.15.567b8ea

Description

When running Meshtastic firmware on big-endian CPUs (e.g., MIPS 74Kc / Atheros AR9341), received LoRa packets often fail to decode, producing errors like:

Can't decode protobuf reason='end-of-stream' Invalid protobufs in received mesh packet (bad psk?)

The root cause appears to be that the firmware reads radioBuffer.header fields (from, to, id, flags, etc.) directly from raw bytes without accounting for CPU endianness.

Specifically, the from field appears byte-swapped

Relevant log output

meshtasticd[1938]: ERROR | 09:40:40 7 [Router] Can't decode protobuf reason='end-of-stream', pb_msgdesc 0x5976a8
meshtasticd[1938]: ERROR | 09:40:40 7 [Router] Invalid protobufs in received mesh packet id=0xadb42710 (bad psk?)!

DEBUG | 09:40:40 7 [Router] packet decoding failed or skipped (no PSK?) (id=0xadb42710 fr=0xe2528084 to=0xffffffff, transport = 1, WantAck=0, HopLim=2 Ch=0x8 encrypted len=25 rxSNR)