So Puck.js seems to be advertising everything just fine. Is it possible that the heart rate service isn't meant to be an advertisement, but is meant to be a service that you add with NRF.setServices?
Services: only available when you connect
Advertisements: broadcast to the world when you're not connected
It seems more likely it's a service, since you maybe don't want to broadcast your heartrate to anyone that's listening?
You can always click RAW in nRF Connect and can see the complete advertising data if you want to compare your Pebble's advertising data with Puck.js.
@gomako: I'm pretty sure that blood pressure will be a service, not advertising.
In setAdvertising if you supply a raw array, it just advertises that data - for the format you need to delve into the Bluetooth spec. Normally you'd supply an object though as I have above, and Puck.js creates that array for you automatically.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
If I just do:
Then when I disconnect and re-scan in nRF connect I see:
And if I do:
I see:
So Puck.js seems to be advertising everything just fine. Is it possible that the heart rate service isn't meant to be an advertisement, but is meant to be a service that you add with
NRF.setServices
?It seems more likely it's a service, since you maybe don't want to broadcast your heartrate to anyone that's listening?
You can always click
RAW
in nRF Connect and can see the complete advertising data if you want to compare your Pebble's advertising data with Puck.js.@gomako: I'm pretty sure that blood pressure will be a service, not advertising.
In
setAdvertising
if you supply a raw array, it just advertises that data - for the format you need to delve into the Bluetooth spec. Normally you'd supply an object though as I have above, and Puck.js creates that array for you automatically.