-2

I'm a student and I have a small IOT project at my university. I tried to connect MQTT Dash to IBM BlueMix IOT Flatform but failed. I can't publish/subscribe data on IBM IOT Platform. What do iI need to do?

hardillb
  • 54,545
  • 11
  • 67
  • 105
  • Post your code. What have you done so far? Are there error messages? This will help to solve your problem. – nologin Apr 19 '19 at 09:52
  • I dont have any problem with code hardware. I use NodeMCU to read data sensor and published data to IBM Cloud. I want to use available app to subsribe data from IBM Cloud via MQTT protocol. At MQTT Dash App, i set it as device in IBM IOT Flatform and connect to cloud with: Cliend ID(d:orgid:Android:samsung), IP address (orgid.messaging.internetofthings.ibmcloud.com), Port: 1883 , usename ( use-token-auth) , pass ( API key) . At panel name, topic ( iot-2/cmd/temperature/fmt/json) and Jsonpath ( $.d.temp ) . I connected App to IBM like Device type but i cant receive any data from Cloud. – SilverBoom Apr 19 '19 at 10:40
  • Perhaps your dashboard-config (blured access data) might be helpful. Do you have log information from the IBM-cloud instance with MQTT failure-messages.. e.g. error-log – nologin Apr 19 '19 at 14:30
  • Ya, i have it but not clearly. That's here: "Token auth succeeded: ClientID='d:orgid:Android:samsung', ClientIP=116.108.xxx.xxx" ( when I connected successfully to IBM Cloud) then I continue to send the subscribe to IBM, it worked but not send any data from cloud for me and itself closed connection like this "Closed connection from 116.108.xxx.xxx. The connection has completed normally" I have been trying another way. – SilverBoom Apr 19 '19 at 16:22
  • Plz. put these information to your question/post. Use the editors functions to link or mark text or sourcecode and so on. This makes the information more readable to others. – nologin Apr 19 '19 at 16:30
  • Oops i'm so sorry guy. This is the 1st time I post a ask question. Forgive me, I will fit it next time – SilverBoom Apr 19 '19 at 16:56
  • This is why I'm reviewing this post. https://stackoverflow.com/help/how-to-ask – nologin Apr 19 '19 at 17:53
  • I get it, thank you and have a nice day! – SilverBoom Apr 20 '19 at 08:43

1 Answers1

0

all you need to do is generate and APIKey/Token like in:

https://console.bluemix.net/docs/services/IoT/platform_authorization.html#connecting-applications

then, to receive the messages, you need to subscribe to a topic as in iot-2/type/device_type/id/device_id/cmd/command_id/fmt/format_string

In your case: iot-2/type/Android/id/samsung/cmd/temperature/fmt/json

Details on publishing and subscribing are here: https://console.bluemix.net/docs/services/IoT/applications/mqtt.html#mqtt

idan
  • 554
  • 6
  • 19