Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLE-MESH static OOB authentication or None (IDFGH-13407) #14316

Open
3 tasks done
odewdney opened this issue Aug 6, 2024 · 3 comments
Open
3 tasks done

BLE-MESH static OOB authentication or None (IDFGH-13407) #14316

odewdney opened this issue Aug 6, 2024 · 3 comments
Assignees
Labels
Status: Opened Issue is new Type: Bug bugs in IDF

Comments

@odewdney
Copy link

odewdney commented Aug 6, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

5.3

Espressif SoC revision.

ESP32

Operating System used.

Windows

How did you build your project?

Command line with CMake

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32

Power Supply used.

USB

What is the expected behavior?

I have a BLE-Mesh bulb that has static OOB authentication set, but also accepts NO_OOB. In the "Provisioning Capabilities" it correctly advertises that it has Static OOB (0x1).

As I have not set the Static OOB in the ESP32 ESP-IDF provisioner, I would expect that the authentication to method in the "Provisioning Start" packet to be none, and for the provisioning to succeed.

What is the actual behavior?

provisioning fails with the remote device ( bulb ) returning error code 4.

The ESP-IDF provisioner ask for Static OOB, but fills the auth data with 0 ( copied from the zero length data in the provisioner context ), but the remote device uses its OOB data, and authentication fails.

Steps to reproduce.

Use a bulb that is marked with "Works with Alexa" which typically is pre-provisioned with a static OOB data for secure paring with the assistant.

Use and ESP32x with example provisioner, and the uuid 'match' set to either none, or match the UUID of the device.

Provisioning fails

Debug Logs.

No response

More Information.

In https://github.com/espressif/esp-idf/blob/master/components/bt/esp_ble_mesh/core/prov_pvnr.c#L1280
static void prov_capabilities(struct bt_mesh_prov_link *link, struct net_buf_simple *buf)

where it checks if it could use static OOB, check that there is configured static OOB data in the context:

if (oob_type & BIT(PROV_STATIC_OOB_AVAILABLE) **&& prov_ctx.static_oob_len > 0**) {
    /* if static oob is valid, just use static oob */

Also it would be useful to be able to remove static OOB data when switching between different devices with different authentication needs.
Currently bt_mesh_provisioner_set_static_oob_value checks for length > 0

@odewdney odewdney added the Type: Bug bugs in IDF label Aug 6, 2024
@github-actions github-actions bot changed the title BLE-MESH static OOB authentication or None BLE-MESH static OOB authentication or None (IDFGH-13407) Aug 6, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Aug 6, 2024
@forx157
Copy link
Collaborator

forx157 commented Oct 15, 2024

Hi, @odewdney

Sorry this has sat around for an extraordinary long time without further feedback.

I don't understand your point. Once a node sets the static OOB bit in the provisioning capabilities, the provisioner should obtain the public key using the static OOB method. If the provisioning fails because the application hasn't set the static OOB, it should be an issue with the application settings, not with the ble mesh protocol.

@odewdney
Copy link
Author

Hi, The issue is that the bulb supports BOTH oob and none. But the esp code will error if I try to provision the bulb with none.

@forx157
Copy link
Collaborator

forx157 commented Oct 21, 2024

hi, @odewdney
Alright, I understand what you mean. I will fix this issue in the future. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants