Skip to content

No way to use key pair on esp32 native e.g. ESP32-S2 feather (not airlift) #98

Closed
@twi11ie

Description

@twi11ie

Is there a way to connect to a MQTT broker that requires key pairs (like AWS MQTT)

Examples and code seem to only support ESP32 co processors. How can this be done on a ESP32-S3 feather?

# Create a socket pool
pool = socketpool.SocketPool(wifi.radio)

ssl_context = ssl.create_default_context() 

# how to set these in the SSL context or MQTT for socket wrap?  e.g. AWS thing cert and .pem
# {"key": DEVICE_KEY, "cert": DEVICE_CERT}

client = MQTT.MQTT(broker=aws_endpoint socket_pool=pool, ssl_context=ssl_context)

# in micropython it can be done this way with umqtt.simple
mqtt_client = MQTTClient(aws_client_id, aws_endpoint, ssl=True, ssl_params={'key': DEVICE_KEY, 'cert': DEVICE_CERT})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions