Hello to all,
I am using nRF52832 sdk15.0 version with SES IDE. I want to find adverting with short for e.g.--->
we have BLE app_uart peripherals and one multilink central.
ble peripheral adverting with name of "Nordic-XXXXXX" where x is BLE 48 bit mac address. In central i want to scan ble peripheral device as short Name set is "Nordic-".
for achieving above i am using program like this:
if (ble_advdata_short_name_find(p_adv_report->data.p_data, p_adv_report->data.len, SCAN_DEVICE_NAME,sizeof(SCAN_DEVICE_NAME))) { // Name is a match, initiate connection. NRF_LOG_INFO("Short name found"); err_code = sd_ble_gap_connect(&p_adv_report->peer_addr, &m_scan_params, &m_connection_param, APP_BLE_CONN_CFG_TAG); if (err_code != NRF_SUCCESS) { NRF_LOG_ERROR("Connection Request Failed, reason %d", err_code); } }
where SCAN_DEVICE_NAME = "Nordic-"
If i use ble_advdata_name_find with full advertising name working well. But why short name find is not working please any one tell me what is proper way for finding short name in whole adverting name.
Whats wrong in my program.... When i debugging so getting in ble_advdata.c data_offset is NULL always.
Please suggest me better way or any changes in my program..
Thanks..