Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4848

SDK • Re: Cannot connect to WiFi every second time

$
0
0
cyw43_arch_wifi_connect_async doesn't wait to connect so you won't get an error. I think this is caused by pulling the plug on the device. Your router thinks you're still connected perhaps?

Does it behave better if you allow it to disconnect from wifi?

Code:

    printf("Exiting in 5s\n");    absolute_time_t timeout = make_timeout_time_ms(5000);    while (absolute_time_diff_us(get_absolute_time(), timeout) > 0) {        printf("Hello, world!\n");        sleep_ms(1000);    }    printf("Disconnecting\n");    cyw43_arch_disable_sta_mode();

Statistics: Posted by peterharperuk — Wed Nov 06, 2024 5:31 pm



Viewing all articles
Browse latest Browse all 4848

Trending Articles