1 Reply Latest reply on Apr 10, 2019 1:33 AM by SheetalJ_96

    Can wiced_bt_sdp_init_discovery_db() init search for 2 service UUIDs at the same time?

    LJYe_2922526

      Hi forum,

       

      Developing with WICED 6.0 for 20706 I'm trying to see if a remote bluetooth device supports HSP, HFP or both.

       

      I'm calling wiced_bt_sdp_init_discovery_db() first, then wiced_bt_sdp_service_search_attribute_request(). In the result handler, I'm using wiced_bt_sdp_find_service_uuid_in_db() and wiced_bt_sdp_find_protocol_list_elem_in_rec() to find the record and protocol element in the result database.

       

      This works if I'm only searching for one service UUID at a time. Looking at the documentation for wiced_bt_sdp_init_discovery_db(), it seems like it allows an array of UUIDs to be passed in and searched at the same time like so

       

      wiced_bt_uuid_t astAGUUIDs[2] = {

                                          {2, {UUID_SERVCLASS_HEADSET}},

                                          {2, {UUID_SERVCLASS_HF_HANDSFREE}},

                                      };

       

       

      uint16_t ausAGAttributeList[4] =

      {

          ATTR_ID_SERVICE_CLASS_ID_LIST,

          ATTR_ID_PROTOCOL_DESC_LIST,

          ATTR_ID_BT_PROFILE_DESC_LIST,

          ATTR_ID_SUPPORTED_FEATURES,

      };

       

      wiced_bt_sdp_init_discovery_db(stBlAudioGateway.pstMySDPDatabase, BL_AG_SDP_DB_BUFFER_SIZE, 2, astAGUUIDs, 4, ausAGAttributeList);

       

      When I do this, the wiced_bt_sdp_find_service_uuid_in_db() always returns null pointer indicating it cannot find the service. Did I use the function wrong?

       

      Thanks,

      LJ