Wi-Fi Provisioning over BLE using NimBLE GATT with Custom Services and Custom UUIDs

ikkott
Posts: 1
Joined: Sat Apr 12, 2025 1:09 pm

Wi-Fi Provisioning over BLE using NimBLE GATT with Custom Services and Custom UUIDs

Postby ikkott » Sat Apr 12, 2025 1:28 pm

I've been reading the documentation and browsing the forum, but I couldn't find a clear solution.

I'm working on a project where I want to implement Wi-Fi provisioning over BLE using the NimBLE stack and the official Espressif example:
https://github.com/espressif/esp-idf/tr ... i_prov_mgr

In addition to the provisioning service, I need to include additional custom GATT services with custom UUIDs.

The GATT structure I need to implement is:

Code: Select all

GATT Server
│
├── Wi-Fi Provisioning Service (UUID: xxxx)
│   ├── Characteristic 1 (UUID: yyyy)
│   ├── ...
│   ├── Characteristic X (UUID: zzzz)
│
├── Custom Service 1 (UUID: xxxx1)
│   ├── Characteristic A (UUID: yyyy1)
│   ├── Characteristic B (UUID: zzzz1)
│
├── Custom Service 2 (UUID: xxxx2)
│   ├── Characteristic C (UUID: yyyy2)
│   └── Characteristic D (UUID: zzzz2)

However, when I use wifi_prov_mgr_endpoint_register, all the custom characteristics get added under the Wi-Fi Provisioning Service, resulting in this structure:

Code: Select all

GATT Server
│
├── Wi-Fi Provisioning Service (UUID: xxxx)
│   ├── Characteristic 1 (UUID: yyyy)
│   ├── ...
│   ├── Characteristic X (UUID: zzzz)
│   ├── Characteristic A (UUID: yyyy1)
│   ├── Characteristic B (UUID: zzzz1)
│   ├── Characteristic C (UUID: yyyy2)
│   └── Characteristic D (UUID: zzzz2)
But I need to keep the original structure with clearly separated services. If I try to inject the services separately, I end up breaking the provisioning structure.

My questions are:

1. Are there any recommendations or limitations when implementing BLE Wi-Fi provisioning using NimBLE alongside custom GATT services?

2. Is there any example or guide that shows how to implement this kind of structure with NimBLE?


Thanks in advance! I'm just getting into Espressif BLE development, so any guidance or recommendations are very much appreciated.

Who is online

Users browsing this forum: No registered users and 1 guest