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.

CC3220S: Difference between sl_SendTo and slNetlfWiFi_sendTo. Also reasons for the SLNETSOCK_SOCKET_TX_FAILED_EVENT error code

Part Number: CC3220S

I feel sure I should have spotted this in the docs or on e2e but have thus far failed.

1. In the SimpleLink CC31xx/CC32xx Host Driver APIs for 'Socket' what are the 'slNetlfWiFi_' calls (32bit?). Should I be using these. My platforms are CC3220 and CC3235.

2.  For sl_SendTo() there is the following possible returned error: 'In case of transmission failure an async event SL_SOCKET_TX_FAILED_EVENT is going to be received.'

As UDP is connectionless then I'm assuming its not a reported error from the destination, rather an internal failure to send. What would the possible reasons be ?

Thks & rgds,

Stuart 

  • Hi Stuart,

    For sockets, there are 2 options to interface the NWP:

    The direct one is through sl API (such as sl_SendTo as defined in Simplelink/sl_socket.h).

    Or you can use the TI SlNet library which is a common networking API, that works with the wifi as well as with other SimpleLink connectivity devices (such as Ethernet when using MSP432E). Using this library (in such case you may use SlNetSock_sendTo defined in source/ti/net/slnetsock.h), adds the option to enable one or multiple network interfaces (SlNetIf). the SlNetIf is the common API used by SlNetSock. Each of the supported connectivity drivers implements the API and SlNetIfWifi is the (internal) implementation for the simplelink wifi (it will use sl_SendTo).

    So the main advantage of the 2nd option is when using, if you have plans of integrating other connectivity IP (or running the same code with different connectivity devices). Other advantage for using slNet is using SlNetConn which enable/disable the net/if and for the wi-fi this includes a simple interface for the TI provisioning (AP and/or SC) as demonstrated by the Connection Manager example.

    The SL_SOCKET_TX_FAILED_EVENT will be received when there are issues in 802.11 level, e.g. no 802.11 ack (from the AP) on the UDP packet transmission or if the interface is not enabled (disconnected from the AP). 

     

    Br,

    Kobi

       

  • Thanks for the prompt reply Kobi.

    All clear.

    b rgds