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.

CC3200-LAUNCHXL: Sock event handler: [SOCK EVENT] - Unexpected Event [20x] , during HTTPS GET

Expert 1255 points
Part Number: CC3200-LAUNCHXL
Other Parts Discussed in Thread: CC3200, CC3200SDK, CC3100

Hi 

i am connecting to a https cloud server and getting data every 5 seconds. Depending on the data obtained i may or may not follow it up with a post data.

now at random times i am getting the following error:

[SOCK EVENT] - Unexpected Event [20x]

this is generated from the sock event handler.

when this error occurs, my get data fails. So i handled it in the code by deleting the present client and create a new one and getting data again. This goes on without error for some time but this error comes back again later. Since i am deleting the client and creating a new one my code doesnt hang, but i dont understand why this error occurs.

Can you please suggest

 

thanks and regards

av

  • Hi Jan

    Thank You for the reply.

    The issue is very similar.

    the error is 2

    from socket.h (C:\ti\tirtos_cc32xx_2_16_01_14\products\tidrivers_cc32xx_2_16_01_13\packages\ti\mw\wifi\cc3x00\simplelink\include)

    /* possible types when receiving SL_SOCKET_ASYNC_EVENT*/
    #define SSL_ACCEPT (1) /* accept failed due to ssl issue ( tcp pass) */
    #define RX_FRAGMENTATION_TOO_BIG (2) /* connection less mode, rx packet fragmentation > 16K, packet is being released */
    #define OTHER_SIDE_CLOSE_SSL_DATA_NOT_ENCRYPTED (3) /* remote side down from secure to unsecure */

    I dint understand how it is related to timer.

    I am using tirtos, and not non os. The thread is of following format

    void connect_to_cloud
    {
    	while(1)
    	{
    		if(cli handle=NULL)
    		{
    			CONNECT TO CLOUD();
    		}
    		Task_sleep(1000);
    	}
    }
    
    void get_or post_to_cloud
    {
    	while(1)
    	{
    		if(cli handle!=NULL)
    		{
    			ret=GET FROM CLOUD();
    			If(ret=failure)
    			{
    				DELETE CLI HANDLE
    			}
    		}
    		Task_sleep(5000);                //5 SECONDS
    	}
    }

    How can i avoid the error

    If the error is from the cloud server- what causes it?

    Thanks a lot

    av

  • Hi av,

    This issue is not similar, it is same actually. Root of issue is not connected with timer. It is related with not proper socket communication inside your code with your cloud server. Your server probably not receive proper data and from this reason is SSL communication closed. You should look to communication between CC3200 and your server by the Wireshark network sniffer to be able determine what is going on.

    BTW ... what version of SDK and ServicePack do yo use?

    Update: Your issue is definitely not RX_FRAGMENTATION_TOO_BIG. Your issue is OTHER_SIDE_CLOSE_SSL_DATA_NOT_ENCRYPTED. It looks that you use SDK version 1.1.0. This SDK is very old. My recommendation is not use this old SDK and move to latest 1.3.0.

    Jan

  • Hi Jan

    sdk version is CC3200SDK_1.2.0

    tirtos version is tirtos_cc32xx_2_16_01_14

    The socket.h file is from tirtos folder

    It is related with not proper socket communication inside your code with your cloud server.

    i will look into this, and get back

    Thanks a lot 

    av

  • Hi av,

    And what ServicePack version?

    BTW ... inside SDK 1.2 is this code:

    /* possible types when receiving SL_SOCKET_ASYNC_EVENT*/
    #define SSL_ACCEPT                                (0) /* accept failed due to ssl issue ( tcp pass) */
    #define RX_FRAGMENTATION_TOO_BIG                  (1) /* connection less mode, rx packet fragmentation > 16K, packet is being released */
    #define OTHER_SIDE_CLOSE_SSL_DATA_NOT_ENCRYPTED   (2) /* remote side down from secure to unsecure */

    ... inside SDK 1.1 is this:

    /* possible types when receiving SL_SOCKET_ASYNC_EVENT*/
    #define SSL_ACCEPT                                (1) /* accept failed due to ssl issue ( tcp pass) */
    #define RX_FRAGMENTATION_TOO_BIG                  (2) /* connection less mode, rx packet fragmentation > 16K, packet is being released */
    #define OTHER_SIDE_CLOSE_SSL_DATA_NOT_ENCRYPTED   (3) /* remote side down from secure to unsecure */

    Are you sure what version of SDK do you use and have compiled into your code?

    Jan

  • Hi Jan

    Since my code is a RTSC project, using TI-RTOS, the source and header files used are from the TIRTOS FOLDER (not the SDK folder). This is the location of the file: (C:\ti\tirtos_cc32xx_2_16_01_14\products\tidrivers_cc32xx_2_16_01_13\packages\ti\mw\wifi\cc3x00\simplelink\include).

    Service pack version: CC3100_CC3200_ServicePack_1.0.1.6-2.7.0.0

    Thanks
    av

  • Hi av,

    Inside this directory is a old SDK version (1.1.0). Even you have project with TI-RTOS you still can use latest SDK. As I know SDK version 1.2 and above is much better and stable. I think it is not good idea use old SDK, even if this is not probably connected to your issue.

    Jan