Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SERVICE SOLICITATION

In the broadcast field, what is the difference between "SERVICE SOLICITATION", "SERVICE UUID" and " SERVICE DATA "?What does it do?In what scene?

Parents
  • Hi,

    The Service UUID is the main way a device is able to identify a particular service. This can either be a 16 bit service UUID for predefined Bluetooth SIG services (e.g. heart rate service UUID = 0x180D) or a 128-bit custom service. (aka vendor specific UUID). See Bluetooth Core Specifications Version 5.0 or the services tutorial for more info.

    I believe what you mean by service data can be summarized by this struct, which can be found in ble_advdata.h (e.g. in sdk 14.2 ble_app_blinky example)

    /**@brief Service data structure. */
    typedef struct
    {
        uint16_t                     service_uuid;                        /**< Service UUID. */
        uint8_array_t                data;                                /**< Additional service data. */
    } ble_advdata_service_data_t;

    This struct contains both the service_uuid which I mentioned previously & extra service data.

    Could you explain what you mean by SERVICE SOLICATION? Are you referring to a specific variable, such as BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_16BIT or BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT or something else?

  •         I saw in the ble_app_ancs_c routine, the broadcast initialization function has the following definition:

            init.advdata.uuids_solicited.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
            init.advdata.uuids_solicited.p_uuids = m_adv_uuids; 

             In the above usage scenario, what is the definition of the "BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT " field in the broadcast data? Is it necessary?

Reply
  •         I saw in the ble_app_ancs_c routine, the broadcast initialization function has the following definition:

            init.advdata.uuids_solicited.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
            init.advdata.uuids_solicited.p_uuids = m_adv_uuids; 

             In the above usage scenario, what is the definition of the "BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT " field in the broadcast data? Is it necessary?

Children
Related