This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541: running service issue in Stack 1.4.2.2

Part Number: CC2541
Other Parts Discussed in Thread: BLE-STACK

Hi,

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

once this value comes it gets stuck here itself and also this is not changing further.

  • Hello Atul,

    Are you porting your existing code to BLE-Stack v1.4.2 from v1.4.0 or did you start with the existing example in v1.4.2?
    How do I reproduce your problem?

    Best wishes
  • Hello JXS,

    Thanks for the reply..!!

    I am not completely porting all code to 1.4.2 from 1.4.0,

    i am using default keyfob project from 1.4.2 and just adding my application from 1.4.0 code by keeping rest everything same from the 1.4.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 applicaion 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 

    Pls suggest m i doing anything wrong ....!!!

    Regards,

    Atul