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.

CC3220SF: Cc3220sf mqtt client connect error -2006

Part Number: CC3220SF

Hello ,

I have been working on cc3220sf launch pad and developing my application on the wifi door lock reference design by ti.

I have written my application and have tested on cc3220sf launchpad  and it's working fine ,which has MQTT as one of the feature which i am using to send and receive messages from cloud .i have flashed the required AWS certificates with root certificate to cc3220 and have run my application and i  am subscribing and publishing messages to AWS broker . everything works fine in cc3220sf launchpad.

Issue:

Now we have designed our own cc3220 sf custom board and i have dumped the same AWS certificates into the custom board flash and have run my same application on this board but i am not able to connect to mqtt connection with the broker i am getting the -2006 return error of mqttconnect api.

What is the issue here?

Can't i use the same certificate s in two different devices to connect with the broker?

Regards,

Sanath Rai

  • Hi Sanath,

    Can you track down the exact function call that is generating the -2006 return code?

    This usually represents an invalid input. In which case, it is unlikely that the problem is due to the use of the same certificates. That part should be fine (though it is expected that each device would have unique certificates in production).

    I would expect that the issue is coming from the fact that a netsock layer function is trying to run without having a valid/active interface. Try taking a look at this post which describes this common issue which could be causing the result you see -

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/p/671717/2471813#2471813

    Best Regards,

    Ben M

  • Hi Ben,

    Thank you for the reply.

    I will check this out and get back to you.

    But my doubt is how is it working on the cc3220sf launchpad?it's the same application running on the launchpad.

    Regards,

    Sanath

  • Hi Ben,

    I went Through the thread provided by you and i initialized the slNetSock layer provided in that thread and it didn't solve the issue.

    I tried to track the exact function call by going inside the MQTTClient_connect(App_CB.mqttClientHandle);  API

    and i found out that

    /* Connect to the server */
    ret = MQTTClientCore_sendConnectMsg(clientCtx->cliHndl, MQTTClient_connectCfg.clean, MQTTClient_connectCfg.keepAliveTimeout);

    function is returning the error -2006.

    when i further debugged inside the above function the below function call is returning that error.

    rv = clCtxConnStateTryLocked(clCtx, ref, buf - ref, kaSecs, cleanSession, mqp);

    which has netConnect function which is returning the error -2006

     

    Note: i'm using the simplelink_cc32xx_sdk_3_30_01_02 sdk 

    Today we made one experiment by  replacing the custom board cc3220sf IC with Launchpad cc3220sf IC here we are facing an issue with programming the IC .

    but we are able to program the Custom board cc3220sf IC's which we have procured.

    Also we placed the procured cc3220sf ic into cc3220sf launchpad board and tested it there .we are getting the custom board error -2006 now here.

    Is there any difference between CC3220sf launchpad (RevA) and the custom board IC?

    the difference what we see on the IC is launchpad  IC has cc3220sf12 marked on it while our custom board IC has cc3220sf12A .

    Regards,

    Sanath Rai

  • Hi Sanath,

    Just as a quick sanity check could you try generating new certificates for your custom board on AWS console and try connecting with the new ones instead? I know AWS requires you to attach your certificates to a "thing" which represents a specific device so maybe this is the problem. I don't know if they could really distinguish one device from another by certificates and AWS Thing setup but these are quick things that can be done that could potentially reveal the problem. Something else you can try (and perhaps an easier test) is connecting to a different broker securely. If this works this is a good indicator that the problem is specific to AWS.

    Jesu

  • Hi Jesu,

    Thanks for the reply.

    I will give it a try .

    But we replaced the custom board IC with cc3220sf launchpad ic which i was working on.

    I couldn't program it using SWD interface?what might be the issue there any idea?

    Is  there any difference between launchpad IC and new ICS as i mentioned in my earlier post?

    Regards

    Sanath

  • Hello,

    Our Custom board started working.

    Issue was with the AP to which i used to provision .Firewall was enabled to that AP.that's why it was unable to connect to the client and it was sending the error -2006.

    i provisioned to a new AP and it s working.

    Thank you for the support,

    Regards

    Sanath