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.

CCS/CC3200-LAUNCHXL: MQTT_Client : can't connect broker : SL_ECONNREFUSED

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

Tool/software: Code Composer Studio

Hi,

 

I'm trying to make the MQTT_client demo work on my CC3200 Launchpad but I'm having trouble to connect the IBM broker.

The sl_Connect function in the socket.c sheet returns the error -111 which indicates a refused connection.

Is there anything to configure on the IBM server ? Because when I connect my PC to my phone I can ping several websites but I can’t ping “messagesight.demos.ibm.com”.

 

Best regards,

  • Hello,
    This thread is best served in the appropriate CC32xx forum. I will move it there. The experts there can help you best.

    Thanks
    ki
  • Hello,

    You will not be able to ping or connect to messagesight.demos.ibm.com via browser as it is only a part of the complete URI.

    In any case, have you flashed the latest 1.0.1.6-2.7.0.0 servicepack?

    From the printouts it seems you have all 0 for build version.

    I am not saying that this is the issue but first please update it via Uniflash and retry.

    Regards,

    Shlomi

  • Hello,

    When I flash the 1.0.1.6-2.7.0.0 servicepack (I tried to format with 1MB Capacity and with 512KB), I get an Error at the beginning of the demo. It appears after the call of the sl_Start(0, 0, 0) function line 618 of the network_if.c. I tried to reset manually the board but I got the same error.

    If I only format the cc3200 launchpad, I get a similar error at the first connection but then after reseting manually the launchpad I can get further in the demo.

    Also the wlan_station example worked without the servicepack updated.

    Regards,

    Bastien

  • Strange,

    Without serviecpack installed, it runs from ROM and it is highly not recommended.

    What device version are you using? you can tell from the silk label on the CC3200 chip.

    Regards,

    Shlomi

  • The chip is XCC3200HZ
    437
    ZCEV G3

    Model : CC3200-LAUNCHXLA

    Regards,
    Bastien
  • OK, this explains everything.

    You have a pre-production chip that would not work with the servicepack nor the latest SDK.

    You must move to production device in order to proceed.

    Regards,

    Shlomi

  • Thank you Shlomi,

    I borrowed an on other cc3200 LAUNCHPAD with the servicepack on it and I have the same problem than when I opened this thread (with the error -111).

    Regards,

    Bastien

  • Hello Bastien,

    What is the version for this new LaunchPad?

    Are you able to connect/ping the cloud via this AP?

    Shlomi

  • Hi Shlomi,

    The new version is a CC3200R1 M2; model CC3200-LaunchXLA

    I tried with two differents AP (shared connection of mobile phones) with the same results. I can ping "m2m.demos.ibm.com" but I can't connect to it with any browser, I get the "unable to find the proxy server" error.

    Bastien

  • Hello,

    I reproduced it on my side as I did not see anything wrong in the implementation and it does not work for me as well!!!

    Not sure if this is a temporary server down or whether IBM changed something in the requirements (for example, only secured connection).

    In any way, I tried the same code with a different MQTT broker who is working with the same port 1883 and it works (at least the connection).

    You can try on your side as well. It is "iot.eclipse.org".

    Regards,

    Shlomi

  • Hi Shlomi,

    I tried it, it works with "m2m.eclipse.org" as SERVER_ADDRESS.

    Thank you for your help,
    Regards,
    Bastien
  • Hello Shlomi,

    I am trying to run the MQTT client on cc3200 using the given IBM server in the example code and i am also getting the same error as Bastein.

    The specifications of the cc3200 chip of the LaunchPad is as follows:

    CC3200R1

    M2

    ZERH

    523 G4

    However, during debugging if I am giving single breakpoint at the void MqttClient(void *pvParameters) function (line 747 of main.c) and then going step by step pressing F6, i am getting prompt for SSID, Security key etc. I gave SSID of my open wifi network and it connected. Further went down by pressing F6 and some more thing showed up on terminal as follows.

       

    As it can be seen, it is giving successful connection to broaker 1. However after some steps it gets stuck at GPIO_IF_LedConfigure(LED1|LED2|LED3); which is at line 946 of main.c. Also i am unable to connect to the web client from computer. In the code the client id is "user1". Can you kindly suggest possible solutions? Also, giving one breakpoint at MqttClient function doesnt seem to work everytime (not alwsys it prompts for SSID).

    Regards.