@@ -203,6 +203,38 @@ STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_m
203
203
}
204
204
STATIC MP_DEFINE_CONST_FUN_OBJ_KW (wifi_radio_connect_obj , 1 , wifi_radio_connect );
205
205
206
+ //| ipv4_gateway: Optional[ipaddress.IPv4Address]
207
+ //| """IP v4 Address of the gateway when connected to an access point. None otherwise."""
208
+ //|
209
+ STATIC mp_obj_t wifi_radio_get_ipv4_gateway (mp_obj_t self ) {
210
+ return common_hal_wifi_radio_get_ipv4_gateway (self );
211
+
212
+ }
213
+ MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ipv4_gateway_obj , wifi_radio_get_ipv4_gateway );
214
+
215
+ const mp_obj_property_t wifi_radio_ipv4_gateway_obj = {
216
+ .base .type = & mp_type_property ,
217
+ .proxy = { (mp_obj_t )& wifi_radio_get_ipv4_gateway_obj ,
218
+ (mp_obj_t )& mp_const_none_obj ,
219
+ (mp_obj_t )& mp_const_none_obj },
220
+ };
221
+
222
+ //| ipv4_subnet: Optional[ipaddress.IPv4Address]
223
+ //| """IP v4 Address of the subnet when connected to an access point. None otherwise."""
224
+ //|
225
+ STATIC mp_obj_t wifi_radio_get_ipv4_subnet (mp_obj_t self ) {
226
+ return common_hal_wifi_radio_get_ipv4_subnet (self );
227
+
228
+ }
229
+ MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ipv4_subnet_obj , wifi_radio_get_ipv4_subnet );
230
+
231
+ const mp_obj_property_t wifi_radio_ipv4_subnet_obj = {
232
+ .base .type = & mp_type_property ,
233
+ .proxy = { (mp_obj_t )& wifi_radio_get_ipv4_subnet_obj ,
234
+ (mp_obj_t )& mp_const_none_obj ,
235
+ (mp_obj_t )& mp_const_none_obj },
236
+ };
237
+
206
238
//| ipv4_address: Optional[ipaddress.IPv4Address]
207
239
//| """IP v4 Address of the radio when connected to an access point. None otherwise."""
208
240
//|
@@ -219,6 +251,38 @@ const mp_obj_property_t wifi_radio_ipv4_address_obj = {
219
251
(mp_obj_t )& mp_const_none_obj },
220
252
};
221
253
254
+ //| ipv4_dns: Optional[ipaddress.IPv4Address]
255
+ //| """IP v4 Address of the DNS server in use when connected to an access point. None otherwise."""
256
+ //|
257
+ STATIC mp_obj_t wifi_radio_get_ipv4_dns (mp_obj_t self ) {
258
+ return common_hal_wifi_radio_get_ipv4_dns (self );
259
+
260
+ }
261
+ MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ipv4_dns_obj , wifi_radio_get_ipv4_dns );
262
+
263
+ const mp_obj_property_t wifi_radio_ipv4_dns_obj = {
264
+ .base .type = & mp_type_property ,
265
+ .proxy = { (mp_obj_t )& wifi_radio_get_ipv4_dns_obj ,
266
+ (mp_obj_t )& mp_const_none_obj ,
267
+ (mp_obj_t )& mp_const_none_obj },
268
+ };
269
+
270
+ //| ap_info: Optional[Network]
271
+ //| """Network object containing BSSID, SSID, channel, and RSSI when connected to an access point. None otherwise."""
272
+ //|
273
+ STATIC mp_obj_t wifi_radio_get_ap_info (mp_obj_t self ) {
274
+ return common_hal_wifi_radio_get_ap_info (self );
275
+
276
+ }
277
+ MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ap_info_obj , wifi_radio_get_ap_info );
278
+
279
+ const mp_obj_property_t wifi_radio_ap_info_obj = {
280
+ .base .type = & mp_type_property ,
281
+ .proxy = { (mp_obj_t )& wifi_radio_get_ap_info_obj ,
282
+ (mp_obj_t )& mp_const_none_obj ,
283
+ (mp_obj_t )& mp_const_none_obj },
284
+ };
285
+
222
286
//| def ping(self, ip, *, timeout: float = 0.5) -> float:
223
287
//| """Ping an IP to test connectivity. Returns echo time in seconds.
224
288
//| Returns None when it times out."""
@@ -261,6 +325,10 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = {
261
325
{ MP_ROM_QSTR (MP_QSTR_connect ), MP_ROM_PTR (& wifi_radio_connect_obj ) },
262
326
// { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) },
263
327
328
+ { MP_ROM_QSTR (MP_QSTR_ap_info ), MP_ROM_PTR (& wifi_radio_ap_info_obj ) },
329
+ { MP_ROM_QSTR (MP_QSTR_ipv4_dns ), MP_ROM_PTR (& wifi_radio_ipv4_dns_obj ) },
330
+ { MP_ROM_QSTR (MP_QSTR_ipv4_gateway ), MP_ROM_PTR (& wifi_radio_ipv4_gateway_obj ) },
331
+ { MP_ROM_QSTR (MP_QSTR_ipv4_subnet ), MP_ROM_PTR (& wifi_radio_ipv4_subnet_obj ) },
264
332
{ MP_ROM_QSTR (MP_QSTR_ipv4_address ), MP_ROM_PTR (& wifi_radio_ipv4_address_obj ) },
265
333
266
334
// { MP_ROM_QSTR(MP_QSTR_access_point_active), MP_ROM_PTR(&wifi_radio_access_point_active_obj) },
0 commit comments