求助:tkl_wifi_scan_ap获取周围ap的ssid为空!

Wi-Fi 设备、Wi-Fi 低功耗设备、Wi-Fi BLE 双模设备、Ethernet设备、Ethernet+Wi-Fi设备等
Post Reply
13825141849
Posts: 15

AP_IF_S ap_ary[10] = {0};
int num = 0;
tkl_wifi_init(NULL);
tkl_wifi_set_work_mode(WWM_STATION);
tkl_wifi_scan_ap(NULL,&ap_ary,&num);
printf("=================================\r\n");
if(num>0)
{
for(int i=0;i<num;i++)
{
printf("ap_ar[%d]=%s\r\n",i,ap_ary.ssid);
char ssid[100] = {0};
strncpy(ssid,ap_ary.ssid,ap_ary.s_len);
printf("ssid=%s\r\n",ssid);
}
}

E52F3BF5-8C86-40e5-907D-B78E95A553F6.png
Post Reply