hii....
am working on a custom profile having broadcast feature in active connection... am advertising some sensor readings and scan response and a battery service before connecting to any device. but aftr get connected i started a non connectable advertise where am trying to advertise the same sensor data and battery service.
uint8_t flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED;
memset(&advdata, 0, sizeof(advdata));
advdata.name_type = BLE_ADVDATA_FULL_NAME;
advdata.flags.size = sizeof(flags);
advdata.flags.p_data = &flags;
advdata.p_manuf_specific_data = &manuf_specific_data;
advdata.p_service_data_array = service_data;
advdata.service_data_count = 1;
But it shows error invalid length..then i chnge the code as
uint8_t flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED;
memset(&advdata, 0, sizeof(advdata));
advdata.name_type = BLE_ADVDATA_FULL_NAME;
advdata.flags.size = sizeof(flags);
advdata.flags.p_data = &flags;
advdata.p_manuf_specific_data = &manuf_specific_data;
memset(&advdata1, 0, sizeof(advdata1));
advdata1.p_service_data_array = service_data;
advdata1.service_data_count = 1;
err_code = ble_advdata_set(&advdata,&advdata1);
APP_ERROR_CHECK(err_code);
now code is running with out error but not advertising the battery service... can anyone help me to do dis plzzz...