I have beacon that broadcast its name with type 09. I cannot get it while scanning of nrf_uart_c (adv_report).
I assume I need to activate scan_req and then parse the response data - how can I do it?
I have beacon that broadcast its name with type 09. I cannot get it while scanning of nrf_uart_c (adv_report).
I assume I need to activate scan_req and then parse the response data - how can I do it?
I checked with breakpoints, the comparison fails but there is no data that I can see (null).
It would be great if you can prepare a version of NRF_UART_C with Scan Name example that works
I was able to find a solution:
In ble_advdata.c, function: bool ble_advdata_name_find
I changed the lines:
//p_parsed_name = &p_encoded_data[data_offset];
p_parsed_name = ble_advdata_parse(p_encoded_data, data_len, BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME);
//if ( (data_offset != 0)
// && (parsed_name_len != 0)
// && (strlen(p_target_name) == parsed_name_len)
// && (memcmp(p_target_name, p_parsed_name, parsed_name_len) == 0))
if ( (data_offset != 0)
&& (parsed_name_len != 0)
&& (parsed_name_len >= strlen(p_target_name))
&& (memcmp(p_target_name, p_parsed_name, strlen(p_target_name)) == 0))
I'm glad that you are able to find a solution. I'm not entire sure why the original code doesn't work for you but it works for normal advertising packet.