mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-30 03:26:13 +01:00
empty SSID is "unconfigured" as well
This commit is contained in:
parent
612cb95f85
commit
df2e40fa11
|
@ -172,7 +172,7 @@ wifiSerialState WifiInterface::setup2(const __FlashStringHelper* SSid, const __F
|
||||||
// ESP8266 is preconfigured. We check the first 13 chars
|
// ESP8266 is preconfigured. We check the first 13 chars
|
||||||
// of the SSid.
|
// of the SSid.
|
||||||
char *yourNetwork = "Your network ";
|
char *yourNetwork = "Your network ";
|
||||||
if (strncmp_P(yourNetwork, (const char*)SSid, 13) == 0) {
|
if (strncmp_P(yourNetwork, (const char*)SSid, 13) == 0 || SSid[0] == '\0') {
|
||||||
delay(8000); // give a preconfigured ES8266 a chance to connect to a router
|
delay(8000); // give a preconfigured ES8266 a chance to connect to a router
|
||||||
|
|
||||||
StringFormatter::send(wifiStream, F("AT+CIFSR\r\n"));
|
StringFormatter::send(wifiStream, F("AT+CIFSR\r\n"));
|
||||||
|
|
|
@ -49,8 +49,14 @@ The configuration file for DCC++ EX Command Station
|
||||||
// AT commands and the other WIFI_* defines below do not have any effect.
|
// AT commands and the other WIFI_* defines below do not have any effect.
|
||||||
//#define DONT_TOUCH_WIFI_CONF
|
//#define DONT_TOUCH_WIFI_CONF
|
||||||
//
|
//
|
||||||
// WIFI_SSID is the network name IF you want to use your home network.
|
// WIFI_SSID is the network name IF you want to use your existing home network.
|
||||||
// Do NOT change this if you want to use the WiFi in Access Point mode.
|
// Do NOT change this if you want to use the WiFi in Access Point (AP) mode.
|
||||||
|
//
|
||||||
|
// If you do NOT set the WIFI_SSID, the WiFi chip will first try
|
||||||
|
// to connect to the previously configured network and if that fails
|
||||||
|
// fall back to Access Point mode. The SSID of the AP will be
|
||||||
|
// automatically set to DCCEX_*.
|
||||||
|
//
|
||||||
// Your SSID may not conain ``"'' (double quote, ASCII 0x22).
|
// Your SSID may not conain ``"'' (double quote, ASCII 0x22).
|
||||||
#define WIFI_SSID "Your network name"
|
#define WIFI_SSID "Your network name"
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user