Search code examples
ibm-cloudmqttwatson-iot

Bluemix Connection Refused: not authorised, can't register device


I have read several tutorials and topics and I did everything as described, but still I am not able to register device.

I have been trying to use MQTTlens and mosquitto but same problem, not authorised

Bellow is command for mosquitto

mosquitto_pub -h xwc8vm.messaging.internetofthings.ibmcloud.com -u use-token-auth -P 'YpSP?P98Wwe0pYGXPj' -i 'd:xwc8vm:devicetype:mydevice' -t /iot/x -m '{"d":"heloo"}'

This are devices data

Organization ID         xwc8vm
Device Type             devicetype
Device ID               mydevice
Authentication Method   token
Authentication Token    XXXXXXXXXX

I have used host

xwc8vm.messaging.internetofthings.ibmcloud.com

and client

d:xwc8vm:devicetype:mydevice

I even tried using http://mqtt-helper.mybluemix.net/?cm_sp=dw-bluemix--nospace--answers, but got this error

(23:42:45.044)Failed to connect to xwc8vm.messaging.internetofthings.ibmcloud.com:1883. Code: 1, Message: AMQJSC0001E Connect timed out.

Everything is configured as here http://heidloff.net/article/useful-mqtt-tools-ibm-watson-iot-bluemix?cm_mc_uid=27677244132415055778021&cm_mc_sid_50200000=1505944109


Solution

  • You can check your TLS security setting in your dashboard under the security tab. New IoT services by default require TLS. If you are not using TLS then try setting it to optional to see if that resolves the problem. enter image description here