Error during scan network for a WiFi Provisioning application

Kazo-Huardi
Posts: 1
Joined: Tue Jul 30, 2024 2:26 pm

Error during scan network for a WiFi Provisioning application

Postby Kazo-Huardi » Tue Jul 30, 2024 2:51 pm

Hi everyone,

I am trying to create a .NET MAUI application to perform WiFi Provisioning with an ESP32 device via a BLE connection by following this guide https://docs.espressif.com/projects/esp ... oning.html.

I connect to the device, get its services/characteristics, write to the first characteristic ‘proto-ver’ and get security v1.1 and capabilities ‘wifi-scan’.
I then proceed to establish the connection by communicating with the characteristic ‘prov-session’, I use Security 1 then with AES/CTR/No Padding, the Pop, the Nonce etc... it seems that the session is established correctly.
I then proceed to communicate with the characteristic ‘prov-scan’, I prepare the first message to send via protobuf, (PrepareWiFiScanMsg), I encrypt it, I send it, I then proceed to read the reply, I decrypt it but when I try to process it it gives me an error, it tells me that the message contains an incorrect tag (zero) and/or the message is truncated. I compared my code with the one provided in the documentation https://github.com/espressif/esp-idf-pr ... ng-android, and I noticed that the response that I cannot process that sends the device in my project is always different, while in the example project it is always the same. I can't understand why, if anyone is able to help me I would be very happy, if you need more information please ask.

Thank you for your time.

Who is online

Users browsing this forum: No registered users and 68 guests