BLE Provisioning failure with NimBLE stack only

JadElClemens
Posts: 10
Joined: Mon Oct 28, 2019 9:04 pm

BLE Provisioning failure with NimBLE stack only

Postby JadElClemens » Tue Nov 26, 2019 9:45 pm

Hey all,

I've implemented WiFi provisioning using the WiFi Provisioning Manager component. I've tested out the SoftAP transport and am working on trying the BLE transport as well so I can compare the two experiences.

Some background:
  • I'm using the Security0 option for provisioning but may move to Security1 later.
  • Using ESP-IDF v4.0-beta2
  • I have not changed any of the bluetooth-related options in sdkconfig except for the Bluetooth stack
For some reason, this component doesn't play well with the NimBLE stack. Using NimBLE, the device enables Bluetooth and advertises itself properly, but when it receives the credentials I type on my (Android) device I get the following error log output consistently:

Code: Select all

E (198740) WiFiProvConfig: Unable to unpack config data
E (198741) protocomm_nimble: Invalid content received, killing connection
E (198831) wifi_prov_handlers: Wi-Fi config not set
NimBLE also outputs a bunch of debug information, presumably using printfs instead of builtin logging functions. If this info is useful I can paste the complete output using dummy credentials.

If I use the older Bluedroid stack instead of NimBLE, provisioning goes smoothly and works pretty consistently, just like with SoftAP transport. I'd like to switch to NimBLE since it's lighter-weight and I only plan on using BLE anyways.

afcec1
Posts: 23
Joined: Tue Oct 08, 2019 1:48 pm

Re: BLE Provisioning failure with NimBLE stack only

Postby afcec1 » Tue Apr 13, 2021 3:42 pm

Good question with no answers...

I was planning to do the same, currently my product integrates provisioning with either SoftAP or SmartConfig. Due to the fact that we are also adding some aditional functionalities using BLE (currently Bluedroid but migrating to Nimble) I would like to take this chance to enable also Wi-Fi provisioning over BLE. Should BLE provisioning work with Nimble stack?

afcec1
Posts: 23
Joined: Tue Oct 08, 2019 1:48 pm

Re: BLE Provisioning failure with NimBLE stack only

Postby afcec1 » Fri Apr 16, 2021 6:54 am

Yesterday I tested Wi-Fi provisioning with Nimble and worked just fine with the example provided

Who is online

Users browsing this forum: Baidu [Spider], chegewara and 77 guests