From 4fa1731b6ecbb15fb1730b4811d84f06563efa3b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 21 Apr 2016 00:42:45 +0300 Subject: [PATCH] esp8266/modnetwork: .config(): Add "hidden ESSID" param. --- esp8266/modnetwork.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/esp8266/modnetwork.c b/esp8266/modnetwork.c index d87676d783..f80575767d 100644 --- a/esp8266/modnetwork.c +++ b/esp8266/modnetwork.c @@ -259,6 +259,11 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs cfg.ap.ssid_len = len; break; } + case QS(MP_QSTR_hidden): { + req_if = SOFTAP_IF; + cfg.ap.ssid_hidden = mp_obj_is_true(kwargs->table[i].value); + break; + } case QS(MP_QSTR_authmode): { req_if = SOFTAP_IF; cfg.ap.authmode = mp_obj_get_int(kwargs->table[i].value); @@ -314,6 +319,10 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs req_if = SOFTAP_IF; val = mp_obj_new_str((char*)cfg.ap.ssid, cfg.ap.ssid_len, false); break; + case QS(MP_QSTR_hidden): + req_if = SOFTAP_IF; + val = mp_obj_new_bool(cfg.ap.ssid_hidden); + break; case QS(MP_QSTR_authmode): req_if = SOFTAP_IF; val = MP_OBJ_NEW_SMALL_INT(cfg.ap.authmode);