This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adafruit nRF52 Feather, BLE 0x1818 Cycle Power Monitor, strobing output

I am using the Adafruit nRF52 Feather development board and their implementation of the Nordic blob for Arduino.  I am having the problem where the output data is as expected; however, strobing between the data as written and 0 for all byte values.


I was able to configure the Feather for 0x1818 Cycle Power Monitor output and was able to connect and read data using both the nRF connect Android app, as well as the Zwift cycle game using a generic USB BLE dongle connected to PC running Windows 10.

I was using a simple incrementing routine to test the instantaneous power output however as soon as the data is written, it is immediately reset to 0, the last written value does not persist.  This continues for every update which I set at 1Hz.  For example:

1-0, <1sec>, 2-0, <1sec>, 3-0, <1sec>, 4-0 ... and so on.

My code is heavily based on the Heart Rate Monitor example code Adafruit provides.  The HRM does behave as one would expect, the last written value persists until rewritten. I suspect this strobing output is not the intended output of the BLE characteristic?

I understand that bugs could have been introduced with their Arduino library, I am just trying to determine if the problem is in my implementation or if I need to start digging though the library functions (which are still in development on Adafruit's part).

Has anybody seen anything like this before?  Can anybody point me in a direction?

Thanks in advance, my code is below.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*********************************************************************
This is an example for our nRF52 based Bluefruit LE modules
Pick one up today in the adafruit shop!
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
MIT license, check LICENSE for more information
All text above, and the splash screen below must be included in
any redistribution
*********************************************************************/
#include <bluefruit.h>
/* Cycling Power Service
* CP Service: 0x1818
* CP Characteristic: 0x2A63 (Measurement)
* CP Characteristic: 0x2A65 (Feature)
* CP Characteristic: 0x2A5D (Location)
*/
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX