mqtt.simple connection over ssl

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
PikWay
Posts: 2
Joined: Thu May 18, 2017 12:37 pm

mqtt.simple connection over ssl

Post by PikWay » Wed Nov 15, 2017 9:18 pm

Hello,

Can anyone please paste some snippet of MQTTClient initialization when connecting over ssl?
I cannot make it work. What are mandatory ssl_params? I'm trying to put only ca_certs, but getting:

TypeError: extra keyword arguments given

during connect.

mqtt=MQTTClient('testClient','192.168.10.100', port=8883, user='test', password='simple4U',ssl=True, ssl_params={"ca_certs":"/crt/ca.crt"})

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: mqtt.simple connection over ssl

Post by Damien » Thu Nov 16, 2017 5:52 am

I assume you're using an esp8266-based board. In that case the ssl certs are not yet supported but there is some working code which adds this feature, see here: https://github.com/micropython/micropython/pull/3398 . At that link you can also see an example of using MQTT.

PikWay
Posts: 2
Joined: Thu May 18, 2017 12:37 pm

Re: mqtt.simple connection over ssl

Post by PikWay » Thu Nov 16, 2017 8:24 pm

Thanks a lot Damien! This is it!

Post Reply