Need help to identify limitations of NRF.setAdvertising #3778
Replies: 2 comments
-
Posted at 2021-07-14 by user130485 so far I have found that I can only send numbers 0-255 (is that 2 bytes?) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-07-26 by @gfwilliams Sorry for the delay...
0-255 is 1 byte. Something like
The easiest way is to use shifting to explicitly create 2 bytes. For example instead of
Yep - just use Use it the same as
Short UUID is what you're currently doing. You could just pack everything into one UUID though? That would save space:
http://www.espruino.com/Reference#l_NRF_setAdvertising - about halfway down
In your case:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-07-13 by user130485
Hi
I am trying to do a smart power meter pulse counter with the puck.
It all kind of works, until the values get over a certain level. Then it throws all kind of errors and stops sending any data.
This is the setAdvertising code I use:
All of the service data values are integers. Power is instantaneous power which can go to like 5000 and pulseHour and pulseDay can go well over 1000. I tried not using the string, but then it does not store the full value. Not sure where it breaks
Beta Was this translation helpful? Give feedback.
All reactions