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

Projects
None yet
6 participants
@michalpasztamobica
Copy link
Contributor

commented Apr 17, 2019

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

Nanostack network handle does not always call status cb for BOOTSTRAP…
… 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 ciarmcom requested review from KariHaapalehto, kjbracey-arm, SeppoTakalo, VeijoPesonen and ARMmbed/mbed-os-maintainers Apr 17, 2019

@ciarmcom

This comment has been minimized.

@adbridge adbridge added needs: CI and removed needs: review labels Apr 25, 2019

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

ci started

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 26, 2019

Test run: SUCCESS

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

@adbridge adbridge merged commit 016ce32 into ARMmbed:master Apr 26, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage Success
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 9737 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.