strings_en.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. /**
  2. * strings_en.h
  3. * engligh strings for
  4. * WiFiManager, a library for the ESP8266/Arduino platform
  5. * for configuration of WiFi credentials using a Captive Portal
  6. *
  7. * @author Creator tzapu
  8. * @author tablatronix
  9. * @version 0.0.0
  10. * @license MIT
  11. */
  12. #ifndef _WM_STRINGS_H_
  13. #define _WM_STRINGS_H_
  14. #ifndef WIFI_MANAGER_OVERRIDE_STRINGS
  15. // !!! THIS DOES NOT WORK, you cannot define in a sketch, if anyone one knows how to order includes to be able to do this help!
  16. const char HTTP_HEAD_START[] PROGMEM = "<!DOCTYPE html><html lang='en'><head><meta name='format-detection' content='telephone=no'><meta charset='UTF-8'><meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'/><title>{v}</title>";
  17. const char HTTP_SCRIPT[] PROGMEM = "<script>function c(l){"
  18. "document.getElementById('s').value=l.innerText||l.textContent;"
  19. "p = l.nextElementSibling.classList.contains('l');"
  20. "alert(p);"
  21. "document.getElementById('p').disabled = !p;"
  22. "if(p)document.getElementById('p').focus();}</script>";
  23. const char HTTP_HEAD_END[] PROGMEM = "</head><body class='{c}'><div class='wrap'>";
  24. const char HTTP_ROOT_MAIN[] PROGMEM = "<h1>{v}</h1><h3>WiFiManager</h3>";
  25. const char * const HTTP_PORTAL_MENU[] PROGMEM = {
  26. "<form action='/wifi' method='get'><button>Configure WiFi</button></form><br/>\n", // MENU_WIFI
  27. "<form action='/0wifi' method='get'><button>Configure WiFi (No Scan)</button></form><br/>\n", // MENU_WIFINOSCAN
  28. "<form action='/info' method='get'><button>Info</button></form><br/>\n", // MENU_INFO
  29. "<form action='/param' method='get'><button>Setup</button></form><br/>\n",//MENU_PARAM
  30. "<form action='/close' method='get'><button>Close</button></form><br/>\n", // MENU_CLOSE
  31. "<form action='/restart' method='get'><button>Restart</button></form><br/>\n",// MENU_RESTART
  32. "<form action='/exit' method='get'><button>Exit</button></form><br/>\n", // MENU_EXIT
  33. "<form action='/erase' method='get'><button class='D'>Erase</button></form><br/>\n", // MENU_ERASE
  34. "<hr><br/>" // MENU_SEP
  35. };
  36. // const char HTTP_PORTAL_OPTIONS[] PROGMEM = strcat(HTTP_PORTAL_MENU[0] , HTTP_PORTAL_MENU[3] , HTTP_PORTAL_MENU[7]);
  37. const char HTTP_PORTAL_OPTIONS[] PROGMEM = "";
  38. const char HTTP_ITEM_QI[] PROGMEM = "<div role='img' aria-label='{r}%' title='{r}%' class='q q-{q} {i} {h}'></div>"; // rssi icons
  39. const char HTTP_ITEM_QP[] PROGMEM = "<div class='q {h}'>{r}%</div>"; // rssi percentage
  40. const char HTTP_ITEM[] PROGMEM = "<div><a href='#p' onclick='c(this)'>{v}</a>{qi}{qp}</div>"; // {q} = HTTP_ITEM_QI, {r} = HTTP_ITEM_QP
  41. // const char HTTP_ITEM[] PROGMEM = "<div><a href='#p' onclick='c(this)'>{v}</a> {R} {r}% {q} {e}</div>"; // test all tokens
  42. const char HTTP_FORM_START[] PROGMEM = "<form method='POST' action='{v}'>";
  43. const char HTTP_FORM_WIFI[] PROGMEM = "<label for='s'>SSID</label><input id='s' name='s' maxlength='32' autocorrect='off' autocapitalize='none' placeholder='{v}'><br/><label for='p'>Password</label><input id='p' name='p' maxlength='64' type='password' placeholder='{p}'>";
  44. const char HTTP_FORM_WIFI_END[] PROGMEM = "";
  45. const char HTTP_FORM_STATIC_HEAD[] PROGMEM = "<hr><br/>";
  46. const char HTTP_FORM_END[] PROGMEM = "<br/><br/><button type='submit'>Save</button></form>";
  47. const char HTTP_FORM_LABEL[] PROGMEM = "<label for='{i}'>{t}</label>";
  48. const char HTTP_FORM_PARAM_HEAD[] PROGMEM = "<hr><br/>";
  49. const char HTTP_FORM_PARAM[] PROGMEM = "<br/><input id='{i}' name='{n}' maxlength='{l}' value='{v}' {c}>";
  50. const char HTTP_SCAN_LINK[] PROGMEM = "<br/><form action='/wifi?refresh=1' method='POST'><button name='refresh' value='1'>Refresh</button></form>";
  51. const char HTTP_SAVED[] PROGMEM = "<div class='msg'>Saving Credentials<br/>Trying to connect ESP to network.<br />If it fails reconnect to AP to try again</div>";
  52. const char HTTP_PARAMSAVED[] PROGMEM = "<div class='msg'>Saved<br/></div>";
  53. const char HTTP_END[] PROGMEM = "</div></body></html>";
  54. const char HTTP_ERASEBTN[] PROGMEM = "<br/><form action='/erase' method='get'><button class='D'>Erase WiFi Config</button></form>";
  55. const char HTTP_STATUS_ON[] PROGMEM = "<div class='msg P'><strong>Connected</strong> to {v}<br/><em><small>with IP {i}</small></em></div>";
  56. const char HTTP_STATUS_OFF[] PROGMEM = "<div class='msg {c}'><strong>Not Connected</strong> to {v}{r}</div>";
  57. const char HTTP_STATUS_OFFPW[] PROGMEM = "<br/>Authentication Failure"; // STATION_WRONG_PASSWORD, no eps32
  58. const char HTTP_STATUS_OFFNOAP[] PROGMEM = "<br/>AP not found"; // WL_NO_SSID_AVAIL
  59. const char HTTP_STATUS_OFFFAIL[] PROGMEM = "<br/>Could not Connect"; // WL_CONNECT_FAILED
  60. const char HTTP_STATUS_NONE[] PROGMEM = "<div class='msg'>No AP set</div>";
  61. const char HTTP_BR[] PROGMEM = "<br/>";
  62. const char HTTP_STYLE[] PROGMEM = "<style>"
  63. ".c,body{text-align:center;font-family:verdana}div,input{padding:5px;font-size:1em;margin:5px 0;box-sizing:border-box;}"
  64. "input,button,.msg{border-radius:.3rem;width: 100%}"
  65. "button,input[type='button'],input[type='submit']{cursor:pointer;border:0;background-color:#1fa3ec;color:#fff;line-height:2.4rem;font-size:1.2rem;width:100%}"
  66. "input[type='file']{border:1px solid #1fa3ec}"
  67. ".wrap {text-align:left;display:inline-block;min-width:260px;max-width:500px}"
  68. // links
  69. "a{color:#000;font-weight:700;text-decoration:none}a:hover{color:#1fa3ec;text-decoration:underline}"
  70. // quality icons
  71. ".q{height:16px;margin:0;padding:0 5px;text-align:right;min-width:38px;float:right}.q.q-0:after{background-position-x:0}.q.q-1:after{background-position-x:-16px}.q.q-2:after{background-position-x:-32px}.q.q-3:after{background-position-x:-48px}.q.q-4:after{background-position-x:-64px}.q.l:before{background-position-x:-80px;padding-right:5px}.ql .q{float:left}.q:after,.q:before{content:'';width:16px;height:16px;display:inline-block;background-repeat:no-repeat;background-position: 16px 0;"
  72. "background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAQCAMAAADeZIrLAAAAJFBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHJj5lAAAAC3RSTlMAIjN3iJmqu8zd7vF8pzcAAABsSURBVHja7Y1BCsAwCASNSVo3/v+/BUEiXnIoXkoX5jAQMxTHzK9cVSnvDxwD8bFx8PhZ9q8FmghXBhqA1faxk92PsxvRc2CCCFdhQCbRkLoAQ3q/wWUBqG35ZxtVzW4Ed6LngPyBU2CobdIDQ5oPWI5nCUwAAAAASUVORK5CYII=');}"
  73. // icons @2x media query (32px rescaled)
  74. "@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.q:before,.q:after {"
  75. "background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAAgCAMAAACfM+KhAAAALVBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAOrOgAAAADnRSTlMAESIzRGZ3iJmqu8zd7gKjCLQAAACmSURBVHgB7dDBCoMwEEXRmKlVY3L//3NLhyzqIqSUggy8uxnhCR5Mo8xLt+14aZ7wwgsvvPA/ofv9+44334UXXngvb6XsFhO/VoC2RsSv9J7x8BnYLW+AjT56ud/uePMdb7IP8Bsc/e7h8Cfk912ghsNXWPpDC4hvN+D1560A1QPORyh84VKLjjdvfPFm++i9EWq0348XXnjhhT+4dIbCW+WjZim9AKk4UZMnnCEuAAAAAElFTkSuQmCC');"
  76. "background-size: 95px 16px;}}"
  77. // msg callouts
  78. ".msg{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-left-color:#777}.msg h4{margin-top:0;margin-bottom:5px}.msg.P{border-left-color:#1fa3ec}.msg.P h4{color:#1fa3ec}.msg.D{border-left-color:#dc3630}.msg.D h4{color:#dc3630}"
  79. // lists
  80. "dt{font-weight:bold}dd{margin:0;padding:0 0 0.5em 0;min-height:12px}"
  81. "td{vertical-align: top;}"
  82. ".h{display:none}"
  83. "button.D{background-color:#dc3630}"
  84. // invert
  85. "body.invert,body.invert a,body.invert h1 {background-color:#060606;color:#fff;}"
  86. "body.invert .msg{color:#fff;background-color:#282828;border-top:1px solid #555;border-right:1px solid #555;border-bottom:1px solid #555;}"
  87. "body.invert .q[role=img]{-webkit-filter:invert(1);filter:invert(1);}"
  88. "input:disabled {opacity: 0.5;}"
  89. "</style>";
  90. const char HTTP_HELP[] PROGMEM =
  91. "<br/><h3>Available Pages</h3><hr>"
  92. "<table class='table'>"
  93. "<thead><tr><th>Page</th><th>Function</th></tr></thead><tbody>"
  94. "<tr><td><a href='/'>/</a></td>"
  95. "<td>Menu page.</td></tr>"
  96. "<tr><td><a href='/wifi'>/wifi</a></td>"
  97. "<td>Show WiFi scan results and enter WiFi configuration.(/0wifi noscan)</td></tr>"
  98. "<tr><td><a href='/wifisave'>/wifisave</a></td>"
  99. "<td>Save WiFi configuration information and configure device. Needs variables supplied.</td></tr>"
  100. "<tr><td><a href='/param'>/param</a></td>"
  101. "<td>Parameter page</td></tr>"
  102. "<tr><td><a href='/info'>/info</a></td>"
  103. "<td>Information page</td></tr>"
  104. "<tr><td><a href='/close'>/close</a></td>"
  105. "<td>Close the captiveportal popup,configportal will remain active</td></tr>"
  106. "<tr><td><a href='/exit'>/exit</a></td>"
  107. "<td>Exit Config Portal, configportal will close</td></tr>"
  108. "<tr><td><a href='/restart'>/restart</a></td>"
  109. "<td>Reboot the device</td></tr>"
  110. "<tr><td><a href='/erase'>/erase</a></td>"
  111. "<td>Erase WiFi configuration and reboot Device. Device will not reconnect to a network until new WiFi configuration data is entered.</td></tr>"
  112. "</table>"
  113. "<p/>More information about WiFiManager at <a href='https://github.com/tzapu/WiFiManager'>https://github.com/tzapu/WiFiManager</a>.";
  114. #ifdef JSTEST
  115. const char HTTP_JS[] PROGMEM =
  116. "<script>function postAjax(url, data, success) {"
  117. " var params = typeof data == 'string' ? data : Object.keys(data).map("
  118. " function(k){ return encodeURIComponent(k) + '=' + encodeURIComponent(data[k]) }"
  119. " ).join('&');"
  120. " var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject(\"Microsoft.XMLHTTP\");"
  121. " xhr.open('POST', url);"
  122. " xhr.onreadystatechange = function() {"
  123. " if (xhr.readyState>3 && xhr.status==200) { success(xhr.responseText); }"
  124. " };"
  125. " xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');"
  126. " xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');"
  127. " xhr.send(params);"
  128. " return xhr;}"
  129. "postAjax('/status', 'p1=1&p2=Hello+World', function(data){ console.log(data); });"
  130. "postAjax('/status', { p1: 1, p2: 'Hello World' }, function(data){ console.log(data); });"
  131. "</script>";
  132. #endif
  133. // Info html
  134. #ifdef ESP32
  135. const char HTTP_INFO_esphead[] PROGMEM = "<h3>esp32</h3><hr><dl>";
  136. const char HTTP_INFO_chiprev[] PROGMEM = "<dt>Chip Rev</dt><dd>{1}</dd>";
  137. const char HTTP_INFO_lastreset[] PROGMEM = "<dt>Last reset reason</dt><dd>CPU0: {1}<br/>CPU1: {2}</dd>";
  138. const char HTTP_INFO_aphost[] PROGMEM = "<dt>Acccess Point Hostname</dt><dd>{1}</dd>";
  139. #else
  140. const char HTTP_INFO_esphead[] PROGMEM = "<h3>esp8266</h3><hr><dl>";
  141. const char HTTP_INFO_flashsize[] PROGMEM = "<dt>Real Flash Size</dt><dd>{1} bytes</dd>";
  142. const char HTTP_INFO_fchipid[] PROGMEM = "<dt>Flash Chip ID</dt><dd>{1}</dd>";
  143. const char HTTP_INFO_corever[] PROGMEM = "<dt>Core Version</dt><dd>{1}</dd>";
  144. const char HTTP_INFO_bootver[] PROGMEM = "<dt>Boot Version</dt><dd>{1}</dd>";
  145. const char HTTP_INFO_memsketch[] PROGMEM = "<dt>Memory - Sketch Size</dt><dd>Used / Total bytes<br/>{1} / {2}";
  146. const char HTTP_INFO_memsmeter[] PROGMEM = "<br/><progress value='{1}' max='{2}'></progress></dd>";
  147. const char HTTP_INFO_lastreset[] PROGMEM = "<dt>Last reset reason</dt><dd>{1}</dd>";
  148. #endif
  149. const char HTTP_INFO_freeheap[] PROGMEM = "<dt>Memory - Free Heap</dt><dd>{1} bytes available</dd>";
  150. const char HTTP_INFO_wifihead[] PROGMEM = "<br/><h3>WiFi</h3><hr>";
  151. const char HTTP_INFO_uptime[] PROGMEM = "<dt>Uptime</dt><dd>{1} Mins {2} Secs</dd>";
  152. const char HTTP_INFO_chipid[] PROGMEM = "<dt>Chip ID</dt><dd>{1}</dd>";
  153. const char HTTP_INFO_idesize[] PROGMEM = "<dt>Flash Size</dt><dd>{1} bytes</dd>";
  154. const char HTTP_INFO_sdkver[] PROGMEM = "<dt>SDK Version</dt><dd>{1}</dd>";
  155. const char HTTP_INFO_cpufreq[] PROGMEM = "<dt>CPU Frequency</dt><dd>{1}MHz</dd>";
  156. const char HTTP_INFO_apip[] PROGMEM = "<dt>Access Point IP</dt><dd>{1}</dd>";
  157. const char HTTP_INFO_apmac[] PROGMEM = "<dt>Access Point MAC</dt><dd>{1}</dd>";
  158. const char HTTP_INFO_apssid[] PROGMEM = "<dt>SSID</dt><dd>{1}</dd>";
  159. const char HTTP_INFO_apbssid[] PROGMEM = "<dt>BSSID</dt><dd>{1}</dd>";
  160. const char HTTP_INFO_staip[] PROGMEM = "<dt>Station IP</dt><dd>{1}</dd>";
  161. const char HTTP_INFO_stagw[] PROGMEM = "<dt>Station Gateway</dt><dd>{1}</dd>";
  162. const char HTTP_INFO_stasub[] PROGMEM = "<dt>Station Subnet</dt><dd>{1}</dd>";
  163. const char HTTP_INFO_dnss[] PROGMEM = "<dt>DNS Server</dt><dd>{1}</dd>";
  164. const char HTTP_INFO_host[] PROGMEM = "<dt>Hostname</dt><dd>{1}</dd>";
  165. const char HTTP_INFO_stamac[] PROGMEM = "<dt>Station MAC</dt><dd>{1}</dd>";
  166. const char HTTP_INFO_conx[] PROGMEM = "<dt>Connected</dt><dd>{1}</dd>";
  167. const char HTTP_INFO_autoconx[] PROGMEM = "<dt>Autoconnect</dt><dd>{1}</dd>";
  168. const char HTTP_INFO_temp[] PROGMEM = "<dt>Temperature</dt><dd>{1} C&deg; / {2} F&deg;</dd>";
  169. // Strings
  170. const char S_y[] PROGMEM = "Yes";
  171. const char S_n[] PROGMEM = "No";
  172. const char S_enable[] PROGMEM = "Enabled";
  173. const char S_disable[] PROGMEM = "Disabled";
  174. const char S_GET[] PROGMEM = "GET";
  175. const char S_POST[] PROGMEM = "POST";
  176. const char S_NA[] PROGMEM = "Unknown";
  177. const char S_passph[] PROGMEM = "********";
  178. const char S_titlewifisaved[] PROGMEM = "Credentials Saved";
  179. const char S_titlewifisettings[] PROGMEM = "Settings Saved";
  180. const char S_titlewifi[] PROGMEM = "Config ESP";
  181. const char S_titleinfo[] PROGMEM = "Info";
  182. const char S_titleparam[] PROGMEM = "Setup";
  183. const char S_titleparamsaved[] PROGMEM = "Setup Saved";
  184. const char S_titleexit[] PROGMEM = "Exit";
  185. const char S_titlereset[] PROGMEM = "Reset";
  186. const char S_titleerase[] PROGMEM = "Erase";
  187. const char S_titleclose[] PROGMEM = "Close";
  188. const char S_options[] PROGMEM = "options";
  189. const char S_nonetworks[] PROGMEM = "No networks found. Refresh to scan again.";
  190. const char S_staticip[] PROGMEM = "Static IP";
  191. const char S_staticgw[] PROGMEM = "Static Gateway";
  192. const char S_staticdns[] PROGMEM = "Static DNS";
  193. const char S_subnet[] PROGMEM = "Subnet";
  194. const char S_exiting[] PROGMEM = "Exiting";
  195. const char S_resetting[] PROGMEM = "Module will reset in a few seconds.";
  196. const char S_closing[] PROGMEM = "You can close the page, portal will continue to run";
  197. const char S_error[] PROGMEM = "An Error Occured";
  198. const char S_notfound[] PROGMEM = "File Not Found\n\n";
  199. const char S_uri[] PROGMEM = "URI: ";
  200. const char S_method[] PROGMEM = "\nMethod: ";
  201. const char S_args[] PROGMEM = "\nArguments: ";
  202. const char S_parampre[] PROGMEM = "param_";
  203. // debug strings
  204. const char D_HR[] PROGMEM = "--------------------";
  205. // END WIFI_MANAGER_OVERRIDE_STRINGS
  206. #endif
  207. // -----------------------------------------------------------------------------------------------
  208. // DO NOT EDIT BELOW THIS LINE
  209. const uint8_t _nummenutokens = 9;
  210. const char * const _menutokens[9] PROGMEM = {
  211. "wifi",
  212. "wifinoscan",
  213. "info",
  214. "param",
  215. "close",
  216. "restart",
  217. "exit",
  218. "erase",
  219. "sep"
  220. };
  221. const char R_root[] PROGMEM = "/";
  222. const char R_wifi[] PROGMEM = "/wifi";
  223. const char R_wifinoscan[] PROGMEM = "/0wifi";
  224. const char R_wifisave[] PROGMEM = "/wifisave";
  225. const char R_info[] PROGMEM = "/info";
  226. const char R_param[] PROGMEM = "/param";
  227. const char R_paramsave[] PROGMEM = "/paramsave";
  228. const char R_restart[] PROGMEM = "/restart";
  229. const char R_exit[] PROGMEM = "/exit";
  230. const char R_close[] PROGMEM = "/close";
  231. const char R_erase[] PROGMEM = "/erase";
  232. const char R_status[] PROGMEM = "/status";
  233. //Strings
  234. const char S_ip[] PROGMEM = "ip";
  235. const char S_gw[] PROGMEM = "gw";
  236. const char S_sn[] PROGMEM = "sn";
  237. const char S_dns[] PROGMEM = "dns";
  238. // softap ssid default prefix
  239. #ifdef ESP8266
  240. const char S_ssidpre[] PROGMEM = "ESP";
  241. #elif defined(ESP32)
  242. const char S_ssidpre[] PROGMEM = "ESP32";
  243. #else
  244. const char S_ssidpre[] PROGMEM = "WM";
  245. #endif
  246. //Tokens
  247. //@todo consolidate and reduce
  248. const char T_ss[] PROGMEM = "{"; // token start sentinel
  249. const char T_es[] PROGMEM = "}"; // token end sentinel
  250. const char T_1[] PROGMEM = "{1}"; // @token 1
  251. const char T_2[] PROGMEM = "{2}"; // @token 2
  252. const char T_v[] PROGMEM = "{v}"; // @token v
  253. const char T_I[] PROGMEM = "{I}"; // @token I
  254. const char T_i[] PROGMEM = "{i}"; // @token i
  255. const char T_n[] PROGMEM = "{n}"; // @token n
  256. const char T_p[] PROGMEM = "{p}"; // @token p
  257. const char T_t[] PROGMEM = "{t}"; // @token t
  258. const char T_l[] PROGMEM = "{l}"; // @token l
  259. const char T_c[] PROGMEM = "{c}"; // @token c
  260. const char T_e[] PROGMEM = "{e}"; // @token e
  261. const char T_q[] PROGMEM = "{q}"; // @token q
  262. const char T_r[] PROGMEM = "{r}"; // @token r
  263. const char T_R[] PROGMEM = "{R}"; // @token R
  264. const char T_h[] PROGMEM = "{h}"; // @token h
  265. // http
  266. const char HTTP_HEAD_CL[] PROGMEM = "Content-Length";
  267. const char HTTP_HEAD_CT[] PROGMEM = "text/html";
  268. const char HTTP_HEAD_CT2[] PROGMEM = "text/plain";
  269. const char HTTP_HEAD_CORS[] PROGMEM = "Access-Control-Allow-Origin";
  270. const char HTTP_HEAD_CORS_ALLOW_ALL[] PROGMEM = "*";
  271. const char * const WIFI_STA_STATUS[] PROGMEM
  272. {
  273. "WL_IDLE_STATUS", // 0 STATION_IDLE
  274. "WL_NO_SSID_AVAIL", // 1 STATION_NO_AP_FOUND
  275. "WL_SCAN_COMPLETED", // 2
  276. "WL_CONNECTED", // 3 STATION_GOT_IP
  277. "WL_CONNECT_FAILED", // 4 STATION_CONNECT_FAIL, STATION_WRONG_PASSWORD(NI)
  278. "WL_CONNECTION_LOST", // 5
  279. "WL_DISCONNECTED", // 6
  280. "WL_STATION_WRONG_PASSWORD" // 7 KLUDGE
  281. };
  282. #ifdef ESP32
  283. const char * const AUTH_MODE_NAMES[] PROGMEM
  284. {
  285. "OPEN",
  286. "WEP",
  287. "WPA_PSK",
  288. "WPA2_PSK",
  289. "WPA_WPA2_PSK",
  290. "WPA2_ENTERPRISE",
  291. "MAX"
  292. };
  293. #elif defined(ESP8266)
  294. const char * const AUTH_MODE_NAMES[] PROGMEM
  295. {
  296. "",
  297. "",
  298. "WPA_PSK", // 2 ENC_TYPE_TKIP
  299. "",
  300. "WPA2_PSK", // 4 ENC_TYPE_CCMP
  301. "WEP", // 5 ENC_TYPE_WEP
  302. "",
  303. "OPEN", //7 ENC_TYPE_NONE
  304. "WPA_WPA2_PSK", // 8 ENC_TYPE_AUTO
  305. };
  306. #endif
  307. const char* const WIFI_MODES[] PROGMEM = { "NULL", "STA", "AP", "STA+AP" };
  308. #ifdef ESP32
  309. // as 2.5.2
  310. // typedef struct {
  311. // char cc[3]; /**< country code string */
  312. // uint8_t schan; /**< start channel */
  313. // uint8_t nchan; /**< total channel number */
  314. // int8_t max_tx_power; /**< This field is used for getting WiFi maximum transmitting power, call esp_wifi_set_max_tx_power to set the maximum transmitting power. */
  315. // wifi_country_policy_t policy; /**< country policy */
  316. // } wifi_country_t;
  317. const wifi_country_t WM_COUNTRY_US{"US",1,11,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
  318. const wifi_country_t WM_COUNTRY_CN{"CN",1,13,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
  319. const wifi_country_t WM_COUNTRY_JP{"JP",1,14,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
  320. #elif defined(ESP8266)
  321. // typedef struct {
  322. // char cc[3]; /**< country code string */
  323. // uint8_t schan; /**< start channel */
  324. // uint8_t nchan; /**< total channel number */
  325. // uint8_t policy; /**< country policy */
  326. // } wifi_country_t;
  327. const wifi_country_t WM_COUNTRY_US{"US",1,11,WIFI_COUNTRY_POLICY_AUTO};
  328. const wifi_country_t WM_COUNTRY_CN{"CN",1,13,WIFI_COUNTRY_POLICY_AUTO};
  329. const wifi_country_t WM_COUNTRY_JP{"JP",1,14,WIFI_COUNTRY_POLICY_AUTO};
  330. #endif
  331. #endif