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.

CC3100: Trouble porting the CC3200 SDK v1.5 MQTT Client changes

Part Number: CC3100
Other Parts Discussed in Thread: CC3135, CC3120

Hello,

I've been working on porting over the MQTT Client updates from the CC3200 SDK v1.5 to my application employing a CC3100.

I've run into some trouble with the sl_mqtt_client.c file. The _sl_ExtLib_AwaitedAckLockedSet function (specifically the mutex surrounding the _sl_ExtLib_AwaitedAckSet call within) is preventing disconnection from our broker from happening.

Specifcially the call to _sl_ExtLib_AwaitedAckLockedSet function in sl_ExtLib_MqttClientUnsub is preventing this. Switching the call to the unprotected version: _sl_ExtLib_AwaitedAckSet fixes the problem. Is this okay to do - or am I misinterpreting this?

Thank you

  • Hi Wilmer,

    Do you know where the mutex is locked elsewhere that is preventing the call to _sl_ExtLib_AwaitedAckSet within _sl_ExtLib_AwaitedAckLockedSet when sl_ExtLib_MqttClientUnsub is called?

    Were any changes made during porting that may have affected this?

    Best regards,

    Jesse

  • There were no changes made, no. It was a direct port. I did some testing and noticed that when a connection is broken (AP is shut off/rebooted) the sl_ExtLib_MqttDisconn callback is never called. Narrowed it down to the _sl_ExtLib_AwaitedAckLockedSet call in sl_ExtLib_MqttClientUnsub.

    It's possible I could be wrong as that being the root cause; but my main problem is sl_ExtLib_MqttDisconn not being triggered.

  • Hi Wilmer, one unrelated question. Why did you choose the CC3100?

    This is an old device that is not recommended for new designs. The CC3100 cannot get the WFA certification (as it doesn't support WPA3). The CC3120 and CC3135 devices support WPA3 and their SDK is maintained on regular basis with security updates and bug fixes.

  • This is for a legacy product that is being maintained.

    I found the problem. I was calling sl_ExtLib_MqttClientUnsub in the sl_ExtLib_MqttDisconn callback, and since the timeout is set to wait forever for the lock to be available, it got stuck.