MQTTS - Mita errors
Antwort
25.07.19 09:27

Hello Everyone,

 I try to setup TLS in MQTT transport. I set different options that were required :

 - url of the mqtt server

 - authentication with username and password

 - certificatepath of the server

 - sntpServer

And a clientId with different topics. Before I set mqtts transport, all went fine. However, when I enable mqtts transport, XDK device cannot connect to mosquitto mqtt broker. A return code is sent in the console, but I do not know what that means.

Kind regards.

0 (0 Stimmen)
RE: MQTTS - Mita errors
Antwort
29.07.19 14:08 als Antwort auf Jules Abadie.

Hello Jules Abadie,

Connection to MQTT broker has failed with error code RC_UNSUPPORTED_SCHEME(398) from Servalstack. Can you check the following,

  1. Certificate is valid
  2. You are using secured server (as i could see ip address of the server in 192 series, i assume you run the server locally in your machine)
0 (0 Stimmen)
RE: MQTTS - Mita errors
Antwort
01.08.19 13:21 als Antwort auf Padmapriya G.

Hello Padmapriya,

The broker is running on a Raspberry on localhost. The XDK device go through the Wi-Fi to then access to the Raspberry on the localhost address. The certificate of the server is correct from my point of view. I generated it with openssl command, and I checked few features :

- The common name (CN) : where I put the raspberry's address through the Wi-Fi that I use for the project. (The CN of the CA is different from the broker)

- The validation date is good

I guess that the server is secured, a simple authentication is set with the default profile. But I do not think it is the problem.

Also when I tried a local TLS communication between 'mosquitto_sub' and 'mosquitto_pub' command, it works, as : (I disable certificate authentication)

mosquitto_sub -d -h 192.168.10.20 -p 8883 -t Hello --cafile /etc/mosquitto/ca_certificates/ca.crt -u julio -P julio*

mosquitto_pub -d -h 192.168.10.20 -p 8883 -t Hello --cafile /etc/mosquitto/ca_certificates/ca.crt -u julio -P julio* -m 'Hey'

The subscriber see the response : Hey

0 (0 Stimmen)
RE: MQTTS - Mita errors
Antwort
01.08.19 13:22 als Antwort auf Jules Abadie.
RE: MQTTS - Mita errors
0 (0 Stimmen)
RE: MQTTS - Mita errors
Antwort
19.08.19 08:17 als Antwort auf Jules Abadie.

Hello everyone,

 

I did find my problem on MQTTS setup. It was on the broker configuration, where the TLS version was important. The only version that works is TLS v.1.2. Now for me, the MQTTS dialog between XDK device and the broker via Wi-Fi works fine.

0 (0 Stimmen)