diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp index a9eea4c4..a484987e 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/app.cpp @@ -99,6 +99,11 @@ void app::setup(uint32_t timeout) { mEep->read(ADDR_PINOUT, &mSys->Radio.pinCs); mEep->read(ADDR_PINOUT+1, &mSys->Radio.pinCe); mEep->read(ADDR_PINOUT+2, &mSys->Radio.pinIrq); + if(mSys->Radio.pinCs == mSys->Radio.pinCe) { + mSys->Radio.pinCs = RF24_CS_PIN; + mSys->Radio.pinCe = RF24_CE_PIN; + mSys->Radio.pinIrq = RF24_IRQ_PIN; + } // nrf24 amplifier power @@ -186,7 +191,10 @@ void app::setup(uint32_t timeout) { DPRINTLN(DBG_INFO, F("\n\n----------------------------------------")); DPRINTLN(DBG_INFO, F("Welcome to AHOY!")); DPRINT(DBG_INFO, F("\npoint your browser to http://")); - DBGPRINTLN(WiFi.localIP()); + if(mApActive) + DBGPRINTLN(F("192.168.1.1")); + else + DBGPRINTLN(WiFi.localIP()); DPRINTLN(DBG_INFO, F("to configure your device")); DPRINTLN(DBG_INFO, F("----------------------------------------\n")); } diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index 71bec321..8861bab9 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/defines.h @@ -12,8 +12,8 @@ // PINOUT (Default, can be changed in setup) //------------------------------------- #define RF24_CS_PIN 15 -#define RF24_CE_PIN 2 -#define RF24_IRQ_PIN 0 +#define RF24_CE_PIN 0 +#define RF24_IRQ_PIN 2 //------------------------------------- @@ -21,7 +21,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 4 -#define VERSION_PATCH 19 +#define VERSION_PATCH 20 //------------------------------------- diff --git a/tools/esp8266/html/h/index_html.h b/tools/esp8266/html/h/index_html.h index de5839da..b33d6948 100644 --- a/tools/esp8266/html/h/index_html.h +++ b/tools/esp8266/html/h/index_html.h @@ -1,4 +1,4 @@ #ifndef __INDEX_HTML_H__ #define __INDEX_HTML_H__ -const char index_html[] PROGMEM = "Index - {DEVICE}

AHOY - {DEVICE}

Visualization

Setup

Uptime:

Time:

Statistics:

Every {TS}seconds the values are updated

This project was started from this discussion. (Mikrocontroller.net)
New updates can be found on Github: https://github.com/grindylow/ahoy

Please report issues using the feature provided by Github.

Creative Commons - Creative Commons - https://creativecommons.org/licenses/by-nc-sa/3.0/de/
Check the licenses which are published on https://github.com/grindylow/ahoyas well

© 2022

Update Firmware

AHOY :: {VERSION}

Reboot

"; +const char index_html[] PROGMEM = "Index - {DEVICE}

AHOY - {DEVICE}

Visualization

Setup

Uptime:

Time:

Statistics:

Every {TS}seconds the values are updated

This project was started from this discussion. (Mikrocontroller.net)
New updates can be found on Github: https://github.com/grindylow/ahoy

Please report issues using the feature provided by Github.

Creative Commons - https://creativecommons.org/licenses/by-nc-sa/3.0/de/
Check the licenses which are published on https://github.com/grindylow/ahoy as well

© 2022

Update Firmware

AHOY :: {VERSION}

Reboot

"; #endif /*__INDEX_HTML_H__*/ diff --git a/tools/esp8266/html/index.html b/tools/esp8266/html/index.html index f07d032a..34ea470f 100644 --- a/tools/esp8266/html/index.html +++ b/tools/esp8266/html/index.html @@ -48,7 +48,7 @@
Please report issues using the feature provided by Github.

-

Creative Commons - Creative Commons - https://creativecommons.org/licenses/by-nc-sa/3.0/de/
+

Creative Commons - https://creativecommons.org/licenses/by-nc-sa/3.0/de/
Check the licenses which are published on https://github.com/grindylow/ahoy as well

diff --git a/tools/esp8266/main.cpp b/tools/esp8266/main.cpp index 6bd61fd5..ce96cbc5 100644 --- a/tools/esp8266/main.cpp +++ b/tools/esp8266/main.cpp @@ -63,8 +63,6 @@ void Main::setup(uint32_t timeout) { #ifndef AP_ONLY if(false == startAp) startAp = setupStation(timeout); -#else - setupAp(WIFI_AP_SSID, WIFI_AP_PWD); #endif mUpdater->setup(mWeb); @@ -79,11 +77,12 @@ void Main::loop(void) { mDns->processNextRequest(); #ifndef AP_ONLY if(checkTicker(&mNextTryTs, (WIFI_AP_ACTIVE_TIME * 1000))) { - mApLastTick = millis(); mApActive = setupStation(mLimit); if(mApActive) { if(strlen(WIFI_AP_PWD) < 8) DPRINTLN(DBG_ERROR, F("password must be at least 8 characters long")); + mApLastTick = millis(); + mNextTryTs = (millis() + (WIFI_AP_ACTIVE_TIME * 1000)); setupAp(WIFI_AP_SSID, WIFI_AP_PWD); } } @@ -134,7 +133,8 @@ bool Main::getConfig(void) { mEep->read(ADDR_PWD, mStationPwd, PWD_LEN); mEep->read(ADDR_DEVNAME, mDeviceName, DEVNAME_LEN); } - else { + + if((!mWifiSettingsValid) || (mStationSsid[0] == 0xff)) { snprintf(mStationSsid, SSID_LEN, "%s", FB_WIFI_SSID); snprintf(mStationPwd, PWD_LEN, "%s", FB_WIFI_PWD); snprintf(mDeviceName, DEVNAME_LEN, "%s", DEF_DEVICE_NAME);