-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSSI #52
Comments
That is a good addition! There is just one thing we should add to that code. RSSI value is added by the receiver, so that should also check somehow that if payload actually contains RSSI data. Any idea how to do that? |
Don't really know.. maybe inqure if the device supports and then just assume its there? :) hciconfig -a hci0 features |grep -i rssi no idea how to check this with python |
You can parse the report length from the data and see if there's one "extra byte" at the end (=RSSI), from my notes (a data format 3 packet in this case):
Most importantly:
So the most robust solution: parse the number of reports, then parse the length of all reports, and see if there's one extra byte after the last report (or compare it to the Packet length (LE in my notes) as the LE includes the RSSI byte if present) The quickest solution is to check the 14th byte (remaining length of the first report) and see if the remaining length of the data is the same or 1 more (this will work only if there's one report per packet) |
Hi, my team and I are working on a smart basket and we're using your library. For protocols 3 and 5 it was possible to extract the RSSI value in the last byte of the packet, and in our tests this proved to be useful to measure the distance later. This is a quick solution, as we only take the last byte. |
@ttu I think this issue can now be closed as the RSSI reporting is merged. |
Yes. Implementation in PR #161 |
Hi,
can you add RSSI to the list ?
A quick hack lto Df3Decoder like this seems to work:
{'acceleration': 1038.0934447341433, 'pressure': 1008.27, 'temperature': 24.75, 'acceleration_y': -13, 'acceleration_x': 5, 'battery': 3061, 'acceleration_z': 1038, 'rssi': -68, 'humidity': 42.5}
The text was updated successfully, but these errors were encountered: