diff --git a/src/abfall.cpp b/src/abfall.cpp index 49509a2..0511394 100644 --- a/src/abfall.cpp +++ b/src/abfall.cpp @@ -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() {