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.

OMAP3530/WL1271 Wake from Suspend & Quickly Detect WLAN Presence

In Linux, I need to periodically wake from suspend, check to see if a desired network is available, and either continue the wake up sequence if it is there, or suspend again if it is not present.  I'm looking for guidance on how to best choose whether or not to suspend again.

I currently have the WLAN drivers loaded, go to suspend, and wake on a timer.  It then detects the desired network and associates with it as shown on the console debug log within about 270ms.  However there are two problems with this.  1.  It's information just printed to the console, and not so easy to access for control flow decisions.  2.  There isn't anything clearly printed when we fail to detect the desired network.

Is there a good way from within a program to quickly query whether the channel scanning process failed to find the desired network, so I can return to the suspend state?

Thanks in advance,

Chris

  • Hi Chris,

    all the event that are sent to the user space are defined on

    enum
    {
        IPC_EVENT_ASSOCIATED = 0,
        IPC_EVENT_DISASSOCIATED,
        IPC_EVENT_LINK_SPEED,
        IPC_EVENT_AUTH_SUCC,
        IPC_EVENT_SCAN_REPORT,
        IPC_EVENT_SCAN_COMPLETE,
        IPC_EVENT_SCAN_STOPPED,
        IPC_EVENT_CCKM_START,
        IPC_EVENT_MEDIA_SPECIFIC,
        IPC_EVENT_MAX_OS_EVENT = IPC_EVENT_MEDIA_SPECIFIC,
        IPC_EVENT_EAPOL,
        IPC_EVENT_BOUND,
        IPC_EVENT_UNBOUND,
        IPC_EVENT_PREAUTH_EAPOL,
        IPC_EVENT_RESERVED2,
        IPC_EVENT_LOW_RSSI,
        IPC_EVENT_TSPEC_STATUS,
        IPC_EVENT_TSPEC_RATE_STATUS,
        IPC_EVENT_MEDIUM_TIME_CROSS,
        IPC_EVENT_ROAMING_COMPLETE,
        IPC_EVENT_EAP_AUTH_FAILURE,
        IPC_EVENT_WPA2_PREAUTHENTICATION,
        IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED,
        IPC_EVENT_SCAN_FAILED,
        IPC_EVENT_WPS_SESSION_OVERLAP,
        IPC_EVENT_RSSI_SNR_TRIGGER,
        IPC_EVENT_RSSI_SNR_TRIGGER_0,
        IPC_EVENT_LOGGER,
        IPC_EVENT_NOT_ASSOCIATED,
        IPC_EVENT_BSS_LOSS,
        IPC_EVENT_REASSOCIATION_RESP,
        IPC_EVENT_IMMEDIATE_SCAN_REPORT,
        IPC_EVENT_CONTINUOUS_SCAN_REPORT,
        IPC_EVENT_RSSI_SNR_TRIGGER_1,
        IPC_EVENT_AP_DISCONNECT,
        IPC_EVENT_TX_RETRY_FALIURE,
        IPC_EVENT_RE_AUTH_STARTED,
        IPC_EVENT_RE_AUTH_COMPLETED,
        IPC_EVENT_RE_AUTH_TERMINATED,
        IPC_EVENT_TIMEOUT,
        IPC_EVENT_GWSI,
        IPC_EVENT_MAX
    };

    So you can use IPC_EVENT_ASSOCIATED to verify that you were connected after suspend, however i don’t see that there is an event for Connection failure. By code review I think you can enter that kind of event in function mlmeWait_to_WaitDisconnect() but it is only from code review, it was never tested by us

    Regards,

    Eyal

  • Thanks very much, Eyal, for your insight and suggestions.  I think the best approach may be to run a scan at wakeup and get an event that the scan is complete, after which a request can be made for the SSID or BSSID of discovered networks.  I have a few questions to arrive at a complete solution...

    1. Do you thing my approach is sound?  (i.e requesting an event notification indicating scan complete, running a scan on wakeup, upon the completion of which I can query whether a desired SSID or BSSID was found.)
    2. Using wlan_cu, is it possible to configure the driver to do a scan automatically upon waking up from suspend (i.e. without any wlan_cu commands issued after wakeup)?  If so, how?  It looks like there are several types of scans: application, periodic, wext, roaming, perhaps others.  Which is the right one for an automatic scan on wakeup?
    3. Is it possible to do this so that the scan is performed completely passively?
    4. Can you suggest a configuration for this?

    Thanks,

    Chris

  • Hi Chris,

    1. Your approach sounds very reasonable

    2.  Using CLI it is not possible to configure the driver to perform Scan Automatically, as for Scan types I think Application scan is the right way to go also it can be controlled by the Application that can be notified on Resume from Suspend and then it will trigger Application Scan

    3. It is possible to perform Passive scan, that can be configured in the Scan Policy command, that can also be applied by the CLI

    4. are you reffering to the Passive Scan confuguration?

    Regards,

    Eyal

  • > 4. Are you referring to the Passive Scan configuration?

    Yes.  I found a number of sample configurations for the WLAN, but they are rather different from our needs.

    We need to wake up, listen for a few seconds without transmitting anything, and if we get a beacon of a desired access point or ad hoc network, attempt to connect to it.  If we don't detect a desired network, we'll go back to the suspended state.

    Thanks again for your assistance,

    Chris

  • Hi Chris,

     just to make sure, is there any open question left ?

    Thanks,

    Eyal

  • Sorry Eyal, I have been distracted with other investigations recently.  I'm glad for the auto-email feature of e2e that brought your reply to my attention.

    I was hoping TI could provide at least a basic configuration that would keep active probing off totally off, but listen to detect a known BSSID or SSID on wakeup.  Then, if it receives a beacon from that SSID/BSSID it would connect.  That kind of a scenario doesn't seem to have been addressed in the sample configurations TI has published.  There are enough obtuse parameters in the system configuration that a published passive scan mode configuration would be helpful.

    Thanks very much,

    Chris