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

Read Custom Advertising Data

Hello!

I have a short question, maybe someone can help me.

I set custom advertising data in the following field on the advertising side:

uint8_t data[] = "SomeData!";
manuf_data.data.p_data = data;

advdata.p_manuf_specific_data = &manuf_data

Now I want to read this data ("SomeData!") on the scanner side. How can I read the data on this side in this Report and printf it there?

static void ble_evt_handler(ble_evt_t const *p_ble_evt, void *p_context) {
  ble_gap_evt_t const *p_gap_evt = &p_ble_evt->evt.gap_evt;

  switch (p_ble_evt->header.evt_id) {

  case BLE_GAP_EVT_ADV_REPORT: {
  
  }
 }
}
Thank you for your help.

Related