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.

RTOS/SIMPLELINK-WIFI-CC3120-SDK-PLUGIN: RTOS/SIMPLELINK-WIFI-CC3120-SDK-PLUGIN

Part Number: SIMPLELINK-WIFI-CC3120-SDK-PLUGIN
Other Parts Discussed in Thread: CC3120

Tool/software: TI-RTOS

Hello,

Refering the user guide "C:/ti/simplelink_msp432e4_sdk_2_10_00_17/docs/ndk/NDK_Users_Guide.html" , I have the following queries:

1) How can we ensure that the socket getting opened using 'sl_Socket' is meant for WIFI?

2)  What are the API's available for WiFi under 'SlwStack' as shown in the below diagram?

3) How can we open socket (both TCP/UDP and Raw) for Ethernet?

Thanks,

Vaishali.

  • I have asked a colleage to comment, but perhaps you will find this example helpful:
    dev.ti.com/.../

    Regards,
    Chris
  • This conversation is continued here:
    e2e.ti.com/.../706967

    Regards,
    Chris
  • Hello Vaishali,

    Can you explain what the application is and how you to use the Ethernet and Wi-Fi interfaces?

    It's not very clear as to what APIs you plan to use. I have listed the different APIs that you could use, please let us know which APIs you plan to use for so that we can provide better support.

    The following two sets of APIs are TCP/IP Stack specific and they won't provide portability.
    * The CC3120 has a TCP/IP stack in it's ROM. To access this TCP/IP stack, you would use the APIs under the block "SlwStack". For example the API "sl_Socket" comes under this block.
    * The NDK TCP/IP stack runs is packaged with the SimpleLink MSP432E4 SDK. These APIs are under the block "SlNetIfNDK".

    To enable applications to be ported between these two TCP/IP stacks, we have added two sets of APIs to the "Network Services" layer.
    * The SlNetSock layer allows applications to be ported between the CC3120 TCP/IP stack and the NDK. These APIs are under the block "SlNetSock (socket layer)". This API also allows using the TLS protocol.
    * The BSD sockets are an industry standard APIs that are built on top of the SlNetSock APIs. As the BSD sockets standard does not support TLS, these APIs don't support TLS. These APIs are under the block "BSD (Standard)".

    The example that Chris has pointed out uses the "SlwStack" APIs to access the Wi-Fi interface and "BSD (Standard)" to access the Ethernet interface.

    In the next release of the SimpleLink SDK Wi-Fi Plugin, we will update this example to use "SlNetSock (socket layer)" for access both the Wi-Fi and Ethernet interfaces.

    Hope this information answers you questions!

    Thanks,
    Sai
  • Hello,

    Thanks for your response.

    As specified by you,

    "The example that Chris has pointed out (i.e ethernet_wifi_tcp_echo_MSP_EXP432E401Y_tirtos_css) uses the 'SlwStack' APIs to access the
    Wi-Fi interface and 'BSD (Standard)' to access the Ethernet interface.
    In the next release of the SimpleLink SDK Wi-Fi Plugin, we will update this example to use 'SlNetSock (socket layer)' for access both the Wi-Fi and Ethernet interfaces."

    But I want to use NDK APIs (like NDK_socket) to access Ethernet interface and Simplelink APIs(sl_socket) to access WiFi interface.
    I am modifying this example code for an application where I can send data from Ethernet to Wifi at one end (suppose an AP) to Wifi and then Ethernet on another end (suppose a client connected to AP through WiFi). By doing so, my MSP432E4 will act as a switch/router.

    So for this, I used AF_RAWETH and SOCK_RAWETH for opening the RAW Ethernet socket at Ethernet side. I have included a new file i.e 'socketndk.h'.
    But while using
    server = NDK_socket(AF_RAWETH, SOCK_RAWETH , 0 ); ------------------ (a)
    there is an error in opening the socket.

    Then I changed this to AF_INET and SOCK_RAW as in:
    server = NDK_socket(AF_INET, SOCK_RAW , 0 ); ------------------- (b)

    This time the socket gets open successfully. But on receiving data in EthernetReaderThread, the number of bytes read is zero.

    1) Can you help me out with the best way to receive the data using RAW socket at Ethernet side?
    2) Why is there an error in opening a socket using (a) ?
    3) How can I achieve the functionality of switch or router using MSP432E4 and CC3120 combination?

    Thanks,
    Vaishali.
  • Hello Vaishali,

    I will close this post as I believe that the following post has a detailed answer that will answer this question. If you think the following post does not answer your question, you can open this post by replying to this post.

    e2e.ti.com/.../705579

    Thanks,
    Sai