Puck.js v2 and sending RSSI to a Raspberry Pi 5 #4258
Replies: 1 comment
-
Posted at 2023-12-18 by @fanoush If you mean this https://www.espruino.com/Reference#l_BluetoothRemoteGATTServer_setRSSIHandler then the documentation says something else. However the other side (=Pi5) already has its own rssi value for the connection to the Puck so why to send it from Puck to the Pi? Maybe describe what you are trying to do. Posted at 2023-12-18 by @gfwilliams Hi - which function are you referring to? I think they should all work on nRF52. But as @fanoush says, RSSI is generally something reported by the receiving device, so while the Puck can tell you what its RSSI is, the Raspberry Pi should have its own RSSI value it sees for the Puck as well, and that may be all you need. Posted at 2024-01-04 by giftguide Thatwas correct fanoush, and thank you for the help both. I've implemented a function that gets the RSSI natively with python/bleak. I'm curious if you can reccomend a way to increase the frequency/accuracy of the nRF52's RSSI value on the puck? I'm looking to use it in a dance performance essentially but i've found the RSSI value does not update as often/as accurately as i'd like it to. On my Pi i'm using the strongest antenna I could find. I'm aware also it may just be a case of getting a stronger BLE beacon, unfortunately it appears those are quite hard to come by in the UK, especially if the beacon needs to be small. Posted at 2024-01-05 by @gfwilliams Assuming you're not connected, the RSSI value will come every time there's an advertisement - so it's pretty easy to increase that with https://www.espruino.com/Reference#l_NRF_setAdvertising For instance: Posted at 2024-01-05 by giftguide Thank you Gordon, that's helped tremendously. Posted at 2024-01-05 by @fanoush Both changes of course affect battery life and also having the RSSI handler set to your JS code on Puck side and being called so frequently draws battery even more. So doing both changes (interval and TX power) but reading RSSI on Raspberry side may be the best. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-12-18 by giftguide
Hi all,
Wondering if anyone knows if transmitting the RSSI of a puck v2 to a Pi is possible? I'm using the Pi 5. I noticed in the documentation for the RSSI function it states that it only works on ESP32 boards but wanted to confirm.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions