CCCD Handle not found #5362
Replies: 1 comment
-
Posted at 2022-11-09 by ThomasVikström Ok, success! Not that I know why it did not work in the first place, but by getting rid of the cccd-handle altogether, I'm now able to receive data from 6 sensors to Bangle + calculating altitude from the barometer.
For the benefit of others, here's what I did: On Bangle side: On Arduino side: Changed to:
from:
...and put this in the
Posted at 2022-11-11 by @gfwilliams Great! I think the issue is that So I guess the change to If you didn't have that, you could set Bangle.js to just do a read every so often to get the latest data (rather than having it 'pushed') Posted at 2022-11-11 by ThomasVikström Thx!
My "use case" (actually only proof of concept) is to run inference (using Tensorflow Lite) on the Nicla-device and push the results to Bangle, perhaps also pushing some sensor data. To save power on both devices, I'm thinking of starting the Bluetooth-connection every 5 minutes or so. This is something I haven't looked into yet how to do, using setInterval perhaps? Posted at 2022-11-11 by @gfwilliams
Yes, that should work fine! Although once a BLE connection is in progress, if the connection interval is high enough the power usage is actually very low |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-11-08 by ThomasVikström
Sorry, but I'm again a bit stuck with BLE, my issue is actually same/similar as this one, but that's 2 years old and perhaps for another device than Bangle.
As posted here, I've been able to connect and transmit data from an Arduino-device (Nicla Sense ME), but the Arduino-program crashes with an ambigous message "Out of memory" when I want to transmit data from more sensors, this even if only approx. 50% of the memory is used. As this is for me very challenging to troubleshoot, I thought I'd instead use this Arduino-code, that is transmitting to a WebBLE dashboard. The web dashboard works fine.
However, when trying to connect from Bangle, a connection is established, but I initially got
CCCD Handle not found
. The Arduino advertising code is using thisBLEFloatCharacteristic temperatureCharacteristic("19b10000-2001-537e-4f6c-d104768a1214", BLERead);
where I've from BLEProperty.h found out thatBLERead = 0x02
. Thus I tried using the same on the Bangle side:but I'm still not receiving any data. nRFConnect is very seldom able to connect to the Nicla-device, but the few times it has been, I've not seen anything related to this cccd-handle.
To further troubleshoot, I've tried to replace BLERead with 0x00 on the Arduino-side and use same cccd-handle on Bangle, did not help, a connection is established but no data is flowing.
I also dived in the WebBLE-dashboard JS-code to understand how that works, and on line 11 below (line 450 in the dashboard code) this same BLERead property is used. But as said, when I'm using the same concept in the Bangle-code, I'm not getting anywhere.
I've also tried many other permutations, too many to list here, but either I get "CCCD handle not found" or no data.
Beta Was this translation helpful? Give feedback.
All reactions