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

SDK • cyw43_ev_scan_result_t' does not name a type

$
0
0
Hi,
I am already using cyw43 and wifi for a while, but I wanted to implement scan feature, and seems I'm hitting the wall so far.
What am I missing in order to get this code compiled ?

Code:

void scan_wifi_networks(void){    printf("Starting Wi-Fi scan...\n");    cyw43_wifi_scan_options_t scan_options = {0};    int err = cyw43_wifi_scan(&cyw43_state, &scan_options, NULL, scan_result);    if (err == 0)    {        while (cyw43_wifi_scan_active(&cyw43_state))        {            tight_loop_contents(); // Wait for scan to complete        }        printf("Scan complete.\n");    }    else    {        printf("Failed to start scan: %d\n", err);    }}// Callback function to process each scan resultstatic int scan_result(void *env, const cyw43_ev_scan_result_t *result){    if (result)    {        printf("SSID: %-32s RSSI: %4d Channel: %3d MAC: %02x:%02x:%02x:%02x:%02x:%02x Security: %u\n",               result->ssid, result->rssi, result->channel,               result->bssid[0], result->bssid[1], result->bssid[2],               result->bssid[3], result->bssid[4], result->bssid[5],               result->auth_mode);    }    return 0;}
It complains because of missing definition of cyw43_ev_scan_result_t structure. But from what I have searched through the pico-sdk it is not a public header, where it's defined. Any idea ? Thanks.

Statistics: Posted by marekdor — Thu Apr 03, 2025 7:15 pm



Viewing all articles
Browse latest Browse all 7512

Trending Articles