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

Receive random data after connect

Hi,

I'm using 51822 QFAC SDK11 S130. The 51822 will receive a group of 18 bytes data from the phone. I'm facing a strange issue: every time after the BLE is connected, I will first receive a 18 bytes data which was not sent from the phone. This group of data basically has fixed values, but nothing to do with any data sent from the phone. I have no idea where are they coming from, can anyone give me a clue? Thank a lot!

Sonny

Parents Reply
  • Thank you Awneil!

    I use this to receive data from the phone: 

    case BLE_GATTS_EVT_WRITE:     //receive data from the phone
    {
        uint8_t * p_data = p_ble_evt->evt.gatts_evt.params.write.data;
        //printf("received data: %d  %d...", p_data[0], p_data[1] ....);  //18 data
    }

     It shouldn't have uninitialized variables issue. From the debug, I can see that the first data packet (18 data) is always something else then what I have sent from the phone, the real data start from the 2nd packet. 

Children
Related