1 #include "wifi_common_hal.h"
2 #include "wifi_client_hal.h"
18 static void wifi_assert(
int wifi_status,
const char *format, ...)
19 __attribute__((format(printf, 2, 3)));
21 #define NWLAN_IFACES 2
23 static char *wlan_iface_list[NWLAN_IFACES] = {
31 uint32_t bss_count = 0;
38 strcpy(conf.wlan_Interface, wlan_iface_list[iface_idx++]);
39 if (iface_idx == NWLAN_IFACES)
42 wifi_status = wifi_initWithConfig(&conf);
43 wifi_assert(wifi_status,
"wifi_initWithSettings:%s", conf.wlan_Interface);
46 wifi_assert(wifi_status,
"wifi_getNeighboringWiFiDiagnosticResult");
48 wifi_neightListFree(bss_list);
50 wifi_assert(wifi_status,
"wifi_uninit");
58 void wifi_assert(
int wifi_status,
const char *format, ...)
60 if (wifi_status != 0) {
62 va_start(arg_list, format);
63 vfprintf(stderr, format, arg_list);
65 fprintf(stderr,
"\twifi_status:%d\n", wifi_status);