Part Number: CC2541
Hello,
i was using runningservice in BLE stack1.4.0,i was using it to send data, the same use case i have just ported to BLE stack 1.4.2.2 and sending data in same format but in both the use cases i am getting the data but it is different than the older format how it was sending with stack 1.4.0.
with stack 1.4.0 i am getting the data in UUID 0x2A53 and value is like : 03 00 00 00 00 00 00 00 00 00
and after this every time i send the data it was updating in this format itself.
But with same code i am getting data in UUID 0x2A53 and value is like : 22 00 00 00 1B 00 FF B0 00 00
I am using default keyfob project from 1.4.2.2 and just adding my application from 1.4.0 code by keeping rest everything same from the 1.4.2.2 stack.
the function i am using which is working fine in stack 1.4.0 to send data from my application code to mobile application using runningservice as given below.
*********************************************************************
* @fn sensorMeasNotify
*
* @brief Prepare and send a RSC measurement notification
*
* @return none
*/
static void sensorMeasNotify(uint8 AB,uint8 CD)
{
uint8 *p = sensorMeas.pValue;
uint8 flags = 0x03;//sensorFlags[sensorFlagsIdx];
flags = flags & 0x0FB;
// Build RSC measurement structure from simulated values
// Flags simulate the isPresent bits.
*p++ = flags;
//Included regardless of flags.
*p++ = LO_UINT16( instSpeed );
*p++ = HI_UINT16( instSpeed );
*p++ = instCadence;
if (flags & RSC_FLAGS_STRIDE)
{
*p++ = LO_UINT16( instStrideLength );
*p++ = HI_UINT16( instStrideLength );
}
if (flags & RSC_FLAGS_DIST)
{
*p++ =AB;//BREAK_UINT32(totalDistance, 0);
*p++ =CD;//BREAK_UINT32(totalDistance, 1);
*p++ =BREAK_UINT32(totalDistance, 2);
*p++ =BREAK_UINT32(totalDistance, 3);
}
// Get length
sensorMeas.len = (uint8) (p - sensorMeas.pValue);
// Send to service to send the notification
Running_MeasNotify( gapConnHandle, &sensorMeas );
}
same code in stack 1.4.2.2 is giving some random values .
But the runningsevice files used from stack 1.4.2.2 profiles ---> RSC
there are any changes in the latest stack compared to previous ..? OR Pls suggest m i doing anything wrong ....!!!
Regards,
Atul