Skip to content

LoRaWAN connect() wrongly reports BUSY after incomplete connection attempt #7659

@EnsilicaEdd

Description

@EnsilicaEdd

Description

I've been testing corner cases in my project: trying to connect to LoRaWAN over-and-over and/or using the wrong credentials.

What I've found is that LoRaWANInterface::connect() returns LORAWAN_STATUS_BUSY if I call it after a previous, incomplete connect(). Incomplete in this case means that I either deliberately called disconnect() before receiving a CONNECTED event, or that I waited for a JOIN_FAILURE event.

I believe the issue is that CONN_IN_PROGRESS_FLAG is not being cleared from _ctrl_flags (in LoRaWANStack.cpp) in these two cases.

I'm not especially up-to-date, but I can't see any recent changes in the areas I believe need tweaking. I'll make a Pull Request with my suggested fix shortly.

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions