justwifi icon indicating copy to clipboard operation
justwifi copied to clipboard

jw.setSoftAP() does not set WiFi soft AP name if a ESP previously had a softAP name.

Open xoseperez opened this issue 7 years ago • 0 comments

Originally reported by: Arihant Daga (Bitbucket: arihantdaga, GitHub: arihantdaga)


I am refering to this code in espurna framework.

jw.setSoftAP(getSetting("hostname", HOSTNAME).c_str(), NULL);

If AP_MODE is set to AP_MODE_OFF then after dumping the code into an ESP Which had previous code given in examples of ESP8266WiFi. The Hotspot will appear with that older name. So i tried writing in the end of function - JustWifi::setSoftAP()

#!c++

WiFi.softAP(_softap.ssid, _softap.pass);

It gave expected result.

And also sometimes by default ESP's wifi mode is set to WIFI_AP, so in espurna framework if no ssid is present in settings, and AP_MODE is set to AP_MODE_ALONE then ESP will by default go into AP_MODE and justwifi will not send any message like - _doCallback(MESSAGE_ACCESSPOINT_CREATING);

So i think this library should set a default mode of ESP as well in the beginning itself. This will give a more predictive result to users.

xoseperez avatar Nov 17 '17 11:11 xoseperez