Wi-Fi Provisioning example "manager"
Posted: 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:
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:
I get the error: ble.html:1 Uncaught (in promise) DOMException: GATT operation not permitted
If I write to characteristic:
l
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.
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
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);
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);
E (803534) WiFiProvConfig: Unable to unpack config data
E (803534) protocomm_nimble: Invalid content received, killing connection
Any help please.