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

Central scanning for 128 bit uuid service

Using the S120 soft-device in the Central role, there does not appear to be an example or documentation describing how to scan for a 128 bit UUID service.

Has anyone tried it?

Thanks

Parents
  • There is currently no example of doing this, but it shouldn't be very tricky to do on your own. Summarized, you'd have to do this:

    1. Start scanning, making sure to use active scanning if the target device has the UUID in the scan response.
    2. Receive a BLE_GAP_EVT_ADV_REPORT, containing the advertising data.
    3. Look through the advertising data for the field BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE or BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE.
    4. Look at the data of this field, and compare it with whichever value you were looking for.
    5. If the comparison succeeds, do a connect with this device.
  • I am having a similar issue, as I am pretty much doing exactly what you have said by altering the S120 ble_app_hrs_c example app. When I find that the 128 bit UUID is a match for the advertised one I do the following: sd_ble_gap_connect(&p_gap_evt->params.adv_report.
    peer_addr, &m_scan_param, &m_connection_param); But it seems to still be using the 16 bit UUID for the heart rate service. I am not sure how to change this as I don't want to be altering the code that is in the SDK, but rather the code in this project.

Reply
  • I am having a similar issue, as I am pretty much doing exactly what you have said by altering the S120 ble_app_hrs_c example app. When I find that the 128 bit UUID is a match for the advertised one I do the following: sd_ble_gap_connect(&p_gap_evt->params.adv_report.
    peer_addr, &m_scan_param, &m_connection_param); But it seems to still be using the 16 bit UUID for the heart rate service. I am not sure how to change this as I don't want to be altering the code that is in the SDK, but rather the code in this project.

Children
No Data
Related