Skip to content

problem reconnect wifi after wifi.disconnect  #5227

@atlask1

Description

@atlask1

Hi,
I'm using ESP32 with Arduino core (1.0.6).
My sketch/project use BLE to set wifi credential and to select if connect or not to wifi network.
Until v1.0.3 all work, but with update I find this error when I try to reconnect after 'WiFi.disconnect(true)' or when I change credential:

[663177][E][WiFiGeneric.cpp:983] mode(): Could not set mode! 12289
read from file:/credential.json
{"ssid":"xxxxxxx","psw":"xxxxxxxxxx"}
[663189][E][WiFiGeneric.cpp:983] mode(): Could not set mode! 12289
[663194][E][WiFiSTA.cpp:152] begin(): STA enable failed!

In sketch I read ssid and psw from a json file, I've a task that take care of wifi connection and if I need to change wifi connection or I suspend connection, task perform
WiFi.mode(WIFI_STA);
WIFI.begin(ssid,psw);

I've read this :
#4842 (comment)

but not solve the problem.

What can I do to solve?
It's only my problem or there's other issue like this?
thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: BT&WifiBT & Wifi related issuesStatus: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions