mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
Check bad AT firmware version
This commit is contained in:
parent
b3cafd126e
commit
46289fa78c
|
@ -200,7 +200,21 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
|
||||||
|
|
||||||
// Display the AT version information
|
// Display the AT version information
|
||||||
StringFormatter::send(wifiStream, F("AT+GMR\r\n"));
|
StringFormatter::send(wifiStream, F("AT+GMR\r\n"));
|
||||||
checkForOK(2000, true, false); // Makes this visible on the console
|
if (checkForOK(2000, F("AT version:"), true, false)) {
|
||||||
|
char version[] = "0.0.0.0";
|
||||||
|
for (int i=0; i<8;i++) {
|
||||||
|
while(!wifiStream->available());
|
||||||
|
version[i]=wifiStream->read();
|
||||||
|
StringFormatter::printEscape(version[i]);
|
||||||
|
if ((version[0] == '0') ||
|
||||||
|
(version[0] == '2' && version[2] == '0') ||
|
||||||
|
(version[0] == '2' && version[2] == '2' && version[4] == '0' && version[6] == '0')) {
|
||||||
|
SSid = F("DCCEX_SAYS_BROKEN_FIRMWARE");
|
||||||
|
forceAP = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkForOK(2000, true, false);
|
||||||
|
|
||||||
#ifdef DONT_TOUCH_WIFI_CONF
|
#ifdef DONT_TOUCH_WIFI_CONF
|
||||||
DIAG(F("DONT_TOUCH_WIFI_CONF was set: Using existing config"));
|
DIAG(F("DONT_TOUCH_WIFI_CONF was set: Using existing config"));
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.0.2"
|
#define VERSION "5.0.3"
|
||||||
|
// 5.0.3 - Check bad AT firmware version
|
||||||
// 5.0.2 - Bugfix: ESP32 30ms off time
|
// 5.0.2 - Bugfix: ESP32 30ms off time
|
||||||
// 5.0.1 - Bugfix: execute 30ms off time before rejoin
|
// 5.0.1 - Bugfix: execute 30ms off time before rejoin
|
||||||
// 5.0.0 - Make 4.2.69 the 5.0.0 release
|
// 5.0.0 - Make 4.2.69 the 5.0.0 release
|
||||||
|
|
Loading…
Reference in New Issue
Block a user