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

Nanostack network handle does not always call status cb for BOOTSTRAP events #10434

Merged

Conversation

michalpasztamobica
Copy link
Contributor

Description

UBLOX_EVK_ODIN_W2 advertises more events than we expect.

  1. When disconnecting, first the network connectivity is lost (Nanostack receives MESH_BOOTSTRAP_STARTED and advertises CONNECTING) and only then does an actual disconnection event arrive (DISCONNECT).
    The intermittent CONNECTING phase makes little sense to me after we call net->disconnect(), but actually LWIP interface receives the very same event and simply prevents it from being advertised. I also assume it is the wrapper's responsibility to advertise events according to our spec, regardless of how the underlying driver behaves. I decided to fix it myself, but I admit I am not 100% sure if this should not be raised with the Ublox team...

  2. When reconnecting, MESH_BOOTSTRAP_START_FAILED shows up, but the board eventually manages to connect. If the bootstrap failed, then it is good that the driver advertises this. Our network status flow just doesn't consider this interesting enough to be advertised with the user's callback. Again - LWIP Interface is getting the exact same event and does not call the callback either.

I did not see the network-interface tests failing for any other hardware than Ublox WiFi (UBLOX Ethernet, K64F Ethernet, AT86RF233, MCR20A) but I still think the wrapper should take care of the extra events.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@SeppoTakalo
@VeijoPesonen
@KariHaapalehto
@kjbracey-arm

… events

UBLOX_EVK_ODIN_W2 advertises more events than we expect.
1) When disconnecting first network connectivity is lost and then an
actual disconnection event arrives. The first one is unexpected.
2) When reconnecting MESH_BOOTSTRAP_START_FAILED shows up, but the board
eventually manages to connect
@ciarmcom
Copy link
Member

@michalpasztamobica, thank you for your changes.
@VeijoPesonen @SeppoTakalo @KariHaapalehto @kjbracey-arm @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@adbridge
Copy link
Contributor

ci started

@mbed-ci
Copy link

mbed-ci commented Apr 26, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants