Hello,
I'm using a raspberry pi pico w to connect to a mqtt server. The clean sesssion connection works pretty well but when I try to use client.connect(False) it returns the error: OSError: [Errno 12] ENOMEM
Here a snippet of the code:
`
from umqtt.robust import MQTTClient
def mqtt_connect():
client = MQTTClient(client_id, mqtt_server, port, username, pwd, keepalive=3600)
client.set_callback(on_message)
client.on_message = on_message
while (client.connect(False) != 0):
print('Waiting for MQTT connection...')
sleep(1)
print('Connected to %s MQTT Broker'%(mqtt_server))
client.subscribe(topic_sub)
print("Connected to %s, subscribed to %s topic" % (mqtt_server, topic_sub))
return client
`
and the Error:
Waiting for MQTT connection...
Waiting for MQTT connection...
Waiting for MQTT connection...
Waiting for MQTT connection...
Waiting for MQTT connection...
Traceback (most recent call last):
File "", line 189, in
File "", line 71, in mqtt_connect
File "/lib/umqtt/simple.py", line 66, in connect
OSError: [Errno 12] ENOMEM
Hello, I'm using a raspberry pi pico w to connect to a mqtt server. The clean sesssion connection works pretty well but when I try to use client.connect(False) it returns the error: OSError: [Errno 12] ENOMEM
Here a snippet of the code:
` from umqtt.robust import MQTTClient def mqtt_connect():
` and the Error:
Waiting for MQTT connection... Waiting for MQTT connection... Waiting for MQTT connection... Waiting for MQTT connection... Waiting for MQTT connection... Traceback (most recent call last): File "", line 189, in
File "", line 71, in mqtt_connect
File "/lib/umqtt/simple.py", line 66, in connect
OSError: [Errno 12] ENOMEM
Can you help me please?
Thanks