ESP8266 Developer Zone The Official ESP8266 Forum 2015-11-13T18:11:13+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=697 2015-11-13T18:11:13+08:00 2015-11-13T18:11:13+08:00 https://bbs.espressif.com:443/viewtopic.php?t=697&p=4565#p4565 <![CDATA[Re: Invalid first entry in list of bss_info structures]]>

Code:

   
    scaninfo pscaninfo;   
    pscaninfo.pbss = arg;

    if (( arg != NULL ) && ( status == OK ))
    {
   bss = STAILQ_FIRST( pscaninfo.pbss );
   while ( bss != NULL )
   {
       os_printf ( "Station MAC: " MACSTR ", ssid: %.32s, channel: %d, rssi: %d\n", MAC2STR(bss->bssid),
         bss->ssid,
         bss->channel,
         bss->rssi );

       // get nexts
       bss = STAILQ_NEXT( bss, next );
    }
    else
    {
   // empty the list
   os_printf ( "Failed to scan\n" );
    }

Statistics: Posted by geo.espressif — Fri Nov 13, 2015 6:11 pm


]]>
2015-07-08T09:55:15+08:00 2015-07-08T09:55:15+08:00 https://bbs.espressif.com:443/viewtopic.php?t=697&p=2560#p2560 <![CDATA[Re: Invalid first entry in list of bss_info structures]]> u can get more detail from user_webserver.c in the SDK example.

Code:

wifi_station_scan(NULL, json_scan_cb);
LOCAL void ICACHE_FLASH_ATTR json_scan_cb(void *arg, STATUS status)
{
    pscaninfo->pbss = arg;
....
}

struct bss_info *bss = NULL;
bss = STAILQ_FIRST(pscaninfo->pbss);

Statistics: Posted by doswork — Wed Jul 08, 2015 9:55 am


]]>
2015-07-07T03:30:17+08:00 2015-07-07T03:30:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=697&p=2524#p2524 <![CDATA[Invalid first entry in list of bss_info structures]]> viewtopic.php?f=21&t=229 we are told that the first entry returned in the call to wifi_station_scan is invalid and should be skipped. Is this considered a bug? If not, why are we being returned an invalid structure just to skip over it?

Statistics: Posted by kolban — Tue Jul 07, 2015 3:30 am


]]>