@@ -459,17 +459,25 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_address_ap_obj, wifi_radio_get_ipv
459
459
MP_PROPERTY_GETTER (wifi_radio_ipv4_address_ap_obj ,
460
460
(mp_obj_t )& wifi_radio_get_ipv4_address_ap_obj );
461
461
462
- //| ipv4_dns: Optional[ ipaddress.IPv4Address]
463
- //| """IP v4 Address of the DNS server in use when connected to an access point. None otherwise ."""
462
+ //| ipv4_dns: ipaddress.IPv4Address
463
+ //| """IP v4 Address of the DNS server to be used ."""
464
464
//|
465
465
STATIC mp_obj_t wifi_radio_get_ipv4_dns (mp_obj_t self ) {
466
466
return common_hal_wifi_radio_get_ipv4_dns (self );
467
467
468
468
}
469
469
MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ipv4_dns_obj , wifi_radio_get_ipv4_dns );
470
470
471
- MP_PROPERTY_GETTER (wifi_radio_ipv4_dns_obj ,
472
- (mp_obj_t )& wifi_radio_get_ipv4_dns_obj );
471
+ STATIC mp_obj_t wifi_radio_set_ipv4_dns (mp_obj_t self , mp_obj_t ipv4_dns_addr ) {
472
+ common_hal_wifi_radio_set_ipv4_dns (self , ipv4_dns_addr );
473
+
474
+ return mp_const_none ;
475
+ }
476
+ MP_DEFINE_CONST_FUN_OBJ_2 (wifi_radio_set_ipv4_dns_obj , wifi_radio_set_ipv4_dns );
477
+
478
+ MP_PROPERTY_GETSET (wifi_radio_ipv4_dns_obj ,
479
+ (mp_obj_t )& wifi_radio_get_ipv4_dns_obj ,
480
+ (mp_obj_t )& wifi_radio_set_ipv4_dns_obj );
473
481
474
482
//| ap_info: Optional[Network]
475
483
//| """Network object containing BSSID, SSID, authmode, channel, country and RSSI when connected to an access point. None otherwise."""
@@ -480,7 +488,7 @@ STATIC mp_obj_t wifi_radio_get_ap_info(mp_obj_t self) {
480
488
}
481
489
MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_get_ap_info_obj , wifi_radio_get_ap_info );
482
490
483
- //| def wifi_radio_start_dhcp_client (self) -> None:
491
+ //| def start_dhcp (self) -> None:
484
492
//| """Starts the DHCP client."""
485
493
//| ...
486
494
//|
@@ -490,7 +498,7 @@ STATIC mp_obj_t wifi_radio_start_dhcp_client(mp_obj_t self) {
490
498
}
491
499
MP_DEFINE_CONST_FUN_OBJ_1 (wifi_radio_start_dhcp_client_obj , wifi_radio_start_dhcp_client );
492
500
493
- //| def wifi_radio_stop_dhcp_client (self) -> None:
501
+ //| def stop_dhcp (self) -> None:
494
502
//| """Stops the DHCP client. Needed to assign a static IP address."""
495
503
//| ...
496
504
//|
0 commit comments