Skip to content

Conversation

@TMRh20
Copy link
Member

@TMRh20 TMRh20 commented Jun 16, 2024

  • Define MESH_CONNECTION_CHECK_ATTEMPTS in RF24Mesh_config.h & add doc info

checkConnection() function:

  • Return from checkConnection() if -2 received (not in list or default address)
  • retry if -1 (write failed or timed out)
  • success if address matches
  • fail otherwise

This should enhance stability a bit by raising the connection check attempts to 3.

It should also enhance the actual connection check by returning immediately and not retrying if a -2 is received (not in list or default address).

Furthermore it actually verifies that the returned RF24Network address matches the existing RF24Network address.

- Define MESH_CONNECTION_CHECK_ATTEMPTS
- Return from checkConnection() if -2 received, retry if -1, success if address matches, fail otherwise
@TMRh20 TMRh20 requested a review from 2bndy5 June 16, 2024 11:48
Copy link
Member

@2bndy5 2bndy5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think a return statement needs to be followed by a break statement in a switch block.

TMRh20 and others added 2 commits June 16, 2024 05:57
Co-authored-by: Brendan <2bndy5@gmail.com>
@TMRh20 TMRh20 merged commit 7827e87 into master Jun 16, 2024
@TMRh20 TMRh20 deleted the CheckConnection branch June 16, 2024 12:44
2bndy5 added a commit that referenced this pull request Jun 16, 2024
* Modify checkConnection()

- Define MESH_CONNECTION_CHECK_ATTEMPTS
- Return from checkConnection() if -2 received, retry if -1, success if address matches, fail otherwise

* Update RF24Mesh_config.h

Co-authored-by: Brendan <2bndy5@gmail.com>

* Remove breaks; from switch

- Per @2bndy5 in #240

* Update comment

---------

Co-authored-by: Brendan <2bndy5@gmail.com>
@2bndy5
Copy link
Member

2bndy5 commented Jun 16, 2024

cherry-picked to v1.x

@2bndy5
Copy link
Member

2bndy5 commented Jun 16, 2024

Did you want to try that new bump-n-release workflow? Or do you have some more pleasant surprises in store?

@TMRh20
Copy link
Member Author

TMRh20 commented Jun 16, 2024

I'm planning to do a little more coding over the next week or so, so lets see if I come up with anything else. This one I just came across while glancing at the code...

2bndy5 added a commit to nRF24/CircuitPython_nRF24L01 that referenced this pull request Jun 17, 2024
2bndy5 added a commit to nRF24/CircuitPython_nRF24L01 that referenced this pull request Jan 29, 2025
* fix multicasting to level 2 and 4
* use all poll responses in mesh request_address()
* reviewed RF24Messh._make_contacts()
* use a set to avoid duplicates in list of poll responses
* port changes to RF24Mesh.check_connection()
  per nRF24/RF24Mesh#240
* expose new release_address() for master nodes
  per nRF24/RF24Mesh#244
* improve scanner promiscuity
  similar to changes in nRF24/RF24#955
* update check_connection()
  per nRF24/RF24Mesh#250
* refactor network example for testing mesh connectivity
* short circuit renew_address() when called from the master node
* depend on spidev for linux arm 32 and 64 bit
* abstract master code in check_connection()
* don't use `check_connection()` in net example's `set_role()`
* update RTD config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants