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.

CC3120MOD: AWS MQTT and httpclient run together causing hangup

Part Number: CC3120MOD


I have an MSP432 and CC3120MOD running AWS MQTT on one thread and HTTP client communicating to a separate host on another thread.  After running successfully for a while I get a "[SOCK ERROR] Other peer terminated the SSL layer"  As best I can tell without debugging the Wi-Fi interface, if an HTTP client connect happens while MQTT is communicating with AWS, the Wi-Fi interface hangs. I believe the socket error is on the HTTP connection. I have run ROV to look at the stack and threads and everything looks fine.  Any thoughts on how to debug this further?  Any multithreading issues with the Wi-Fi interface I need to watch out for?

Gary Klinefelter

  • Hi Gary,

    There shouldn't be an issue with multiple TLS sockets running in different theads - the host driver is thread-safe and will handle multiple threads without an issue.

    Can you please follow the instruction in section 20.1 of the NWP programmer's guide to collect the NWP logs? http://www.ti.com/lit/swru455

    The NWP logs will allow me to see what might be causing the socket error .

    Regards,

    Michael

  • Thanks Michael, Unfortunately our board does not bring that pin out from the MOD.  I tried previously to remove the module cover and connect, but failed.  I did find one issue and that is AWS will close the socked if you disconnect MQTT and then take a few seconds to close the socket.  This may be happening when the HTTP connect, send and disconnect takes too long.  I am working on that and will report back.  I will try the NWP connection again if needed.

    Gary

  • Hi Michael,

    I have some more information.  It may take me a couple of weeks before I get to NWP logs.  I verified that if you send an MQTT disconnect to AWS you have to close the socket within about 50ms or they close is for you.  I suspect I would get these socket errors when the WiFi interface got stuck.  I also verified that when I start an HTTP connection and then interrupt it with with an AWS connection, the system hangs.  It would appear from ROV that the sl_task has a semaphore that never gets cleared.  Only higher priority tasks continue to run.  The HTTP connection is a host certificate connection and the AWS connection has host and client certificates.  HTTP and MQTT have their own threads with HTTP being the lower priority.  sl_task has a higher priority than both.  Would I be able to include the simplelink library to see where its failing? is it possible to change SL_OS_WAIT_FOREVER to a smaller value and have the interface exit?

    Thanks,

    Gary Klinefelter