Wi-Fi Provisioning example "manager"

Zeni241
Posts: 86
Joined: Tue Nov 20, 2018 4:28 am

Wi-Fi Provisioning example "manager"

Postby Zeni241 » Sat Oct 10, 2020 6:03 am

I am working on provisioning example “manager” (https://github.com/espressif/esp-‎idf/t ... ng/manager ).‎
On device side I have flashed the above code with security 0. ‎
On client side I am using “Web Bluetooth API” to interact with device from browser. ‎
I can connect to the device and get Descriptor value. The response I get in client is as below:‎

Code: Select all

Requesting Bluetooth Device...‎
‎> Name: PROV_211114‎
‎> Id: EWxPB84jlYAHqvjJlt1drA==‎
‎> Connected: false‎
Connecting to GATT Server...‎
Getting Custom Service...‎
Getting Custom Level Characteristic...‎
Getting Custom Level Desriptor...‎
Descritor value=prov-config ‎
But I don’t know how to send my SSID and Password to the device. Should I write to characteristic or ‎descriptor? ‎
If I write to descriptor:‎

Code: Select all

let encoder = new TextEncoder('utf-8');‎
‎     let userDescription = encoder.encode('ssid:myssid ; password:mypassword');‎
‎     descriptor.writeValue(userDescription);‎
I get the error: ble.html:1 Uncaught (in promise) DOMException: GATT operation not permitted
If I write to characteristic:‎
l

Code: Select all

et encoder = new TextEncoder('utf-8');‎
‎     let userDescription = encoder.encode('ssid:myssid ; password:mypassword');‎
‎     characteristic.writeValue(userDescription);‎
I get the error on device side: ‎
E (803534) WiFiProvConfig: Unable to unpack config data
E (803534) protocomm_nimble: Invalid content received, killing connection‎

Any help please.‎

Who is online

Users browsing this forum: No registered users and 111 guests