epidose
epidose copied to clipboard
Implement mesh protocol for Cuckoo filter distribution
An ephid device that has a current filter and sufficient battery power, enables its WiFi interface and acts as an access point distributing the Cuckoo filter to other devices, when it detects such devices in its vicinity. Ideally, we'd like a bit in the broadcast packet to indicate whether a filter is required. Alternatively a different packet might be used. To avoid the malicious distribution of incorrect filters, filter files will need to be signed by the Health Authority, and the clients will need to verify the signature, before installing the filter.
WiFi power can be conserved through a rendezvous mechanism based around a "stale filter" bit to be included in the BLE packet.
- When a device with a stale Cuckoo filter sees a BLE packet from a device that does not have the stale filter bit set, it turns on its WiFi and tries to connect as a client to a device access point to obtain the filter.
- When a device with a non-stale Cuckoo filter sees a BLE packet from a device with the stale filter bit set, it turns on its WiFi interface as an access point until it stops seeing stale Cuckoo filter BLE packets or it reaches a timeout.
If I understood correctly, the basic idea is to share Cuckoo filter with nearby devices if the corresponding node has sufficient battery power and if it is asked from the devices (by setting a bit, let's say to 1), right? If so, shouldn't we check if the filter is the latest before transmitting it?
According to the A/G BLE specification, there are some bits reserved for future work, but, not any related to filtering. I will check the specifications again, but I believe we will end up with a new packet.
- [ ] Add device configurations
- [ ] Implement Sender/Receiver beacon's logic