Issue with vernemq mqtt broker
-
Hi
I try to use vernemq with wipy.
vernemq 0.14.1
umqtt.simple (https://github.com/micropython/micropython-lib)
wipy 2 boardOn the wipy board the following code
from umqtt.simple import MQTTClient def main(server="192.168.1.150"): c = MQTTClient(b"ran", server) c.connect() c.publish(b"test/ran", b"hello") c.disconnect() if __name__ == "__main__": main()
On the other side simple consumer in paho
import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, rc): print("Connected with result code " + str(rc)) # Subscribing in on_connect() means that if we lose the connection and # reconnect then subscriptions will be renewed. # client.subscribe("$SYS/#") client.subscribe('test/ran') # The callback for when a PUBLISH message is received from the server. def on_message(client, userdata, msg): print(msg.topic + " " + str(msg.payload)) client = mqtt.Client() client.on_connect = on_connect client.on_message = on_message # client.username_pw_set('test01', password='test') client.connect("192.168.1.150", 1883, 60) # Blocking call that processes network traffic, dispatches callbacks and # handles reconnecting. # Other loop*() functions are available that give a threaded interface and a # manual interface. client.loop_forever()
When I run the publisher, this is the error on wipy:
Traceback (most recent call last):
File "", line 12, in
File "", line 6, in main
File "/flash/lib/umqtt/simple.py", line 84, in connect
IndexError: bytes index out of rangeIn the vernemq error log:
2016-11-06 20:46:13.121 [error] <0.583.0> CRASH REPORT Process <0.583.0> with 0 neighbours crashed with reason: no match of right hand value <<0,4,77,81,84,84,4,2,0,0>> in vmq_parser:parse/4 line 71
2016-11-06 20:46:13.121 [error] <0.583.0> Ranch listener {{0,0,0,0},1883} terminated with reason: {badmatch,<<0,4,77,81,84,84,4,2,0,0>>}Please let me know if you need more details
-
I did it, check this: https://github.com/micropython/micropython-lib/issues/115
-
Is this "finalized" repo?
I go to this repo and see many not implemented code
"asyncio"
"calendar"
...maybe you should ask repo admins about code?