Bluetooth mesh - provisioning with static OOB


laczenJMS
 

Hi,

I would like to create a zephyr bluetooth mesh node with a public key
using static OOB provisioning. I tried using

static uint8_t static_key[16] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,};

static const struct bt_mesh_prov prov = {
.uuid = dev_uuid,
.static_val = static_key,
.static_val_len = 16,
.complete = prov_complete,
};

The provisioner (meshctl) never asks for the public key when
provisioning and provisioning fails. Is this the correct way to setup
static OOB ?

Kind regards,

Jehudi


Johan Hedberg
 

Hi Jehudi,

On Fri, Sep 01, 2017, Laczen JMS wrote:
I would like to create a zephyr bluetooth mesh node with a public key
using static OOB provisioning. I tried using

static uint8_t static_key[16] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,};

static const struct bt_mesh_prov prov = {
.uuid = dev_uuid,
.static_val = static_key,
.static_val_len = 16,
.complete = prov_complete,
};

The provisioner (meshctl) never asks for the public key when
provisioning and provisioning fails. Is this the correct way to setup
static OOB ?
I took a look at the Zephyr prov.c code, and it looks like there's a
possible off-by-one error in setting the Static OOB type value in the
Provisioning Capabilities PDU. Does the attached patch help?

Johan


Johan Hedberg
 

Hi,

On Fri, Sep 01, 2017, Johan Hedberg wrote:
On Fri, Sep 01, 2017, Laczen JMS wrote:
I would like to create a zephyr bluetooth mesh node with a public key
using static OOB provisioning. I tried using

static uint8_t static_key[16] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,};

static const struct bt_mesh_prov prov = {
.uuid = dev_uuid,
.static_val = static_key,
.static_val_len = 16,
.complete = prov_complete,
};

The provisioner (meshctl) never asks for the public key when
provisioning and provisioning fails. Is this the correct way to setup
static OOB ?
I took a look at the Zephyr prov.c code, and it looks like there's a
possible off-by-one error in setting the Static OOB type value in the
Provisioning Capabilities PDU. Does the attached patch help?
After cross-checking with the Mesh spec this does look like a clear bug
to me, so I've opened a PR for it:

https://github.com/zephyrproject-rtos/zephyr/pull/1325

If things still don't work after this I'd start looking at meshctl code.

Johan


laczenJMS
 

Hi Johan,

The patch solves the issue.

Kind regards,

Jehudi

2017-09-01 12:18 GMT+02:00 Johan Hedberg <johan.hedberg@...>:

Hi,

On Fri, Sep 01, 2017, Johan Hedberg wrote:
On Fri, Sep 01, 2017, Laczen JMS wrote:
I would like to create a zephyr bluetooth mesh node with a public key
using static OOB provisioning. I tried using

static uint8_t static_key[16] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,};

static const struct bt_mesh_prov prov = {
.uuid = dev_uuid,
.static_val = static_key,
.static_val_len = 16,
.complete = prov_complete,
};

The provisioner (meshctl) never asks for the public key when
provisioning and provisioning fails. Is this the correct way to setup
static OOB ?
I took a look at the Zephyr prov.c code, and it looks like there's a
possible off-by-one error in setting the Static OOB type value in the
Provisioning Capabilities PDU. Does the attached patch help?
After cross-checking with the Mesh spec this does look like a clear bug
to me, so I've opened a PR for it:

https://github.com/zephyrproject-rtos/zephyr/pull/1325

If things still don't work after this I'd start looking at meshctl code.

Johan