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.

Compiler/CC3220SF-LAUNCHXL: alternative for TxFramesCount

Part Number: CC3220SF-LAUNCHXL

Tool/software: TI C/C++ Compiler

Hi,

In the latest SDK (simplelink_cc32xx_sdk_4_10_00_07)  SlDeviceGetPmStatClrOnRdTypes_t  structure is available to get following parameters.

typedef struct
{
    _u32 Disconnects;         // clear on read - disconnect count
    _u32 TxFramesCount;       // clear on read - Tx Frame count
    _u32 ReceivedBytesCount;  // clear on read
    _u32 reserved[4];         // reserved for additional clear on read statistics
}SlDeviceGetPmStatClrOnRdTypes_t;

Currently I am using Old SDK version (v2_10_00_04), To upgrade to the latest takes some more time. 

So for time being is there any alternative API/ Structure to get the above parameters from the SDK version (v2_10_00_04)?

Regards,

Suresh

  • Hi Jan D,

    Thanks for your reply.

    I wanted to fetch the AvarageMgMntRssi(RSSI) value from SlWlanGetRxStatResponse_t structure.

    Hardly i am getting the correct value once out of 10 times. Following piece of code also won't support for SDK version (v2_10_00_04), or am I missing something?

     

    void RxStatCollectTwice()
    {
        SlWlanGetRxStatResponse_t rxStat;
        _i16 rawSocket;
        _i8 DataFrame[200];
        struct SlTimeval_t timeval;
        timeval.tv_sec =  0;             // Seconds
        timeval.tv_usec = 20000;         // Microseconds. 10000 microseconds resolution
        _u32    status;
    
        sl_WlanRxStatStart();  // set statistics mode
    
        rawSocket = sl_Socket(SL_AF_RF, SL_SOCK_RAW, 0);
        // set timeout - in case we have no activity for the specified channel
        sl_SetSockOpt(rawSocket,SL_SOL_SOCKET,SL_SO_RCVTIMEO, &timeval, sizeof(timeval));    // Enable receive timeout
        status = sl_Recv(rawSocket, DataFrame, sizeof(DataFrame), 0);
    
        usleep(1000); // sleep for 1 sec
        status = sl_WlanRxStatGet(&rxStat, 0);
        usleep(1000); // sleep for 1 sec
        status = sl_WlanRxStatGet(&rxStat, 0);
    
        if (status == 0) 
        {
            if (rxStat.AvarageMgMntRssi != 0) 
            {
                IotLogInfo("RSSI %d", rxStat.AvarageMgMntRssi);
            }
            else 
            {
                IotLogInfo("getting RSSI -99");
            }
    
        }
    }	

    Regards,

    Suresh

  • Hi Suresh,

    What do you mean that you are not able get correct RSSI value? What exactly do you need? You need RSSI value at transceiver mode or connected mode?

    • I am not 100% sure, but I think that AvarageMgMntRssi value is not valid in transceiver mode. In transceiver mode (SL_AF_RF) is RF PHY forwarded to your application code and I think device MAC/NWP cannot determine between data and management packets because is bypassed.
    • I use AvarageMgMntRssi at connected mode (STA mode) and it works well. But it not make sense to call this API fastest then at 5 sec interval. At 1sec interval you will not get proper values definitely. In case of connected mode and using AvarageMgMntRssi or AvarageDataCtrlRssi is not mandatory call sl_WlanRxStatStart() and sl_WlanRxStatStop() API.

    btw1 ... this part code:

    IotLogInfo("getting RSSI -99");

    does not mean RSSI value -99 but than RSSI value is not available now.

    btw2 ... if you need RSSI value to your AP, you can use network scan as well.

    Jan