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.

CCS/MSP432P401R: CC3120

Part Number: MSP432P401R
Other Parts Discussed in Thread: CC3120

Tool/software: Code Composer Studio

Hi, I am looking to create a UDP network connection using the MSP432 board and the CC3120 booster board for wifi. I am looking to convert the network_terminal code to make the wifi connection programmatically instead of using inputs in the uart terminal. Has anyone worked on such a project before or can help?

  • Hi,

    I suggest you look at the UDPClient or UDPServer function in socket_cmd.c of network_terminal, and then copy the contents of those functions to your own program. Removing the interactions with the network terminal inputs should be straightfoward.

    There is unfortunately no other simple UDP example provided with the CC3120 plugin, so taking the UDP code from network_terminal will likely be the best path forward.

    Let me know if you need more clarification on how to remove the uart input functionality from the network_terminal functions, or have further questions on using UDP sockets on the CC3120.

    Regards,

    Michael

  • Hi Michael it would be great to get some help on this project. Is there any other way I can communicate with you regarding this project. Any kind of help would be amazing.

  • Hi,

    I would be happy to help out on this thread. Please let me know what specific issues you are having with getting UDP functionality working on the CC3120 and I can assist you in debugging and working through your problems.

    Regards,

    Michael

  • Hello Michael, I am working with Ayush on this project.

    I am having a problem with the use of the sl_Socket function inside UDPServer. It is giving the error code -99 - Cannot assign requested address.

    The code compiles correctly up until this socket creation. Could this be an issue in using ParseRecvCmd incorrectly? I am seeing all the initially intended param assignments happening in my UART terminal which makes me think not.

    I know the Msg Structure is returning the .sd value of 0 upon the sl_Socket call. The value is 17 before VERIFY_RET_OK is called. Even with this one call commented out it still  turns to zero for some unexplained reason.

    Thank you in advance. Any direction at all in debugging this problem is appreciated.

    UART Terminal right before the error return.

    Expressions directly before sl_Socket is called

    Expressions inside sl_Socket just before returning.

    _i16 sl_Socket(_i16 Domain,
                   _i16 Type,
                   _i16 Protocol)
    {
        _SlSockSocketMsg_u Msg;
    
        Msg.Cmd.Domain = (_u8)Domain;
        Msg.Cmd.Type = (_u8)Type;
        Msg.Cmd.Protocol = (_u8)Protocol;
    
        /* verify that this api is allowed. if not allowed then
           ignore the API execution and return immediately with an error */
        VERIFY_API_ALLOWED(SL_OPCODE_SILO_SOCKET);
    
        VERIFY_RET_OK(_SlDrvCmdOp((_SlCmdCtrl_t *)&_SlSockSocketCmdCtrl, &Msg,
                                  NULL));
    
        if(Msg.Rsp.StatusOrLen < 0)
        {
            return (Msg.Rsp.StatusOrLen);
        }
        else
        {
            return((_i16)((_u8)Msg.Rsp.Sd));
        }
    }

  • Hi,

    What is your exact code you use for creating the UDP socket, is it based off of the network_terminal example? If you could please provide me the code you are currently using, I can  run it on my end, reproduce your error, and better understand the issue you are seeing.

    I would appreciate it if you could insert the code using the syntax highligher.

    Thanks,

    Michael

**Attention** This is a public forum