Browse Source

esp8266/modnetwork: .config(): Add "hidden ESSID" param.

pull/1999/head
Paul Sokolovsky 9 years ago
parent
commit
4fa1731b6e
  1. 9
      esp8266/modnetwork.c

9
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);

Loading…
Cancel
Save