Open FlapKap opened 3 months ago
Investigating further the probable cause is the radio not initializing, but this never being propagated. Enabling a bunch of debug flags reveals the following:
Type '/exit' to exit.
2024-07-30 15:07:02,360 # Pro cpu up.
2024-07-30 15:07:02,360 # Single core mode
2024-07-30 15:07:02,361 #
2024-07-30 15:07:02,361 # [semtech-loramac] initializing loramac
2024-07-30 15:07:02,361 # [sx127x] netdev: initializing driver...
2024-07-30 15:07:02,361 # [sx127x] SPI_0 initialized with success
2024-07-30 15:07:02,362 # [sx127x] sx1276 test failed, invalid version number: 0
2024-07-30 15:07:02,362 # [sx127x] error: no valid device found
2024-07-30 15:07:02,362 # [sx127x] netdev: initialization failed
2024-07-30 15:07:02,362 # [semtech-loramac] radio: failed to initialize radio
2024-07-30 15:07:02,362 # [semtech-loramac] radio: initialization successful
2024-07-30 15:07:02,363 # [semtech-loramac] set dr 0
2024-07-30 15:07:02,363 # [semtech-loramac] set adr 0
2024-07-30 15:07:02,363 # [semtech-loramac] set public network 1
2024-07-30 15:07:02,363 # [semtech-loramac] set class 0
2024-07-30 15:07:02,363 # main(): This is RIOT! (Version: 2024.10-devel-25-gfe3a4)
2024-07-30 15:07:02,363 # All up, running the shell now
So this might indeed just be a problem with my board.
The error stops propagating when it hits SX127XInit
in pkg/semtech-loramac/contrib/semtech_loramac_radio.c:45
void SX127XInit(RadioEvents_t *events)
{
(void) events;
assert(loramac_netdev_ptr);
if (loramac_netdev_ptr->driver->init(loramac_netdev_ptr) < 0) {
DEBUG("[semtech-loramac] radio: failed to initialize radio\n");
}
DEBUG("[semtech-loramac] radio: initialization successful\n");
}
However since this function is being used as part of the Radio_s
that defines is as void, I wouldn't know how to properly propagate this error further
Description
trying to otaa join using the
tests/pkg/semtech-loramac
test results in a kernel panic due to a failed assertion in the esp sdkrelevant snippet from the "actual results" section below
This error also happens in riot version 2024.04 and 2024.01
Steps to reproduce the issue
Assuming the esp build environment is set up with
. dist/tools/esptools/export.sh all
build and run the test usingBOARD=esp32-ttgo-t-beam make -C tests/pkg/semtech-loramac/ all flash term
. Then executeloramac join otaa
in the shell.Expected results
That it fails to join since we haven't provided any keys. However it will give the same result even if we give correct keys.
Actual results
Versions
output of
make print-versions