8000 Using adafruit_minimqtt with default networking · Issue #219 · adafruit/Adafruit_CircuitPython_MiniMQTT · GitHub
[go: up one dir, main page]

Skip to content
Using adafruit_minimqtt with default networking #219
Open
@wz2b

Description

@wz2b

I am trying to use adafruit_minimqtt with the default circuitpython socket implementation, like this:

pool = socketpool.SocketPool(wifi.radio)
ssl_context = ssl.create_default_context()
ssl_context.check_hostname = False

mqtt_client = MQTT.MQTT(
    broker="192.168.1.2",
    port=8883,
    username="abcdefgh",
    password="abcdefgh",
    socket_pool=pool,
    ssl_context=ssl_context,
    is_ssl=True
)

On connect, my MQTT broker sees this:

1716384906: New connection from 172.28.0.1:49242 on port 8883.
1716384906: OpenSSL Error[0]: error:14037412:SSL routines:ACCEPT_SR_KEY_EXCH:sslv3 alert bad certificate
1716384906: OpenSSL Error[1]: error:140370E5:SSL routines:ACCEPT_SR_KEY_EXCH:ssl handshake failure

I'm not quite sure why. It works okay with a version of umqtt that I modified to work with socketpool. For what I'm doing here I really don't want it checking the certificate chain (I'm not sure how to disable that) but even so, the error message above looks like something else, like it's trying to use certificate (rather than username/password) client authentication.

Am I missing some constructor parameters?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0