espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
706 stars 169 forks source link

FG mode WiFi status reporting issue #435

Closed linchanghe123 closed 3 months ago

linchanghe123 commented 3 months ago

Hi mantriyogesh,

Feedback on an issue with the NG mode: In the code on the ESP32 side, the function req_connect_ap_handler reports WiFi connection status, SSID errors, and password errors, which are overwritten, causing the host to be unable to obtain detailed error status.

image

mantriyogesh commented 3 months ago

Yes, originally we only sent success or failure , the log at ESP shows the problem encountered.

This needs a fix in all apis to send back all the real failure integer.

At https://github.com/espressif/esp-hosted/blob/a00a99ba35a805a5166bac8aea6fd4741db6a4e5/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_control.c#L434

We can initialise resp as:

resp_payload->resp =  FAILURE;

and comment the line,

https://github.com/espressif/esp-hosted/blob/a00a99ba35a805a5166bac8aea6fd4741db6a4e5/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_control.c#L603

This is still workaround, proper fix to fix all the apis to return the failure. We will fix this.