@@ -163,6 +163,47 @@ STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_m
163
163
}
164
164
STATIC MP_DEFINE_CONST_FUN_OBJ_KW (wifi_radio_connect_obj , 1 , wifi_radio_connect );
165
165
166
+ //| ap_rssi: int
167
+ //| """RSSI of the currently connected AP. Returns none if not connected"""
168
+ //|
169
+ STATIC mp_obj_t wifi_radio_get_ap_rssi (mp_obj_t self ) {
170
+ return common_hal_wifi_radio_get_ap_rssi (self );
171
+
172
+ }
173
+ MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ap_rssi_obj , wifi_radio_get_ap_rssi );
174
+
175
+ //| ipv4_gateway: Optional[ipaddress.IPv4Address]
176
+ //| """IP v4 Address of the gateway when connected to an access point. None otherwise."""
177
+ //|
178
+ STATIC mp_obj_t wifi_radio_get_ipv4_gateway (mp_obj_t self ) {
179
+ return common_hal_wifi_radio_get_ipv4_gateway (self );
180
+
181
+ }
182
+ MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ipv4_gateway_obj , wifi_radio_get_ipv4_gateway );
183
+
184
+ const mp_obj_property_t wifi_radio_ipv4_gateway_obj = {
185
+ .base .type = & mp_type_property ,
186
+ .proxy = { (mp_obj_t )& wifi_radio_get_ipv4_gateway_obj ,
187
+ (mp_obj_t )& mp_const_none_obj ,
188
+ (mp_obj_t )& mp_const_none_obj },
189
+ };
190
+
191
+ //| ipv4_subnet: Optional[ipaddress.IPv4Address]
192
+ //| """IP v4 Address of the subnet when connected to an access point. None otherwise."""
193
+ //|
194
+ STATIC mp_obj_t wifi_radio_get_ipv4_subnet (mp_obj_t self ) {
195
+ return common_hal_wifi_radio_get_ipv4_subnet (self );
196
+
197
+ }
198
+ MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ipv4_subnet_obj , wifi_radio_get_ipv4_subnet );
199
+
200
+ const mp_obj_property_t wifi_radio_ipv4_subnet_obj = {
201
+ .base .type = & mp_type_property ,
202
+ .proxy = { (mp_obj_t )& wifi_radio_get_ipv4_subnet_obj ,
203
+ (mp_obj_t )& mp_const_none_obj ,
204
+ (mp_obj_t )& mp_const_none_obj },
205
+ };
206
+
166
207
//| ipv4_address: Optional[ipaddress.IPv4Address]
167
208
//| """IP v4 Address of the radio when connected to an access point. None otherwise."""
168
209
//|
@@ -219,6 +260,9 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = {
219
260
{ MP_ROM_QSTR (MP_QSTR_connect ), MP_ROM_PTR (& wifi_radio_connect_obj ) },
220
261
// { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) },
221
262
263
+ { MP_ROM_QSTR (MP_QSTR_ap_rssi ), MP_ROM_PTR (& wifi_radio_get_ap_rssi_obj ) },
264
+ { MP_ROM_QSTR (MP_QSTR_ipv4_gateway ), MP_ROM_PTR (& wifi_radio_ipv4_gateway_obj ) },
265
+ { MP_ROM_QSTR (MP_QSTR_ipv4_subnet ), MP_ROM_PTR (& wifi_radio_ipv4_subnet_obj ) },
222
266
{ MP_ROM_QSTR (MP_QSTR_ipv4_address ), MP_ROM_PTR (& wifi_radio_ipv4_address_obj ) },
223
267
224
268
// { MP_ROM_QSTR(MP_QSTR_access_point_active), MP_ROM_PTR(&wifi_radio_access_point_active_obj) },
0 commit comments