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.

CC3235MODS: cc3235mods

Part Number: CC3235MODS
Other Parts Discussed in Thread: CC3235S

I have a roaming portable device setup as HTTP server that gets in to  and out of range. I would like to know if there is a way to send a GET message to server IP port 5000 when ever the device gets back into range ?

The device is setup as server and waiting for messages from client, do I shut down sever, start client and send, shut down client and start sever again ? Not ideal.

  • Hi,

    Nothink prevent you use HTTP server and HTTP client simultaneously. You need to just implement this into your application code. CC3235 devices supports up to 16 sockets simultaneously. That mean you have plenty of resource for your socket code. For example at my application runs following network services simultaneously (HTTP 1.1 webserver for up to 4 clients, sending data via HTTP client to server, sending emails via SMTP server, Modbus TCP server for up to two clients, UDP based zero-conf protocol, SNMPv1,v2,v3 server).

    Jan

  • Hi,

    So you can add more than one interface ?

    /* Initialize SlNetSock layer with CC32xx interface */
    /* We're using priority 5 */
    SlNetIf_init(0);
    SlNetIf_add(SLNETIF_ID_1, "CC32xx", (const SlNetIf_Config_t *)&SlNetIfConfigWifi, /*priority*/ 5);
    SlNetSock_init(0);
    SlNetUtil_init(0);

    I will then setup interface in separate treads ?

    Thank you.

    Thys

  • Hi,

    No. Only if your device will have more interfaces like MSP432E4 (Ethernet PHY) + CC31xx for WiFi.

    What is point of to have multiple SlNet interfaces? I don't see any reasonable reason for this at CC32235.

    Jan

  • Hi,

    Ok then, how do you have HTTP server and client running at the same time on CC3235s ?

    Thys

  • Hi Thys,

    Just create socket code one for http server and other from http client. CC3235 supports BSD sockets and at internet your find many materials how BSD sockets works. As HTTP library you can use TI library or use own HTTP code.

    As HTTP server you can use NWP http server (running at WiFi coprocessor) or use HTTP server running at application processor. Personal I use 2nd option but using of NWP webserver is easier but with less options.

    Jan

  • Hi Jan

    Have the NWP HTTP server running and working quite well, Will start second tread that will run the client with SD socket. 

    Using on network running underground, that's why I need to let server know when in range of AP.

    Thanks

    Thys

  • Hi Thys,

    Where problem lies? Just implement your HTTP client code into separate thread. When you will be connected to AP than unblock http client task. This is pretty simple task.

    What do you means by "in range of AP"? I think you mean connected to AP. Because when you are at range of AP but not connected to AP, you cannot use socket code...

    Jan

  • Hi Jan

    Correct meant connected to AP. Thank you, will do.

    Did not know the cc3235 can run server and client at the same time. Read everywhere you are either a server or client.

    Thanks for help.

    Thys

  • Hi Thys,

    CC3235 can run many TCP/UDP servers and clients at same time. Technically TCP server requires two BSD socket, and TCP client one BSD socket. CC3235 supports up to 16 sockets.

    What is not supported at CC3235 is concurrent AP and STA mode.

    Jan