From patchwork Wed Apr 6 21:33:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 558922 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6D1AC433EF for ; Wed, 6 Apr 2022 21:47:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbiDFVt1 (ORCPT ); Wed, 6 Apr 2022 17:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235832AbiDFVsu (ORCPT ); Wed, 6 Apr 2022 17:48:50 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6208513CCEA for ; Wed, 6 Apr 2022 14:33:57 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id e22so4566568ioe.11 for ; Wed, 06 Apr 2022 14:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CzekHFUq7wdvG+NgGO9dzUSt4G1nBy7NKbCXKP0d0kc=; b=ab75Q53fp8jMf/cAqTk+lzFiYARXjsHVPNgs7pH/AisSYXmOgi80yNroFAMRmLqS1/ kuxxpvJfDPRNpq/QE5cf5hDaisYT4CU7jaU2VbCZS1CQlnwuVn56fow0bY/x5M0l14h8 /mvTBotGSN5TufkE4sHGXheffUXcRR5NYt8BtH0UsZqVerY8rJOF7hHvpl+zcaLxCedM usunMmcxGSJuZuhy+6wG3MG8obnwj/iUh97aZTJGExl44T6PngbpYDvc5pvWQL5ecYkk XElLA515RLQV+2j1WaGY7xhh6jHQPPQ2ZXrCzafcB0w+Cpxx7Zjdfz8ZGb9JSyW1hGgd +Rgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CzekHFUq7wdvG+NgGO9dzUSt4G1nBy7NKbCXKP0d0kc=; b=0wSrwHmQc6TEOMpTG6L8JquGraFlHlwYLludVdvJnnMOQlplq9hDcDthr6u9dop7O8 O6EXWh0RlLFu6bouiG7oO67X3t8KOmvoIR/RFkm2FT6UxR4gq98c+lmywlZE15q5lLjQ gqXn1cp2vKUsfn+u7VWWwxLn/Crli3TEkq6XurRE41RE82J87Fu+wNMBAabozhSoGOkg BUWgvPvPm/JWoA58kQemchHPzzIoOUC8YoyWcmWVGILDEQEC7W636kMJezRtvMRKYjy7 79NGCah9JkMO+46YslA+OWo5p8WJT/fW+ZvOoQE1B+3ztsO0ieUDJnCKwU8fb2If8ebS fmtw== X-Gm-Message-State: AOAM531xzGjSIPU+kPobyif+m+gggF2tde8rTXgFnd3mSsEjki5cucGL QwxLG0XqgEtc7nN5UdzxKhKE/qjqvnw= X-Google-Smtp-Source: ABdhPJxAN1fYVlADU257YD3INKtTlZoEWnuH80U910jDniczPd2n8e6KU0Fne17Y8DKvUx46iT9avA== X-Received: by 2002:a05:6602:2bc4:b0:645:eb96:6495 with SMTP id s4-20020a0566022bc400b00645eb966495mr5031607iov.166.1649280837109; Wed, 06 Apr 2022 14:33:57 -0700 (PDT) Received: from lvondent-mobl4.intel.com (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id v12-20020a92cd4c000000b002ca50ef78e4sm4726322ilq.62.2022.04.06.14.33.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 14:33:56 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 1/3] monitor: Add support for LE BIG Info Adverting Report Date: Wed, 6 Apr 2022 14:33:53 -0700 Message-Id: <20220406213355.1918220-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This adds support for LE BIG Info Advertising Report. --- monitor/bt.h | 17 +++++++++++++++++ monitor/packet.c | 23 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/monitor/bt.h b/monitor/bt.h index 704c70fba..e9f72de36 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -3653,6 +3653,23 @@ struct bt_hci_evt_le_req_peer_sca_complete { uint8_t sca; } __attribute__ ((packed)); +#define BT_HCI_EVT_LE_BIG_INFO_ADV_REPORT 0x22 +struct bt_hci_evt_le_big_info_adv_report { + uint16_t sync_handle; + uint8_t num_bis; + uint8_t nse; + uint16_t iso_interval; + uint8_t bn; + uint8_t pto; + uint8_t irc; + uint16_t max_pdu; + uint8_t sdu_interval[3]; + uint16_t max_sdu; + uint8_t phy; + uint8_t framing; + uint8_t encryption; +} __attribute__ ((packed)); + #define BT_HCI_ERR_SUCCESS 0x00 #define BT_HCI_ERR_UNKNOWN_COMMAND 0x01 #define BT_HCI_ERR_UNKNOWN_CONN_ID 0x02 diff --git a/monitor/packet.c b/monitor/packet.c index b7431b57d..775b4276e 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -10886,6 +10886,25 @@ static void le_req_sca_complete_evt(const void *data, uint8_t size) print_sca(evt->sca); } +static void le_big_info_evt(const void *data, uint8_t size) +{ + const struct bt_hci_evt_le_big_info_adv_report *evt = data; + + print_field("Sync Handle: 0x%4.4x", evt->sync_handle); + print_field("Number BIS: %u", evt->num_bis); + print_field("NSE: %u", evt->nse); + print_slot_125("ISO Interval", evt->iso_interval); + print_field("BN: %u", evt->bn); + print_field("PTO: %u", evt->bn); + print_field("IRC: %u", evt->irc); + print_field("Maximum PDU: %u", evt->max_pdu); + print_usec_interval("SDU Interval", evt->sdu_interval); + print_field("Maximum SDU: %u", evt->max_sdu); + print_le_phy("PHY", evt->phy); + print_framing(evt->framing); + print_field("Encryption: 0x%02x", evt->encryption); +} + struct subevent_data { uint8_t subevent; const char *str; @@ -11004,6 +11023,10 @@ static const struct subevent_data le_meta_event_table[] = { le_req_sca_complete_evt, sizeof( struct bt_hci_evt_le_req_peer_sca_complete)}, + { BT_HCI_EVT_LE_BIG_INFO_ADV_REPORT, + "LE Broadcast Isochronous Group Info Advertising Report", + le_big_info_evt, + sizeof(struct bt_hci_evt_le_big_info_adv_report) }, { } }; From patchwork Wed Apr 6 21:33:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 558345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFA52C433F5 for ; Wed, 6 Apr 2022 21:47:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235381AbiDFVtV (ORCPT ); Wed, 6 Apr 2022 17:49:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235097AbiDFVsx (ORCPT ); Wed, 6 Apr 2022 17:48:53 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA5B213DB50 for ; Wed, 6 Apr 2022 14:33:58 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id h63so4551707iof.12 for ; Wed, 06 Apr 2022 14:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6acRurw9fcThdvCEq8EPqqhn0HgWF5uVMUUVD3XDssU=; b=OM8grVQRzWq7hTFlTdweSQjFrsAq6II/IBWxUqI4Mu6RNK5RH6117aXCWFMD2K9R3/ bsQMX3OlJnyKfH2s7j7EUcsL/IQLC21hQmJ7cKf0NNNrKMJG3NryOZOi5uC7ls2dA5Vd c+O8w6EZQhgm0tWRa1lojZDBhbdO5mFIxkCD7Ah/4fTGeuzoJReWF2UBUukxgcABpVhs ZARavOs59ap4yD/fvWypeWCs+98Zbiw39lHRFGl/TI+GIYIFMToQnbhj/ySSSq/M+w2l aJ3UcLc/YBJgtJVMHMankbN3HTk7orfqBq7C3oSYsx4G97ehCrjFuzCG7dYqt6uh/TYa 31yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6acRurw9fcThdvCEq8EPqqhn0HgWF5uVMUUVD3XDssU=; b=nXhErBEKAUV48Y85o2AlUXA1o0V/IFn1prqliVoacSqJpWO4WO1bqE6hLiJfznfyzZ eLFYBVWML4BQPoYJVGDGY4IsZhPetNryTVYi/ZR/L0NESuk9m1eqJ6SP+NghDgb6Dg1W 1PN8CjaPMQA5jAGRcgpV8nOZe8DJEsgdai0fCaBxSi7XyjxxSsXb/WJxPTkizVoyqg68 7wAC+lIdkD9pSL3yUS4NZG4PnHx4fljhrVZlAfl8w6fXZXhCc2xjNje9cYmr3/ZlpsJ4 HZNvb7IdfIJXGTZ/KRZA/X3ejSlowWcLOmWAPOzUt79tXgYAZD7HNjRqZ9Eyzt0JY0Wn Bt8A== X-Gm-Message-State: AOAM533ownQSWZ/Fq5d38ns/79poWbfvGA7ou4qK0ca0cf14kRTdw32h /g0fOb2KzBVAiAQWfx3jmOIMoXC2Ggk= X-Google-Smtp-Source: ABdhPJx3AZ/5UDRgNPwnUa8rDditiWtd5UiPDgXdi+rjsgEUsWmqqQzppdOw/PXM1j7MAad+61nPbA== X-Received: by 2002:a5e:c702:0:b0:64d:1640:9f8c with SMTP id f2-20020a5ec702000000b0064d16409f8cmr524493iop.176.1649280837935; Wed, 06 Apr 2022 14:33:57 -0700 (PDT) Received: from lvondent-mobl4.intel.com (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id v12-20020a92cd4c000000b002ca50ef78e4sm4726322ilq.62.2022.04.06.14.33.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 14:33:57 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 2/3] btdev: Add support for sending LE BIG Info Adv Reports Date: Wed, 6 Apr 2022 14:33:54 -0700 Message-Id: <20220406213355.1918220-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220406213355.1918220-1-luiz.dentz@gmail.com> References: <20220406213355.1918220-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This adds support for sending LE BIG Info Adv Reports if LE Create BIG has been called. --- emulator/btdev.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 6f44103a7..71dbea4be 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -1139,7 +1139,8 @@ static struct btdev_conn *conn_add_bis(struct btdev *dev, uint16_t handle, return conn; } -static struct btdev_conn *find_bis_index(struct btdev *remote, uint8_t index) +static struct btdev_conn *find_bis_index(const struct btdev *remote, + uint8_t index) { struct btdev_conn *conn; const struct queue_entry *entry; @@ -5105,6 +5106,40 @@ static int cmd_set_pa_data(struct btdev *dev, const void *data, return 0; } +static void send_biginfo(struct btdev *dev, const struct btdev *remote) +{ + struct bt_hci_evt_le_big_info_adv_report ev; + const struct btdev_conn *conn; + struct bt_hci_bis *bis; + + conn = find_bis_index(remote, 0); + if (!conn) + return; + + bis = conn->data; + + memset(&ev, 0, sizeof(ev)); + ev.sync_handle = cpu_to_le16(dev->le_pa_sync_handle); + ev.num_bis = 1; + + while (find_bis_index(remote, ev.num_bis)) + ev.num_bis++; + + ev.nse = 0x01; + ev.iso_interval = bis->latency / 1.25; + ev.bn = 0x01; + ev.pto = 0x00; + ev.irc = 0x01; + ev.max_pdu = bis->sdu; + memcpy(ev.sdu_interval, bis->sdu_interval, sizeof(ev.sdu_interval)); + ev.max_sdu = bis->sdu; + ev.phy = bis->phy; + ev.framing = bis->framing; + ev.encryption = bis->encryption; + + le_meta_event(dev, BT_HCI_EVT_LE_BIG_INFO_ADV_REPORT, &ev, sizeof(ev)); +} + static void send_pa(struct btdev *dev, const struct btdev *remote, uint8_t offset) { @@ -5135,7 +5170,10 @@ static void send_pa(struct btdev *dev, const struct btdev *remote, if (pdu.ev.data_status == 0x01) { offset += pdu.ev.data_len; send_pa(dev, remote, offset); + return; } + + send_biginfo(dev, remote); } static void le_pa_sync_estabilished(struct btdev *dev, struct btdev *remote, From patchwork Wed Apr 6 21:33:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 558923 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09658C433F5 for ; Wed, 6 Apr 2022 21:47:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235761AbiDFVtS (ORCPT ); Wed, 6 Apr 2022 17:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235298AbiDFVsy (ORCPT ); Wed, 6 Apr 2022 17:48:54 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F1E717ABAD for ; Wed, 6 Apr 2022 14:33:59 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id 125so4554338iov.10 for ; Wed, 06 Apr 2022 14:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=XHU0Ofs+uuxXDTpWsnrK31V5HiLi6pQC26DPjjOAhME=; b=TJmhFV24cRZq2ZkB14qt8d1i9hlSi25lF0aPHcI8hc2ydT85k+5TRYSeds0ZpUn+RE xaErsCRvhTzaJarF/bLUETMN3juIh8cCCjWbLrwXB0DG6c7kVlzddcbLdf++WLI6TdiC SgN9kYMFZG6bQbSMYCVCdDHKrNW68+Tq+wZ+8SKMAVy9nA7zRWWQ9feSEbpcJiGKZ+or bSwd1PxiDbQWmGfRD/NRUR6OHH1FNRRyToZoBk8GuZm24X7DGzlwq/ttu8f1+vDmKTR8 W+X6JPsXaH5lAAgot2ZGHLw9oqU6AlY1Suhmj8bzuaWy8ZOVKEPfs3OxAQcriuPOYv2l oIPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XHU0Ofs+uuxXDTpWsnrK31V5HiLi6pQC26DPjjOAhME=; b=AseSSy6frRA5ThOc/TlvUp9SLJwWngky2oUOPaAnZkD4knkXg60MryCPzhNr0k3Bzk 9srdtAnkP0oRnj+bv3lGEtpMfJvEJ8l5wDzruYJ9ysDU4ukIj6WGjsBYylsblDOXMn2s rCxzwsIPJOjVr49apJ8f+ESs4mewXG8wfku3FCz6QTtjc4/n4tz6Klxz5BYb2uX+2lZB goVabM7BxuD5T467djmid0ybZxctkijPdNLmLf/RQPnSK6KtOSRPq9uQUgWDFZ2cqfQy bFeVLpU3/S+xLuXRsBwOwRay27zrMJO1LFTk8ZmCFBgoe+e4ARGy8eNqlRez5u8ZTnvP 0MBw== X-Gm-Message-State: AOAM530N+T82rmfsROG9MGuUe2V7Yu47T1znb3FLgrXyY6IZ5O1auefd DsGzN7kxCErRqZ12yX/5T9xrYF7xpyY= X-Google-Smtp-Source: ABdhPJyAaVFz0iORqmBeg61qqJK6wxLLL9Rn1m6mVM1vwth0XnGkJrPbD8tvuF5kyB7NT7ppfJ7sBg== X-Received: by 2002:a5d:85d2:0:b0:5ed:a17c:a25c with SMTP id e18-20020a5d85d2000000b005eda17ca25cmr5063185ios.85.1649280838685; Wed, 06 Apr 2022 14:33:58 -0700 (PDT) Received: from lvondent-mobl4.intel.com (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id v12-20020a92cd4c000000b002ca50ef78e4sm4726322ilq.62.2022.04.06.14.33.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 14:33:58 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 3/3] btdev: Fix BIG Create Sync Date: Wed, 6 Apr 2022 14:33:55 -0700 Message-Id: <20220406213355.1918220-3-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220406213355.1918220-1-luiz.dentz@gmail.com> References: <20220406213355.1918220-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This fixes status return to BIG Create Sync command. --- emulator/btdev.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 71dbea4be..20d2ed34c 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -6070,15 +6070,19 @@ static int cmd_big_create_sync(struct btdev *dev, const void *data, uint8_t len) /* If the Sync_Handle does not exist, the Controller shall return the * error code Unknown Advertising Identifier (0x42). */ - if (dev->le_pa_sync_handle != le16_to_cpu(cmd->sync_handle)) + if (dev->le_pa_sync_handle != le16_to_cpu(cmd->sync_handle)) { status = BT_HCI_ERR_UNKNOWN_ADVERTISING_ID; + goto done; + } /* If the Host sends this command with a BIG_Handle that is already * allocated, the Controller shall return the error code Command * Disallowed (0x0C). */ - if (dev->big_handle == cmd->handle) + if (dev->big_handle == cmd->handle) { status = BT_HCI_ERR_COMMAND_DISALLOWED; + goto done; + } /* If the Num_BIS parameter is greater than the total number of BISes * in the BIG, the Controller shall return the error code Unsupported @@ -6087,12 +6091,10 @@ static int cmd_big_create_sync(struct btdev *dev, const void *data, uint8_t len) if (cmd->num_bis != len - sizeof(*cmd)) status = BT_HCI_ERR_UNSUPPORTED_FEATURE; - if (status) - return status; - +done: cmd_status(dev, status, BT_HCI_CMD_LE_BIG_CREATE_SYNC); - return status; + return 0; } static int cmd_big_create_sync_complete(struct btdev *dev, const void *data, @@ -6140,7 +6142,7 @@ static int cmd_big_create_sync_complete(struct btdev *dev, const void *data, pdu.ev.pto = 0x00; pdu.ev.irc = 0x01; pdu.ev.max_pdu = bis->sdu; - pdu.ev.interval = bis->latency; + pdu.ev.interval = bis->latency / 1.25; pdu.ev.num_bis = cmd->num_bis; le_meta_event(dev, BT_HCI_EVT_LE_BIG_SYNC_ESTABILISHED, &pdu, @@ -6873,6 +6875,7 @@ struct btdev *btdev_create(enum btdev_type type, uint16_t id) btdev->iso_mtu = 251; btdev->iso_max_pkt = 1; btdev->le_cig.params.cig_id = 0xff; + btdev->big_handle = 0xff; btdev->country_code = 0x00;