Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

semtech_loramac_init blocking #17907

Closed
ge-lem opened this issue Apr 7, 2022 · 5 comments · Fixed by #17969
Closed

semtech_loramac_init blocking #17907

ge-lem opened this issue Apr 7, 2022 · 5 comments · Fixed by #17969
Assignees
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@ge-lem
Copy link

ge-lem commented Apr 7, 2022

Description

the function semtech_loramac_init is blocking, never return, in the example RIOT/examples/lorawan

semtech_loramac_init(&loramac);

Working in version 2022.01

Steps to reproduce the issue

Run the example RIOT/examples/lorawan with a board with sx1276. You dont need to set APPKEY and DEVEUI to test.

The program is stuck at semtech_loramac_init

semtech_loramac_init(&loramac);

Versions

Working in version 2022.01

@geonnave
Copy link
Contributor

Hi, you could try enabling debug messages in the drivers to see what's going on.

For example, in pkg/semtech-loramac/contrib/semtech_loramac.c:

-#define ENABLE_DEBUG 0
+#define ENABLE_DEBUG 1

@fjmolinas fjmolinas assigned aabadie and fjmolinas and unassigned aabadie Apr 20, 2022
@aabadie aabadie added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Apr 20, 2022
@aabadie
Copy link
Contributor

aabadie commented Apr 20, 2022

Can you check if your problem is fixed by disabling the EEPROM usage ? (by trying PR #17969)

@fjmolinas
Copy link
Contributor

Re-opening since there is no confirmation that this is actually fixed yet, it was auto-closed by the merged #17970

@fjmolinas fjmolinas reopened this Apr 21, 2022
@maribu
Copy link
Member

maribu commented Jan 5, 2023

Let's say the absence of further complaints is confirming that #17970 indeed fixed the issue :)

@maribu maribu closed this as completed Jan 5, 2023
@ant9000
Copy link
Contributor

ant9000 commented Jan 21, 2023

Sorry to break bad news, but I've stumbled on this problem right now on a SAMR34-XPRO board.

I'm testing examples/lorawan on master branch, with ENABLE_DEBUG=1 in the following files:

contrib/semtech_loramac.c
contrib/semtech_loramac_getset.c
contrib/semtech_loramac_radio.c

Here is an excerpt of what happens at board reset:

2023-01-21 16:57:43,706 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-01-21 16:57:48,585 # [semtech-loramac] initializing loramac
2023-01-21 16:57:48,621 # [semtech-loramac] unexpected netdev event received: 8
2023-01-21 16:57:48,626 # [semtech-loramac] radio: initialization successful
2023-01-21 16:57:48,665 # [semtech-loramac] set dr 0
2023-01-21 16:57:48,668 # [semtech-loramac] set adr 0
2023-01-21 16:57:48,671 # [semtech-loramac] set public network 1
2023-01-21 16:57:48,674 # [semtech-loramac] set class 0
2023-01-21 16:57:48,679 # main(): This is RIOT! (Version: 2023.04-devel-162-g90c2d)
2023-01-21 16:57:48,683 # LoRaWAN Class A low-power application
2023-01-21 16:57:48,686 # =====================================
2023-01-21 16:57:48,689 # [semtech-loramac] set dr 5
2023-01-21 16:57:48,691 # Starting join procedure
2023-01-21 16:57:48,695 # [semtech-loramac] Starting join procedure: 0
2023-01-21 16:57:48,698 # [semtech-loramac] loramac cmd msg
2023-01-21 16:57:48,701 # [semtech-loramac] starting OTAA join
2023-01-21 16:57:48,703 # [semtech-loramac] get dr

No radio packet is emitted (at least, nothing arrives at my gateway), and the board is stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants