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.

Channel & Security info in STA mode

Other Parts Discussed in Thread: CC3200, CC3100SDK

Hi,

Can i get connected channel & security info in STA mode?

I just found SSID and BSSID in event handler.

I'm using CC3200 launchpad.

Thanks,

Park

  • Hi Jung,

    I am thinking you could look at the current profile, to determine its security info, you should be able to access this with the sl_WlanProfileGet. Further details located in the SDK documentation here - file:///C:/TI/CC3100SDK/cc3100-sdk/docs/simplelink_api/html/group__wlan.html#ga17cb00c9f57a6cd53a6346f67c0fc093

    Not sure how you could retrieve the channel details while in STA mode.

    Glenn.

  • Hi, Glenn

    Yes. I can get security info from Profile or from my own config file.
    But I cannot find connected channel info in STA mode.
    Anyone knows?

    Thanks,
    Park

  • Hi Park,

    The channel and security type are not part of the connect event and there is no API to get them.

    Can you elaborate more on the use case and what is the purpose of these values?

    Thanks,

    Barak

  • Hi Barak,

    User want to know more info about STA connection state.
    I think that's why many wifi chipset display these values.

    Thanks,
    Park

  • Hi Park,
    In many systems the end user wants to content the device to his own network and already knows the values of these parameters.
    In other cases he might want to know the security type before connecting to the network and that value is available through the get network list API (sl_WlanGetNetworkList).
    The channel is not available in neither these options but if the channel is required in order to filter some of the channels you can use sl_WlanSet to set the scan params (WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS) and to define the channel mask. This will eliminate the network list to networks on the enabled channels only. For other extreme use cases that the channel is still mandatory, the developer can implement his own scanning using features like the transceiver mode and the rx filters.

    Hope it helped somehow.
    Barak

  • Hi Barak,

    Can you explain more about how to config scan channel using WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS?
    I cannot find anything about it in CC3200-SDK version 0.5.2.

    Thanks,
    Park

  • Hi Park,

    The WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS is part of the sl_WlanSet API.

    This option allows you to configure on which channels the scan should be performed and what is the minimum RSSI threshold for scan result.

    Here is a code example how to call this API:

        slWlanScanParamCommand_t ScanParamConfig;
    
    
        ScanParamConfig.G_Channels_mask = 0x01;
        ScanParamConfig.rssiThershold = -70;
        sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID ,WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS,sizeof(slWlanScanParamCommand_t),(_u8*)&ScanParamConfig);
    

    In the channel mask, 1 means that the channel is enabled and 0 means that the channel is skipped (hence in the example above, it will scan only on channel 1). You should call it with at least one channel enabled.

    Please notice that calling this API doesn't remove previous results, which means that if you already have results from masked channels or lower RSSI you will get these results.

    Barak 

  • Hi Barak,

    I am trying to set the WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS on 3100 with SDK 5.2 as you described above and the call is constantly fails with 0x02 return code.

    When I am trying to to retrieve the same option value with the following code:

            uint16 option;
            uint16 optionLen;

            printf("getting scan options: ");
            option = WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS;
            optionLen = sizeof(slWlanScanParamCommand_t);
            stat = sl_WlanGet(
                SL_WLAN_CFG_GENERAL_PARAM_ID,
                &option,
                &optionLen,
                (uint8*)&ScanParamConfig);

    The call stucks waiting for IRQ in _SlDrvMsgReadCmdCtx and never returns.

    Also, the option WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS appears in the programmer guide under SL_WLAN_CFG_P2P_PARAM_ID config id and not under SL_WLAN_CFG_GENERAL_PARAM_ID.


    Regards,

    Michael

  • Hi Michael,

    Sorry for the late response. Could you please verify again the versions you are using (Host and Networking subsystem)?

    I've checked again and both APIs (Get and Set) are working in SDK 0.52.

    Thanks,

    Barak