This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with wlan_ioctl_get_scan_results()

Hi,

Before, with an old firmware verison (default version in Tiwy-SL450-0067 Rev2), even with porting errors, this function returned the networks I was, but since the update the firmware does not give me the networks.

The function returns "0" and the in the ucResults buffer i have [0x00, 0x00, 0x00, 0x00, 0x02, 0x00, ...0x00]

With the old Firmware the function returns "0" and inthe buffers I have -> Number of Networks=0x03 Status -> 0x01  and the 42 bytes: Result entry,

Best Regards,

  • Hi Sergio,

    Did you trigger the scan to start? What is the scan interval you had set?

    You can set the scan parameters by using wlan_ioctl_set_scan_params().

    The first parameter set the scan interval (minimum 1 sec interval) and triggers the scan.

    If there is no scan in the background, the scan results will return as 0.

    Try to trigger a scan and then get the scan results.

    Yael

  • Hi,

    With this code works but not well:

    ret = wlan_ioctl_set_scan_params(1, 20, 30, 2, 0x7FF, -100, 0, 205, NULL);
    ret = wlan_ioctl_get_scan_results(0, debug_buffer);

    The data of the buffer is:

    5 --- 4 Bytes: number of networks found
    1 --- 4 Bytes: The status of the scan: 0 - agged results, 1 - results valid, 2 - no results

    56 bytes: Result entry, where the bytes are arranged as follows:

           1 --- 1 bit isValid - is result valid or not
    1010011  --- 7 bits rssi - RSSI value;
          01  ---2 bits: securityMode - security mode of the AP: 0 - Open, 1 - WEP, 2 WPA, 3 WPA2
    001010      --- 6 bits: SSID name length
    27      --- 2 bytes: the time at which the entry has entered into scans result table
    "SSIDName"32 bytes: SSID name
    "BSSID        "6 bytes: BSSID

    0x00

    ....

    0x00

    ¿Where is the others networks?

    It´s something wrong

    Best Regards,

  • Hi Sergio,

    Setting the scan params with 1 as the first parameter will trigger a scan once in a minute (look at API comments) as this is the default scan interval.

    There could be a case where not all the networks were found in the first scan.

    I suggest setting this value to 1000 (one second interval) and try to receive the results more than once, the list should be stable after 2-3 scans.

    Yael

  • Hi,

    I thought that doing the scan the function returns the list of all networks, but from what I've found I have to iterate the command and in each iteration gives one of the networks

    Best Regards,

  • Hi Sergio,

    Yes, this is the case with this API.

    The first time you call this API you receive the total number of network found (and the first network in the list).

    Then you will know how many times you should call this API again to receive all the networks that were found in the scan.

    Yael

  • Hi Yael Oz,

    I recently read a lot of thread about people who TOAST the CC3000 EEPROM after 120k R/W....

    Is this only happen to Write or Read? Is scanning API will affect the life of CC3000 EEPROM?

    Is it possible to modify the  CC3000 module by replacing it with FRAM? 

    Or flush the EEPROM content to bigger MSP430 NV memory?