Closed andreevdenis closed 3 years ago
@ojousima can you give more details for this issue?
Firmware is allowed to send duplicate data to increase chance of receivers hearing packet while saving power by not redoing measurements.
Most notably, after NFC scan RuuviTag assumes that user wants to connect and advertises at 100 ms interval for 60 s. Data is updated at 1.285 s interval while fast advertising, leading to ~12 duplicated data points. It doesn't make sense to store the same data many times.
This check can be as simple as "If last measurement on this MAC has same measurement sequence counter, do not store to DB". Although architecture-wise, I'd prefer to have a hashmap of seen MACs and the last advertisement at com.ruuvi.bluetooth.default level and not forward repeated data to application callback.
Not sure it will be possible to test it
Moving to done at this point.
Can you post (somewhere) a sample of duplicate packets. Do you see these often? only under certain conditions? very nearby? noisy environments? Thank you