-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Category
Hardware Compatibility
Hardware
Other
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
2.7.12.45f15b8
Description
Hi,
I just tested the unstable 2.7.12.45f15b8 version on multiple nodes. On my RP2040-lora nodes, the firmware just crashes at boot after "READ RTC time as 1".
I traced the code until I found 2 crashes on the modules setup. First was the Input broker (in the HAS_BUTTON condition code), then after I undefined HAS_BUTTON, it crashes on CannedMessageModule setup (in the HAS_SCREEN condition code) , which makes sense because it uses inputbroker.
Anyway, the main problem is that the RP2040-lora does not have any button or screen. So I just undefined these to macros in architecture.h :
#pragma once
#define ARCH_RP2040
#ifndef HAS_BUTTON
#define HAS_BUTTON 1
#endif
#ifndef HAS_TELEMETRY
#define HAS_TELEMETRY 1
#endif
#ifndef HAS_SCREEN
#define HAS_SCREEN 1
#endif
#ifndef HAS_WIRE
#define HAS_WIRE 1
#endif
#ifndef HAS_SENSOR
#define HAS_SENSOR 1
#endif
#ifndef HAS_RADIO
#define HAS_RADIO 1
#endif
#if defined(RPI_PICO)
#define HW_VENDOR meshtastic_HardwareModel_RPI_PICO
#elif defined(RPI_PICO2)
#define HW_VENDOR meshtastic_HardwareModel_RPI_PICO2
#elif defined(RAK11310)
#define HW_VENDOR meshtastic_HardwareModel_RAK11310
#elif defined(SENSELORA_RP2040)
#define HW_VENDOR meshtastic_HardwareModel_SENSELORA_RP2040
#elif defined(RP2040_LORA)
#define HW_VENDOR meshtastic_HardwareModel_RP2040_LORA
#undef HAS_BUTTON
#undef HAS_SCREEN
#elif defined(RP2040_FEATHER_RFM95)
#define HW_VENDOR meshtastic_HardwareModel_RP2040_FEATHER_RFM95
#elif defined(PRIVATE_HW)
#define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW
#endif
// Detect if running in ISR context (ARM Cortex-M33 / RISC-V)
#define xPortInIsrContext() (__get_current_exception() == 0 ? pdFALSE : pdTRUE)
With only these two undef targeted at RP2040_LORA, Meshtastic was booting and working fine again.
I don't known why it was working before, I did not look at it, so I just give you this information, and let you choose the right way to fix it (maybe there is a new bug in the InputBroker code ?). But in any case, the RP2040-lora does not have button or screen.
Hope this helps !
Thx.
Relevant log output
INFO | ??:??:?? 0
//\ E S H T /\ S T / C
DEBUG | ??:??:?? 0 Filesystem files:
DEBUG | ??:??:?? 0 channels.proto (57 Bytes)
DEBUG | ??:??:?? 0 device.proto (62 Bytes)
DEBUG | ??:??:?? 0 nodes.proto (245 Bytes)
DEBUG | ??:??:?? 0 Power::lipoInit lipo sensor is not ready yet
INFO | ??:??:?? 0 Scan for i2c devices
DEBUG | ??:??:?? 0 Scan for I2C devices on port 1
INFO | ??:??:?? 0 No I2C devices found
DEBUG | ??:??:?? 0 acc_info = 0
INFO | ??:??:?? 0 S:B:30,2.7.12.45f15b8,rp2040-lora,meshtastic/firmware
INFO | ??:??:?? 0 Build timestamp: 1759968000
INFO | ??:??:?? 0 Init NodeDB
INFO | ??:??:?? 1 Load /prefs/nodes.proto
INFO | ??:??:?? 1 Loaded /prefs/nodes.proto successfully
INFO | ??:??:?? 1 Loaded saved nodedatabase version 24, with nodes count: 1
INFO | ??:??:?? 1 Load /prefs/device.proto
INFO | ??:??:?? 1 Loaded /prefs/device.proto successfully
INFO | ??:??:?? 1 Loaded saved devicestate version 24
LittleFSDirImpl::openFile: rc=-2 fd=0x200180b4 path=`/prefs/config.proto` openMode=0 accessMode=1 err=-2
ERROR | ??:??:?? 1 Could not open / read /prefs/config.proto
INFO | ??:??:?? 1 Install default LocalConfig
INFO | ??:??:?? 1 Set default channel and radio preferences!
DEBUG | ??:??:?? 1 Expand short PSK #1
INFO | ??:??:?? 1 Wanted region 0, using UNSET
LittleFSDirImpl::openFile: rc=-2 fd=0x200180b4 path=`/prefs/module.proto` openMode=0 accessMode=1 err=-2
ERROR | ??:??:?? 1 Could not open / read /prefs/module.proto
INFO | ??:??:?? 1 Install default ModuleConfig
INFO | ??:??:?? 1 Load /prefs/channels.proto
INFO | ??:??:?? 1 Loaded /prefs/channels.proto successfully
INFO | ??:??:?? 1 Loaded saved channelFile version 24
LittleFSDirImpl::openFile: rc=-2 fd=0x200180b4 path=`/prefs/uiconfig.proto` openMode=0 accessMode=1 err=-2
ERROR | ??:??:?? 1 Could not open / read /prefs/uiconfig.proto
DEBUG | ??:??:?? 1 cleanupMeshDB purged 0 entries
DEBUG | ??:??:?? 1 Use nodenum 0x978ca839
DEBUG | ??:??:?? 1 Expand short PSK #1
INFO | ??:??:?? 1 Wanted region 0, using UNSET
DEBUG | ??:??:?? 1 Coerce telemetry to min of 30 minutes on defaults
INFO | ??:??:?? 1 Sort took 0 milliseconds
DEBUG | ??:??:?? 1 Save to disk 0
WARN | ??:??:?? 1 Packet History - Invalid size -1, using default 200
DEBUG | ??:??:?? 1 Use compiled/slipstreamed tzplaceholder
DEBUG | ??:??:?? 1 Set Timezone to GMT0
DEBUG | ??:??:?? 1 Read RTC time as 1