It seems that IBM recently stopped to accept non TLS connections to the MQTT borker for security reasons.
I'm fond of a little application which reads accelerometer sensor data from the smartphone using JavaScript and sends it to the message broker via MQTT.
This application is broken. Therefore I'm trying to fix it in this fork.
As already mentioned, non TLS connections are rejected, that's why I've enabled TLS:
window.client.connect({
onSuccess: onConnectSuccess,
onFailure: onConnectFailure,
userName: "use-token-auth",
password: window.password,
useSSL: true
});
It still doesn't connect. On the IBM Watson IoT Platform I'm seeing this error in the log, nothing else:
Closed connection from 213.55.176.207. The operation is not authorized.
Now I've created a little test index.html file. If I'm connecting as a device, it still doesn't work, but if I'm connecting as an application it works, as can be seen here. But I've created the devices in the platform. And if I'm using an old instance of Watson IoT Platform it works but with newer ones not.
What am I doing wrong?