I create my device in Watson IoT, I see it connected and it send some events (I see it in watson iot dashboard)
I define it by the following
- Device ID 1002
- Device Type semaforo
So I create my app with the following info
- key a-MyOrg-tecfj072yx
- description base
- AccessControl permissions standard application
- key: a-MyOrg-tecfj072yx
- token: ATokenPsw
I try to connect to the device event using mosquitto code
mosquitto_sub -h MyOrg.messaging.internetofthings.ibmcloud.com -p 8883 -i a:MyOrg:myapp -u a-MyOrg-tecfj072yx -P ATokenPsw -t iot-2/type/+/id/+/cmd/+/fmt/+
and nothing append!!! no error displayed, no event retrieved !!! The mosquitto_sub remain as is
Why the routine in not correctly subscribed to my device event ?
To use port 8883 you need to make a TLS connection.
mosquitto_sub
requires either--cafile
or--capath
to be present on the command line to enable a TLS connection.extracts from the man page