File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
ports/raspberrypi/common-hal/wifi Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,10 @@ mp_obj_t common_hal_wifi_radio_get_hostname(wifi_radio_obj_t *self) {
81
81
}
82
82
83
83
void common_hal_wifi_radio_set_hostname (wifi_radio_obj_t * self , const char * hostname ) {
84
- ro_attribute (MP_QSTR_hostname );
84
+ self -> hostname = mp_obj_new_str (hostname , strlen (hostname ));
85
+ hostname = mp_obj_str_get_str (self -> hostname );
86
+ netif_set_hostname (NETIF_STA , hostname );
87
+ netif_set_hostname (NETIF_AP , hostname );
85
88
}
86
89
87
90
mp_obj_t common_hal_wifi_radio_get_mac_address (wifi_radio_obj_t * self ) {
Original file line number Diff line number Diff line change 33
33
34
34
typedef struct {
35
35
mp_obj_base_t base ;
36
+ mp_obj_t hostname ;
36
37
wifi_scannednetworks_obj_t * current_scan ;
37
38
} wifi_radio_obj_t ;
38
39
You can’t perform that action at this time.
0 commit comments