Skip to content

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

@xoseperez

Description

@xoseperez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajor

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions