volca02 / hr20-esp12-master

Re-implementation (with different features) of the master portion of OpenHR20 wireless project
GNU General Public License v2.0
12 stars 5 forks source link

support wl_force_addr in sync packets #8

Closed volca02 closed 6 years ago

volca02 commented 6 years ago

It is needed to wake the clients up before their low frequency reporting happens.

volca02 commented 6 years ago

There are actually two modes of operation for this:

  1. wl_force_addr1 / wl_force_addr2 contain even/odd addresses (even/odd seconds after :30 correspond to these two slots alternating), which allows the master to communicate intensely with 2 specified addresses. They may even be the same, so setting/reading timers for example can be coordinated in a single burst of activity.
:30    :31    :32   :33...
SYNC   A1     A2    A1...
  1. via wl_force_flags - there exists a longer sync packet variant (distinguished by length) that contains 32bit force flags bitmap instead of 2 byte wl_force_addr* specification. This mode enables the master to communicate with clients enumerated by set bits in the wl_force_flags (client 0 has position 0 in the flags, 1 has bit 1, etc.)

Both modes work in the second half of the minute.

volca02 commented 6 years ago

Done as of 155644ba44aa9517763332a822916135ebce8923