@@ -124,7 +124,7 @@ typedef struct _wlan_obj_t {
124124
125125#define MODWLAN_TIMEOUT_MS 5000
126126#define MODWLAN_MAX_NETWORKS 20
127- #define MODWLAN_SCAN_PERIOD_S 300 // 5 minutes
127+ #define MODWLAN_SCAN_PERIOD_S 3600 // 1 hour
128128#define MODWLAN_WAIT_FOR_SCAN_MS 1050
129129
130130#define ASSERT_ON_ERROR ( x ) ASSERT((x) >= 0 )
@@ -850,6 +850,7 @@ STATIC mp_obj_t wlan_ifconfig (mp_obj_t self_in) {
850850}
851851STATIC MP_DEFINE_CONST_FUN_OBJ_1 (wlan_ifconfig_obj , wlan_ifconfig );
852852
853+ #if MICROPY_PORT_WLAN_URN
853854STATIC mp_obj_t wlan_urn (uint n_args , const mp_obj_t * args ) {
854855 char urn [MAX_DEVICE_URN_LEN ];
855856 uint8_t len = MAX_DEVICE_URN_LEN ;
@@ -880,6 +881,7 @@ STATIC mp_obj_t wlan_urn (uint n_args, const mp_obj_t *args) {
880881 return mp_const_none ;
881882}
882883STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (wlan_urn_obj , 1 , 2 , wlan_urn );
884+ #endif
883885
884886/// \method wlan_netlist()
885887/// Return a list of tuples with all the acces points within range
@@ -1037,7 +1039,9 @@ STATIC const mp_map_elem_t wlan_locals_dict_table[] = {
10371039 { MP_OBJ_NEW_QSTR (MP_QSTR_disconnect ), (mp_obj_t )& wlan_disconnect_obj },
10381040 { MP_OBJ_NEW_QSTR (MP_QSTR_isconnected ), (mp_obj_t )& wlan_isconnected_obj },
10391041 { MP_OBJ_NEW_QSTR (MP_QSTR_ifconfig ), (mp_obj_t )& wlan_ifconfig_obj },
1042+ #if MICROPY_PORT_WLAN_URN
10401043 { MP_OBJ_NEW_QSTR (MP_QSTR_urn ), (mp_obj_t )& wlan_urn_obj },
1044+ #endif
10411045 { MP_OBJ_NEW_QSTR (MP_QSTR_callback ), (mp_obj_t )& wlan_callback_obj },
10421046 { MP_OBJ_NEW_QSTR (MP_QSTR_config_ip ), (mp_obj_t )& wlan_config_ip_obj },
10431047
0 commit comments