get rssi of peripheral device when DCENTRAL_LINK_COUNT=2 #7840
-
I got some of those cheap itags off aliexpress, less than a euro each, and they work very nice with espruino, they can be used as a remote button. my aim is to use them on the cats, I want to know if they are on the garden or they are out for a walk, so I am making an an app for that. My problem is, I have two central connections enabled, and I think this may be the reason I cannot get the rssi when connected to one of the tags. It this a fact? Is there a way to get the rssi of a peripheral, if I have build the firmware with DCENTRAL_LINK_COUNT=2 ? firmware version is 2.27. this does not work and i have no rssi field on the bluetooth object.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
DCENTRAL_LINK_COUNT=2 seems not be the problem, I tried on the bangle.js2, 2.27, it is the same, I cannot get the rssi of the peripheral. Has something changed, or am I doing something really wrong? sorry for posting too soon, it seems that the itag does not send the rssi when connected, I thought this was on the connection level, it seems that rssi is device realated? I can get the rssi from another device I tested, one that is running esruino, If one has some time to explain please do. |
Beta Was this translation helpful? Give feedback.
-
edit: ok sorry again, I saw this espruino/Espruino#2465, I upgraded the Bangle's softdevice to 6.1.1 and scanning on phy:"both" works fine. @gfwilliams , I think I tested correct this time, not important so I am reporting it here: when on 2v27.51 ( or 2v27 )and DFU is 2v25, on the BangleJS2, if I do an NRF.setScan with phy:"both", I get: Uncaught Error: ERR 0x7 (INVALID_PARAM) (:2291) When on the magic3 on 2v27.51 o(r 2v27 or 2v27.47), it works as expected. I used Clean Boot on the Bangle to be sure. Scanning for coded or 1mbit works.
Magic3
|
Beta Was this translation helpful? Give feedback.
I wasn't intending to be sarcastic - I thought you'd said that setRSSIHandler had worked on some devices but not others.
I just looked into this and I put a fix in, so cutting edge builds should work now.
It would have worked but only on the second device if you had more than one active connection! It looks like this got broken when support for >1 central connection was added to the firmware