I have the following code that does not do what I want:
...
NRF.setServices({
0x180A : { // Device information
0x2A25 : { // Serial Number
readable: true,
value : [getSerial() + '#' + count_str]
}}
});
...
The variable count_str is a counter as string that gets incremented every time I connect in a "NRF.on('connect', function()". I can see that the counter string increments correctly (puck console), but when I check the services and characteristics that the Puck advertises via Android, I see only the initial value of the counter string (#00000 - Serial Number) and not the updated one.
I am not aware if this is maybe a caching problem of Android? Do I have to do anything else to receive the updated counter string?
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.
Hi All,
I have the following code that does not do what I want:
The variable count_str is a counter as string that gets incremented every time I connect in a "NRF.on('connect', function()". I can see that the counter string increments correctly (puck console), but when I check the services and characteristics that the Puck advertises via Android, I see only the initial value of the counter string (#00000 - Serial Number) and not the updated one.
I am not aware if this is maybe a caching problem of Android? Do I have to do anything else to receive the updated counter string?
Thanks