This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bugs found in NRF Connect SDK while testing BLE Mesh Provisioning Authentication

During testing of various combination of BLE Mesh Provisioning, I found a couple of bugs in dk_prov.c

If you Disable all OOB options for no OOB, it does not work properly.  As well as several other combinations of OOB selections do not work properly or out of specification.

I have a suggested ChangeSet if your interested.

Parents
  • Hi,

    Feel free to post your suggested fix :)

    As well as several other combinations of OOB selections do not work properly or out of specification.

    Also, can you give more details on what you have tested?

  • diff --git a/subsys/bluetooth/mesh/dk_prov.c b/subsys/bluetooth/mesh/dk_prov.c
    index 4a30f183..155964bf 100644
    --- a/subsys/bluetooth/mesh/dk_prov.c
    +++ b/subsys/bluetooth/mesh/dk_prov.c
    @@ -136,7 +136,11 @@ static uint8_t dev_uuid[16];
    
     static const struct bt_mesh_prov prov = {
            .uuid = dev_uuid,
    +#if defined(CONFIG_BT_MESH_DK_PROV_OOB_LOG) || defined(CONFIG_BT_MESH_DK_PROV_OOB_BLINK)
            .output_size = 1,
    +#else
    +       .output_size = 0,
    +#endif
            .output_actions = (0
     #ifdef CONFIG_BT_MESH_DK_PROV_OOB_LOG
                    | BT_MESH_DISPLAY_NUMBER
    @@ -148,10 +152,13 @@ static const struct bt_mesh_prov prov = {
                    ),
            .output_number = output_number,
            .output_string = output_string,
    -       .input_size = 1,
            .input = input,
     #ifdef CONFIG_BT_MESH_DK_PROV_OOB_BUTTON
    +       .input_size = 1,
            .input_actions = BT_MESH_PUSH,
    +#else
    +       .input_size = 0,
    +    .input_actions = 0,
     #endif
    

    Suggested Patch

    I tested:

    1. No OOB
    2. Blink Output
    3. Button Input
Reply
  • diff --git a/subsys/bluetooth/mesh/dk_prov.c b/subsys/bluetooth/mesh/dk_prov.c
    index 4a30f183..155964bf 100644
    --- a/subsys/bluetooth/mesh/dk_prov.c
    +++ b/subsys/bluetooth/mesh/dk_prov.c
    @@ -136,7 +136,11 @@ static uint8_t dev_uuid[16];
    
     static const struct bt_mesh_prov prov = {
            .uuid = dev_uuid,
    +#if defined(CONFIG_BT_MESH_DK_PROV_OOB_LOG) || defined(CONFIG_BT_MESH_DK_PROV_OOB_BLINK)
            .output_size = 1,
    +#else
    +       .output_size = 0,
    +#endif
            .output_actions = (0
     #ifdef CONFIG_BT_MESH_DK_PROV_OOB_LOG
                    | BT_MESH_DISPLAY_NUMBER
    @@ -148,10 +152,13 @@ static const struct bt_mesh_prov prov = {
                    ),
            .output_number = output_number,
            .output_string = output_string,
    -       .input_size = 1,
            .input = input,
     #ifdef CONFIG_BT_MESH_DK_PROV_OOB_BUTTON
    +       .input_size = 1,
            .input_actions = BT_MESH_PUSH,
    +#else
    +       .input_size = 0,
    +    .input_actions = 0,
     #endif
    

    Suggested Patch

    I tested:

    1. No OOB
    2. Blink Output
    3. Button Input
Children
No Data
Related