I'm building a bike cadence sensor on an Arduino that connects via Bluetooth LE to a bike computer. It is reliably detected by a Bryton bike computer but not by an iOS smartphone app from Wahoo. This suggests to me that maybe the service is not properly set up. Does anything stand out in the code below or is there a good example how to do it?
#define CSC_FEATURES CSC_FEATURE_CRANK_REV_DATA
unsigned char bleBuffer[1 + 2 + 2];
unsigned char slBuffer[1];
unsigned char fBuffer[2];
BLEService CSCService("1816");
BLECharacteristic CSCMeasurement("2A5B", BLERead | BLENotify, sizeof(bleBuffer));
BLECharacteristic CSCFeature("2A5C", BLERead, sizeof(fBuffer));
BLECharacteristic CSCSensorLocation("2A5D", BLERead, sizeof(slBuffer));
byte flags = CSC_MEASUREMENT_CRANK_REV_PRESENT;
unsigned short features = CSC_FEATURE_CRANK_REV_DATA;
byte sensorlocation = SENSOR_LOCATION_RIGHT_CRANK;
BLE.setDeviceName(BLE_DEVICE_NAME);
BLE.setLocalName(BLE_LOCAL_NAME);
BLE.setAdvertisedService(CSCService);
CSCService.addCharacteristic(CSCFeature);
CSCService.addCharacteristic(CSCMeasurement);
CSCService.addCharacteristic(CSCSensorLocation);
BLE.addService(CSCService);
update(millis()); /* initialise buffers */
BLE.advertise();