Closed drkingpo closed 1 year ago
This is old but I looked into it since I've not used continuous scan before.
Reading ANT AP14 Continuous Scanning Mode for Asynchronous Topologies, one can RX in broadcast, ack and burst (all RX types) [Section 5.3]. So I don't see why the flag should be used to not act on the BROADCAST_DATA event.
I tried running it with multiple devices and sending data and it appeared to work without failure. The other fix for looking at the wrong _data
has been fixed elsewhere so perhaps it was that.
Still, BIDIRECTIONAL_RECEIVE is not recommended for most use cases since it will ACK messages not necessarily targeted for the host. I've changed the example so there is more explanation and the default is UNIDIRECTIONAL_RECEIVE_ONLY (Rx only): https://github.com/Tigge/openant/commit/dcf08edcf8a84f7db7532f9af333eadd8185e219
Since all channels are required to do this, I feel like this should be a method of the Node
class rather than performed manually, so that checks can be done for open channels and also the device capability for this - I'll leave this for now/for someone else however.
There was a little fault in example\continous_scan.py I fixed.
As also a small failue in Line 180 of ant.py to "message._data[1] == 0x01", where the underline was missing.
Also added a check if OpenScanMode is running to disable than send option to Broadcast messages, as in this more no & never messages will be send. Without these change openScanMode will run after some seconds/minutes in a failure.