BLE notifications on nRF devices #6724
Replies: 1 comment
-
Posted at 2016-09-08 by @gfwilliams Yes, I was wondering about that - which is why the code's not in there yet. Any suggestions?
Posted at 2016-09-08 by ddm The first solution seems straightforward to me. It would make using the REPL to test value updates very convenient. Posted at 2016-09-08 by ddm Another possibility would be to set Posted at 2016-09-08 by @gfwilliams Observable object is a good idea, but I guess it's actually quite an advanced idea if you're just getting started. Looks like Not sure when it'll get implemented though - are you just playing around with this or are you trying to put it into a product of your own? Posted at 2016-09-08 by ddm I could have a stab at a pull request if that helps. The nRF SDK has plenty of example code and I should be able to figure it out. Posted at 2016-09-08 by @gfwilliams Yes, that'd be great. I guess the worst bit is going to be finding the handles from the UUIDs, but it shouldn't be too hard. Posted at 2016-09-08 by @gfwilliams Issue here: espruino/Espruino#915 Posted at 2016-09-08 by ddm I'll post further design questions on the issue directly. Posted at 2016-09-09 by @gfwilliams Thanks! Yes, that's probably easier |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-09-08 by ddm
The way to expose BLE services on nRF devices is to use
NRF.setServices
(cf. doc).It is possible to set
broadcast: true
for broadcasting but notnotify: true
. The fix to make it available is pretty straightforward:With the above fix, it is possible to set a characteristic to
NOTIFY
like so:However, what would be the best way to update the characteristic's value? Calling
NRF.setServices
repeatedly does not seem to be the way to go.Beta Was this translation helpful? Give feedback.
All reactions