micropython-lib icon indicating copy to clipboard operation
micropython-lib copied to clipboard

Add very basic example for mqtt tls

Open mrkeuz opened this issue 4 years ago • 0 comments

Tested on next setup:

  • MicroPython 1.17 (without ca-cert's)
  • Traefik Proxy 2.5 (Let's Encrypt Cert)
  • Mosquitto 2.0.12

Note:

  • Unable connect without ssl_params = {"server_hostname": "<addr>"}

  • If keepalive = 0 (default) got MQTTException(2)

  • Don't found ssl.CERT_XXX or ussl.CERT_XXX constants, although the constants are specified in the documentation. Only found in inner definitions. But didn't understand how use it outside: https://github.com/micropython/micropython-lib/blob/3c383f6d2864a4b39bbe4ceb2ae8f29b519c9afe/python-stdlib/ssl/ssl.py#L5-L7

    Not sure if all of this is bad defaults or this behavior made by design.

mrkeuz avatar Oct 29 '21 14:10 mrkeuz