5 Replies Latest reply on Apr 12, 2016 10:42 PM by prashantsinh

    IBM Bluemix is not working with SN8205

    prashantsinh

      Hello,

       

      I am working with SN8205 and Wiced SDK 3.5.2.

      For using IBM Bluemix there is perfectly explanation on below link:

      WICED IBM IoT Bluemix quickstart

      Which i have followed and got worked demo code for Light sensor(I have not attached light sensor but passed random values which is uploaded to web.)

       

      But now when i have changed

      Demo application

      #define MQTT_BROKER_ADDRESS                 "quickstart.messaging.internetofthings.ibmcloud.com"

      #define WICED_TOPIC                                      "iot-2/evt/iotsensor/fmt/json"
          sprintf(clientId_buffer, "d:quickstart:iotqs-sensor:%02X%02X%02X%02X%02X%02X", mac.octet[0],mac.octet[1],mac.octet[2],mac.octet[3],mac.octet[4],mac.octet[5]);

       

      My application

      #define MQTT_BROKER_ADDRESS                 "0hjmsp.messaging.internetofthings.ibmcloud.com"

                                                                                  (Orgnation Id.messaging.internetofthings.ibmcloud.com)

      #define WICED_TOPIC                                      "iot-2/evt/intex_Mobile/fmt/json"
          sprintf(clientId_buffer, "d:0hjmsp:intex_Mobile:sigma1");

      Where client ID is Orgnazation_ID.Device_type.Device_ID.

       

      Then I'm getting below print on Terminal.

      ===========================Terminal Log===========================

      Initializing Light Sensor

      [MQTT] Opening connection...Client ID...d:0hjmsp:intex_Mobile:sigma1

      Client ID...d:0hjmsp:intex_Mobile:sigma1

      ---- Success

      [MQTT] Publishing...Light value 2021

      Message :{"d":{"name":"WICED4343W","amb_light":2021}}

       

       

      Wait for response error

       

      Wait for response error

       

      Wait for response error Failed publish

      ===================================================================

      On the server side i'm getting error log in device detail

       

      Invalid userID () for device auth: ClientID='d:0hjmsp:intex_Mobile:sigma1', ClientIP=59.95.32.254Apr 11, 2016 2:22:05 PM
      Closed connection from 59.95.32.254. The operation is not authorized. 4 times in the last 5 minutesApr 11, 2016 2:22:05 PM
      Invalid userID () for device auth: ClientID='d:0hjmsp:intex_Mobile:sigma1', ClientIP=59.95.32.254Apr 11, 2016 2:22:07 PM
      Closed connection from 59.95.32.254. The operation is not authorized.Apr 11, 2016 2:22:07 PM

       

       

      MessageTimestamp
      Invalid userID (teksun.krishna@gmail.com) for device auth: ClientID='d:0hjmsp:intex_Mobile:sigma1', ClientIP=59.95.32.254

      I have also tried by using my username and password in mqtt_conn_open even if this error there.

       

      Also tried using Authentication Key and Authentication Token Key.

       

      So how to provide authentication it seems we can pass private key and ca_certificate key but i'm not finding where to get these certificates.

       

      Regards,

      Prashant