RadioHead on ESP32 - error in RHDatagram::available() when called from RHMesh.recvfromAck with rf95 driver

173 Views Asked by At

Hope you are doing well. I have an error that is causing my code to crash that I have been unable to fix. Any help would be greatly appreciated. I'll put a link to my github repo below as well as the traceback and core dump. The issue is calling manager.recvfromAck(recieveBuffer, &len, &from). It causes the program to crash at RHDatagram::available() with EXCVADDR: 0x0000000c but I am unsure as to why. Any help would be greatly appreciated.  Github link: https://github.com/louisalexander2001/Lora-with-RadioHead/tree/main/main

Serial Output

initBoard
\[    17\]\[I\]\[esp32-hal-i2c.c:75\] i2cInit(): Initialising I2C Master: sda=21 scl=22 freq=100000
Started OLED
\[    19\]\[W\]\[Wire.cpp:301\] begin(): Bus already started in Master Mode.
\[  3423\]\[W\]\[sd_diskio.cpp:174\] sdCommand(): no token received
\[  3681\]\[W\]\[sd_diskio.cpp:174\] sdCommand(): no token received
\[  3781\]\[W\]\[sd_diskio.cpp:174\] sdCommand(): no token received
\[  3880\]\[E\]\[sd_diskio.cpp:199\] sdCommand(): Card Failed! cmd: 0x00
\[  3880\]\[W\]\[sd_diskio.cpp:516\] ff_sd_initialize(): GO_IDLE_STATE failed
\[  3881\]\[E\]\[sd_diskio.cpp:802\] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
\[  3890\]\[W\]\[sd_diskio.cpp:180\] sdCommand(): crc error
\[  3995\]\[W\]\[sd_diskio.cpp:174\] sdCommand(): no token received
\[  4095\]\[W\]\[sd_diskio.cpp:174\] sdCommand(): no token received
\[  4194\]\[E\]\[sd_diskio.cpp:199\] sdCommand(): Card Failed! cmd: 0x00
setupSDCard FAIL
Manager init done
Max length: 245
Lora chip ready
Wifi App Loop: Executing on core 0
Wifi App Running
Main Loop: Executing on core 1
Setup Complete
LoRa App Loop: Executing on core 1
LoRa App Running
0 Dest: 0 Next Hop: 0 State: 0
1 Dest: 0 Next Hop: 0 State: 0
2 Dest: 0 Next Hop: 0 State: 0
3 Dest: 0 Next Hop: 0 State: 0
4 Dest: 0 Next Hop: 0 State: 0
5 Dest: 0 Next Hop: 0 State: 0
6 Dest: 0 Next Hop: 0 State: 0
7 Dest: 0 Next Hop: 0 State: 0
8 Dest: 0 Next Hop: 0 State: 0
9 Dest: 0 Next Hop: 0 State: 0
RHReliableDatagram::recvfromAck - 1
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40101797  PS      : 0x00060e30  A0      : 0x800d29f0  A1      : 0x3ffb2050  
A2      : 0x3ffc8ad0  A3      : 0x00000023  A4      : 0x400d75f8  A5      : 0x3ffb20da  
A6      : 0x007bf418  A7      : 0x003fffff  A8      : 0x00000000  A9      : 0x3ffb2030  
A10     : 0x53414344  A11     : 0x3f400518  A12     : 0x400d75f8  A13     : 0x0000ff00  
A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x0000001f  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x0000000c  LBEG    : 0x400878fd  LEND    : 0x4008790d  LCOUNT  : 0xffffffff

Backtrace: 0x40101794:0x3ffb2050 0x400d29ed:0x3ffb2070 0x400d2d8d:0x3ffb20c0 0x400d265a:0x3ffb2110 0x400d216f:0x3ffb2160 0x400db311:0x3ffb2290

ELF file SHA256: 2a054f09f2933b33

Exception Decoder

PC: 0x40101797: RHDatagram::available() at /Users/louisalexander/Documents/Arduino/libraries/RadioHead/RHDatagram.cpp line 54
EXCVADDR: 0x0000000c
Decoding stack results 0x40101794: RHDatagram::available() at /Users/louisalexander/Documents/Arduino/libraries/RadioHead/RHDatagram.cpp line 54
0x400d29ed: RHReliableDatagram::recvfromAck(unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*) at /Users/louisalexander/Documents/Arduino/libraries/RadioHead/RHReliableDatagram.cpp line 136
0x400d2d8d: RHRouter::recvfromAck(unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*) at /Users/louisalexander/Documents/Arduino/libraries/RadioHead/RHRouter.cpp line 219
0x400d265a: RHMesh::recvfromAck(unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*, unsigned char\*) at /Users/louisalexander/Documents/Arduino/libraries/RadioHead/RHMesh.cpp line 163
0x400d216f: loop() at /Users/louisalexander/Documents/GitHub/repos/Lora-with-RadioHead/main/main.ino line 215
0x400db311: loopTask(void\*) at /Users/louisalexander/Library/Arduino15/packages/esp32/hardware/esp32/2.0.7/cores/esp32/main.cpp line 50
0

There are 0 best solutions below