Re: Help needed to setup 6loble using IPSP sample


Vakul Garg <vakul.garg@...>
 

-----Original Message-----
From: Johan Hedberg [mailto:johan.hedberg@intel.com]
Sent: Wednesday, November 22, 2017 4:22 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Help needed to setup 6loble using IPSP sample

Hi Vakul,

On Wed, Nov 22, 2017, Vakul Garg wrote:
My BLE controller firmware experts told me that privacy feature has some
errata on my hardware.
I encountered the error even when zephyr was compiled without
CONFIG_BT_PRIVACY=y.
So, I patched the hci_core.c code like this to make it work.
Can you please comment?

diff --git a/subsys/bluetooth/host/hci_core.c
b/subsys/bluetooth/host/hci_core.c
index e02d5ff6a..e00ad5f37 100644
--- a/subsys/bluetooth/host/hci_core.c
+++ b/subsys/bluetooth/host/hci_core.c
@@ -3532,7 +3532,8 @@ static int le_set_event_mask(void)
mask |= BT_EVT_MASK_LE_ADVERTISING_REPORT;

if (IS_ENABLED(CONFIG_BT_CONN)) {
- if (BT_FEAT_LE_PRIVACY(bt_dev.le.features)) {
+ if (IS_ENABLED(CONFIG_BT_PRIVACY) &&
+ BT_FEAT_LE_PRIVACY(bt_dev.le.features)) {
mask |= BT_EVT_MASK_LE_ENH_CONN_COMPLETE;
} else {
mask |= BT_EVT_MASK_LE_CONN_COMPLETE; @@
-3673,7 +3674,8 @@ static int le_init(void)
}

#if defined(CONFIG_BT_SMP)
- if (BT_FEAT_LE_PRIVACY(bt_dev.le.features)) {
+ if (IS_ENABLED(CONFIG_BT_PRIVACY) &&
+ BT_FEAT_LE_PRIVACY(bt_dev.le.features)) {
struct bt_hci_rp_le_read_rl_size *rp;
struct net_buf *rsp;
This looks like fairly reasonable fix to me. Would you be able to submit it as a
pull request? Note that there's a minor coding style issue: the split line needs
to be aligned with the first one (i.e. start right after the opening parenthesis of
the first line).
Thanks for confirming.
I am new to open source development.
I will read and find out the process of patch submission and guidelines.
So, it will take a while for me to submit the patch.
I won't mind if you submit it before I could do.


Johan

Join users@lists.zephyrproject.org to automatically receive all group messages.