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-LAUNCHXL: CC3220SF: CC3220sf-Wifi door lock demo - Connection to broker failed, Error code: -111 BRIDGE DISCONNECTION

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: UNIFLASH, TEST2

Hello everyone,

I have been working on CC3220SF  using the cc3220sf Launchpad.

Now i am building my application on the reference design (TI Designs: TIDC-01005 Battery-Powered, Smart-Lock Reference Design With Cloud Connectivity Using SimpleLink™ Wi-Fi) which is built on CC3220S.

i have downloaded the code and imported to my workspace  and I have changed the device to CC3220SF from CC3220S in properties and have added the required .cmd file(CC3220SF_LAUNCHXL_TIRTOS.cmd)  and have built it successfully after adding the required SDK and other plugins without errors and i am able to debug the code in CCS.

ISSUE1:

When i started to test the wifi door lock project it was  getting stuck at SetTopicNames() after entering the sprintf as mentioned below ..

sprintf(topic[1], SUBSCRIPTION_TOPIC1, App_CB.lockUDID[0],
App_CB.lockUDID[1], App_CB.lockUDID[2], App_CB.lockUDID[3],
App_CB.lockUDID[4], App_CB.lockUDID[5], App_CB.lockUDID[6],
App_CB.lockUDID[7], App_CB.lockUDID[8], App_CB.lockUDID[9],
App_CB.lockUDID[10], App_CB.lockUDID[11], App_CB.lockUDID[12],
App_CB.lockUDID[13], App_CB.lockUDID[14], App_CB.lockUDID[15]);

but for the meantime after i commented the SetTopicNames() the code started running.

according to my observation the device id which i'm getting is not been able to copy into the subscription topic.

ISSUE2:

After commenting SetTopicNames()  i have tested the mqtt without the security using the "test.mosquitto.org" and was successful in publish and subscribe using topics.

Now i want to test with security i have downloaded the certificate  and using "m2m.eclipse.org "and have followed the http://dev.ti.com/tirex/content/simplelink_academy_cc32xxsdk_2_30_00_02/modules/wifi/wifi_mqtt/wifi_mqtt.html MQTT academy steps and getting error in connecting the broker.

[MQTT Thread] MQTT Client library initialized successfully<\r><\n><\r><9>

[MQTT Thread] Connection to broker failed, Error code: -111<\r><\n><\r>

BRIDGE DISCONNECTION<\n><\r><\r><\r><\n><\r>

i am debugging directly using Code composer studio and

In the code i have defined secured client and i have given my certificate path directly ( i hope that's also the correct way) other than using uniflash

char *Mqtt_Client_secure_files[CLIENT_NUM_SECURE_FILES] = {"D:/mqttlockcert/lockmqtt.cer"};

ISSUE3:

My application only needs AP provisioning and MQTT in particular so i have disabled BLE provision and other things which i don't need for now.

if BLE provision is disabled does it directly go to the AP provisioning without pressing the SW3 button?

Now my device is provisioned to a particular AP profile which will be stored in serial flash so that when the device gets boot up will be connected to that profile.

My question is if i need to provision the device into a new profile how can that be done or how to remove the saved profile in serial flash so that i can provison it to new profile using AP provision using simplelink starter pro application in mobile?

ISSUE 4:

I am not able to flash the bin file(507Mb) using Uniflash as it is throwing the Error

Error:MCU Image file exceeds the maximum size for this device

Regards,

Sanath Rai

 

 

 

  • Sanath,

    Please find my responses below:

    1 - Unsure why this is causing you issues. You should be able to hard code this value and comment out this line and the example should work fine.

    2 - We've noticed issues with the eclipse broker having intermittent connectivity. I would suggest using a different one.

    3 - Yes, you should be able to #define out the BLE and if you do this AP provisioning mode should start.

    4 - This is odd. Do you mind sharing your .map file with me to look at? I appears something is going wrong in your compiling or linking step.

    Best Regards,

    Vince 

  • Hi Vince,

    Thanks for the reply.

    i will work on other broker and let you know.

    i have attached the .map file  below

    map.txt.txt

    Regards,

    Sanath

  • Hi Vince ,

    Test1:

    Today i tried connecting to "test.mosquitto.org" today again without security 

    i am getting error

    [MQTT Thread] Connection to broker failed, Error code: -2006<\r><\n><\r>

    BRIDGE DISCONNECTION<\n><\r><\r><\r><\n><\r><9>

    yesterday i connected to the same mosquitto server it worked fine where i subscribed and published messages.

    Test2:

    After that i tried connecting AWS broker with certificates 

    a)CA certifcate with.cer extention

    b)Private key

    c) security Certificate.pem

    i am getting below error

    [MQTT Thread] Connection to broker failed,

    Error code: -1

    Regards,

    Sanath Rai

  • Sanath,

    Are you still having issues with this problem? can you get the error code that gets generated from the sl_Connect() call?

    BR,

    Vince 

  • Hi Vincent,

    1) Bin file issue

    Issue with .bin file was with linker file.i went to project properties took the correct .cmd file from SDK and also changed same in tirtos dependent project and rebuilt the project the issue got solved.

    2)Broker connection issue.

    Issue was with the CA certificate.

    With AwS broker in used the starfield certificate and issue for solved.