From d7c4ec52351a8b5691341806eba37d9223afd648 Mon Sep 17 00:00:00 2001 From: baohongde Date: Tue, 3 Jul 2018 19:38:19 +0800 Subject: [PATCH] component/bt: Add profile descriptor list for SPP --- components/bt/bluedroid/bta/jv/bta_jv_act.c | 8 ++++++++ components/bt/bluedroid/bta/jv/include/bta_jv_int.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/components/bt/bluedroid/bta/jv/bta_jv_act.c b/components/bt/bluedroid/bta/jv/bta_jv_act.c index 12dfd13b2..531994bc5 100644 --- a/components/bt/bluedroid/bta/jv/bta_jv_act.c +++ b/components/bt/bluedroid/bta/jv/bta_jv_act.c @@ -959,6 +959,14 @@ static bool create_base_record(const uint32_t sdp_handle, const char *name, cons return FALSE; } + stage = "profile_descriptor_list"; + if (!SDP_AddProfileDescriptorList(sdp_handle, UUID_SERVCLASS_SERIAL_PORT, SPP_VERSION)){ + APPL_TRACE_ERROR("create_base_record: failed to create base service " + "record, stage: %s, scn: %d, name: %s, with_obex: %d", + stage, channel, name, with_obex); + return FALSE; + } + // Add the name to the SDP record. if (name[0] != '\0') { stage = "service_name"; diff --git a/components/bt/bluedroid/bta/jv/include/bta_jv_int.h b/components/bt/bluedroid/bta/jv/include/bta_jv_int.h index 4f0ce4405..c25263314 100644 --- a/components/bt/bluedroid/bta/jv/include/bta_jv_int.h +++ b/components/bt/bluedroid/bta/jv/include/bta_jv_int.h @@ -37,6 +37,8 @@ ** Constants *****************************************************************************/ +#define SPP_VERSION 0x0102 + enum { /* these events are handled by the state machine */ BTA_JV_API_ENABLE_EVT = BTA_SYS_EVT_START(BTA_ID_JV),