Bluetooth: Mesh: Fix provisioner provisioning
Correct format errors, such as oob action 2-octers should use 0x%04x, and action in prov capalilities pdu big-ending. When every call `bt_mesh_auth_method_set<*>` should also clear auth value, otherwise will case confirm failed. Provisioner role expect peer public key should be sent immediately, instead of requiring ACK. After all, ACK may be lost, and the other device’s public key will be sent over, and provisioning procedure will be failed.. This is a resubmission of PR (#30086) Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
parent
99f53662dc
commit
0841ee69f2
2 changed files with 12 additions and 10 deletions
|
@ -50,7 +50,7 @@ int bt_mesh_prov_reset_state(void (*func)(const uint8_t key[64]))
|
|||
{
|
||||
int err;
|
||||
static struct bt_pub_key_cb pub_key_cb;
|
||||
const size_t offset = offsetof(struct bt_mesh_prov_link, dhkey);
|
||||
const size_t offset = offsetof(struct bt_mesh_prov_link, auth);
|
||||
|
||||
pub_key_cb.func = func ? func : pub_key_ready;
|
||||
|
||||
|
@ -268,7 +268,7 @@ static void prov_recv(const struct prov_bearer *bearer, void *cb_data,
|
|||
|
||||
if (type >= ARRAY_SIZE(bt_mesh_prov_link.role->op)) {
|
||||
BT_ERR("Unknown provisioning PDU type 0x%02x", type);
|
||||
bt_mesh_prov_link.role->error(PROV_ERR_NVAL_FMT);
|
||||
bt_mesh_prov_link.role->error(PROV_ERR_NVAL_PDU);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue