Hello, I hope someone can help me with my little problem. I am not very confirm with mqtt and further TLS issues, so my quetstion may be a little bit stupid…
I am trying to establish a connectection with our MQTT server witch only allows a ssl connection. The connection without TLS worked fine. With my Raspberry I could establish a connection to the server successfully.
This is what I did:
at
OK
AT+QSCLK=0
OK
AT+QSSLCFG=1,5,"seclevel",2
OK
AT+QSSLCFG=1,5,"cacert"
>
+QSSLCFG: 1,5,"cacert",1797
OK
AT+QSSLCFG=1,5,"clientcert"
>
+QSSLCFG: 1,5,"clientcert",1936
OK
AT+QSSLCFG=1,5,"clientkey"
>
+QSSLCFG: 1,5,"clientkey",1676
OK
AT+QMTCFG="ssl",3,1,1,5
OK
AT+QMTOPEN=0,"mqtt.server",8883
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,"Device","usr","pw"
OK
+QMTSTAT: 0,7
AT+QMTOPEN=0,"mqtt.server",8883
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,"Device"
OK
+QMTSTAT: 0,7
As trusted CA certificate I used: /etc/letsencrypt/live/mqtt.example.com/cert.pem
As client certificate I used the first and the second part from: /etc/letsencrypt/live/mqtt.example.com
/chain.pem
As client private key I used: /etc/letsencrypt/live/mqtt.example.com/privkey.pem
I hope someone can help me. I’m trying to connect for several days now…
Thanks to all!