CC32XX SLNET use multiple sockets

Other Parts Discussed in Thread: SYSCONFIG

Dear TI Team, 

I want to combine MQTT and OTA sample of CC32xx SDK 5.10.0.2 to one single application. 

Is it possible to use two different sockets? one for mqtt and one for ota?

I didn't find any option to set the socket before/after calling sl_Start().


Additional info:
Added in Syscfg

Best regards, 

Benjamin

  • Hi Benjamin,

    The SlNet parameter in SysConfig is actually an instance of a IP network stack. This is especially useful when you are using multiple network stacks (like Wi-Fi and Ethernet). The SlNet library is used by all the Network Services libraries, including MQTT and OTA. You can find more details about the NS libraries in the NS user's guide.

    The MQTT and OTA libraries manage their own sockets, so your application does not need to create separate ones. If you open the mqtt_client or cloud_ota examples, you can see they only have one CC32xx instance of the SlNet library configured. I suggest working from the mqtt_client example over the mqtt_client_server example, since the mqtt_if abstraction layer in the mqtt_client example is a lot simpler than using the MQTT library directly.

    If you do want to create new sockets, this is done in the application code. See the examples in the examples/rtos/<LaunchPad>/ns folder.

    Best regards,

    Sarah

  • Hi Sarah, 

    that is clear now, thank you Wink

    Best regards, 

    Benjamin