change hostname
This commit is contained in:
parent
01a722bef8
commit
65d26b5e3d
1 changed files with 5 additions and 1 deletions
|
@ -14,6 +14,8 @@ int wifi_setup(uint32_t country, const string &ssid, const string &pw) {
|
|||
|
||||
cyw43_arch_enable_sta_mode();
|
||||
|
||||
netif_set_hostname(netif_default, "AbfallPicoW");
|
||||
|
||||
if (cyw43_arch_wifi_connect_async(ssid.c_str(), pw.c_str(), CYW43_AUTH_WPA2_MIXED_PSK)) {
|
||||
return 2;
|
||||
}
|
||||
|
@ -39,9 +41,11 @@ int wifi_setup(uint32_t country, const string &ssid, const string &pw) {
|
|||
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 0);
|
||||
} else {
|
||||
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1);
|
||||
|
||||
printf("IP: %s\n", ip4addr_ntoa(netif_ip_addr4(netif_default)));
|
||||
}
|
||||
|
||||
return 0;
|
||||
return status;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
|
Loading…
Reference in a new issue