Skip to content

Add automatic mode negotiation#15

Open
andrew153d wants to merge 28 commits intoaarossig:mainfrom
andrew153d:main
Open

Add automatic mode negotiation#15
andrew153d wants to merge 28 commits intoaarossig:mainfrom
andrew153d:main

Conversation

@andrew153d
Copy link
Copy Markdown

This PR adds auto negotiation. On boot, each side sends a discovery message and starts listening. The next program to run sends a discovery message that the first one will receive. Based on the boot order, each side will take a different mode.

@LollosoSi
Copy link
Copy Markdown

Assuming I understood everything in this PR, here are a couple remarks you might find useful:

  1. More than two endpoints in the same channel means a reduction of channel capacity.
    • Moving to a different channel is desirable.
  2. Who is primary and secondary can influence the performance of the link (found during my testing in rf24tunlink)
    Some factors I noted:
    • Quality of the radio modules
    • Execution speed of the endpoints
    • Which of the two devices streams more data

You might want to implement a similar behavior:

  1. The endpoints connect to a shared channel and do their discovery/handshake
  2. The primary radio scans the other channels and finds a clear one (you could do this through: RF24::testCarrier)
    2a. If no channel is available, then listen one of them and find a free address.
  3. The last exchange of the handshake includes the channel and an address/id calculated in a way that could avoid accidental collisions.

Just my opinion. Cool addition

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants