improved ENQ response, now includes hashes and ID. Added ID to boot msg

new-codepages
Ondřej Hruška 7 years ago
parent a514601897
commit 76272530ec
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      libesphttpd
  2. 8
      user/ansi_parser_callbacks.c
  3. 2
      user/cgi_d2d.c
  4. 2
      user/cgi_main.c
  5. 24
      user/user_main.c
  6. 13
      user/version.h

@ -1 +1 @@
Subproject commit 348420959b919d95412daeafe5014f4255854f80
Subproject commit e4ecf0724e36c828be5222eddce58a6a5cd2386f

@ -47,8 +47,14 @@ apars_handle_enq(void)
{
if (enquiry_suppressed) return;
u8 mac[6];
wifi_get_macaddr(SOFTAP_IF, mac);
char buf100[100];
sprintf(buf100, "\x1bXESPTerm "VERSION_STRING" #"GIT_HASH_BACKEND"+"GIT_HASH_FRONTEND" id=%02X%02X%02X\x1b\\", mac[3], mac[4], mac[5]);
// version encased in SOS and ST
apars_respond("\x1bXESPTerm " FIRMWARE_VERSION "\x1b\\");
apars_respond(buf100);
// Throttle enquiry - this is a single-character-invoked response,
// so it tends to happen randomly when throwing garbage at the ESP.

@ -14,7 +14,7 @@
#define D2D_TIMEOUT_MS 2000
#define D2D_HEADERS \
"User-Agent: ESPTerm "FIRMWARE_VERSION" like curl wget HTTPie\r\n" \
"User-Agent: ESPTerm "VERSION_STRING" like curl wget HTTPie\r\n" \
"Content-Type: text/plain; charset=utf-8\r\n" \
"Accept-Encoding: identity\r\n" \
"Accept-Charset: utf-8\r\n" \

@ -44,7 +44,7 @@ tplAbout(HttpdConnData *connData, char *token, void **arg)
if (token == NULL) return HTTPD_CGI_DONE;
if (streq(token, "vers_fw")) {
tplSend(connData, FIRMWARE_VERSION, -1);
tplSend(connData, VERSION_STRING, -1);
}
else if (streq(token, "date")) {
tplSend(connData, __DATE__, -1);

@ -104,14 +104,22 @@ void ICACHE_FLASH_ATTR user_init(void)
wifi_station_set_auto_connect(false);
wifi_set_opmode(NULL_MODE); // saves to flash if changed - this might avoid the current spike on startup?
printf("\r\n");
banner("====== ESPTerm ======");
banner_info("Firmware (c) Ondrej Hruska, 2017");
banner_info(TERMINAL_GITHUB_REPO);
banner_info("");
banner_info("Version "FIRMWARE_VERSION",");
u8 mac[6];
wifi_get_macaddr(SOFTAP_IF, mac);
banner_gap();
banner("================ ESPTerm ================");
banner_info();
banner_info("Project by Ondrej Hruska, 2017");
banner_info();
banner_info(TERMINAL_GITHUB_REPO_NOPROTO);
banner_info();
banner_info("Version "FW_VERSION", code name "FW_CODENAME_QUOTED);
banner_info(" back-end #"GIT_HASH_BACKEND" front-end #"GIT_HASH_FRONTEND);
banner_info(" built "__DATE__" at "__TIME__" "__TIMEZONE__);
printf("\r\n");
banner_info();
banner_info("Device ID: %02X%02X%02X", mac[3], mac[4], mac[5]);
banner_gap();
ioInit();
@ -139,7 +147,7 @@ static void ICACHE_FLASH_ATTR user_start(void *unused)
captdnsInit();
httpdInit(routes, 80);
httpdSetName("ESPTerm " FIRMWARE_VERSION);
httpdSetName("ESPTerm " VERSION_STRING);
ansi_parser_inhibit = false;

@ -10,11 +10,20 @@
#define FW_V_MAJOR 2
#define FW_V_MINOR 1
#define FW_V_PATCH 0
#define FW_V_SUFFIX "-beta"
//#define FW_V_SUFFIX ""
#define FW_CODENAME "Anthill" // 2.1.0
#define FW_CODENAME_QUOTED "\""FW_CODENAME"\""
#define FW_VERSION STR(FW_V_MAJOR) "." STR(FW_V_MINOR) "." STR(FW_V_PATCH) FW_V_SUFFIX
#define VERSION_STRING FW_VERSION " " FW_CODENAME_QUOTED
#define FIRMWARE_VERSION STR(FW_V_MAJOR) "." STR(FW_V_MINOR) "." STR(FW_V_PATCH) " \"" FW_CODENAME "\""
#define FIRMWARE_VERSION_NUM (FW_V_MAJOR*1000 + FW_V_MINOR*10 + FW_V_PATCH) // this is used in ID queries
#define TERMINAL_GITHUB_REPO "https://github.com/espterm/espterm-firmware"
#define TERMINAL_GITHUB_REPO_NOPROTO "github.com/espterm/espterm-firmware"
#define TERMINAL_GITHUB_REPO "https://"TERMINAL_GITHUB_REPO_NOPROTO
#define TERMINAL_GITHUB_REPO_FRONT "https://github.com/espterm/espterm-front-end"
#endif //ESP_VT100_FIRMWARE_VERSION_H

Loading…
Cancel
Save