Project context:
Server BLE for home trainer diy
Target (Bluetooth server) : Bluefruit nRF52 The feather
Library : BluefruitBLE
Client : nRF Connect (Android)
Problem description:
I work with the characteristic (CyclingPowerMeasurement (0x2A63, UUID GATT), which size is 32 bytes.
I check the characteristic with nRF Connect:
- When Read : Good size (32 bytes) , and the good values.
- When Notify: Only 20 bytes, and not the good values.
//init of the characteristic
m_Measurement.setProperties(CHR_PROPS_NOTIFY |CHR_PROPS_READ );
m_Measurement.setPermission(SECMODE_OPEN, SECMODE_NO_ACCESS);
m_Measurement.setFixedLen(32);//(SIZE_CPS_MEAS_DATA);
m_Measurement.setMaxLen(32);
m_Measurement.setCccdWriteCallback( fctCCCdCallback); // Optionally capture CCCD updates ?????
m_Measurement.begin();//validation de l'attachement de la caractéristique au service
// a write m_pCyclingPower_Service->m_Measurement.write(m_pCyclingPower_Service->m_CPSMeasurementData.bPaquet_CPS_Meas, 32 );
//a notify[b][/b]
if (!m_pCyclingPower_Service->m_Measurement.notify(m_pCyclingPower_Service->m_CPSMeasurementData.bPaquet_CPS_Meas, 32 ) )
Serial.println("ERROR: Notify for CPS Measurement not set in the CCCD or not connected!");
Some suggestions:
I think there is a limitation of 20 bytes..
but i don't know how to modify or check it
thanks!!!!