Open xiaowenlong100 opened 7 years ago
version=4 enable mqtt 3.1.1 (latest protocol version), while version=3 stick to past 3.1 version. Which broker are you testing the demo with ? does it support mqtt v3.1.1 ?
Thank you .I got a 'emqttd-windows10-v2.1.2.zip' that I download from http://www.emqtt.io/ 。It could support mqtt 3.1.1 since version emqttd-v0.3.1.
yes, Emqtt is supporting Mqtt v3.1.1 Could you try with mosquitto tools (mosquitto_pub & mosquitto_sub) with option --protocol-version mqttv311
Could you also take & send a network trace when using nyamyk demo ?
I bumped in the same issue, seems a bug on the packet length that assumes version 3 ID (3.1, MQIsdp), which is longer than version 4 (3.1.1, MQTT). Solved by toast-uz by changing at line 123 of nyamuk/mqtt_pkt.py from: self.remaining_length = 12 + payload_len to: self.remaining_length = 6 + payload_len + len(getattr(NC, 'PROTOCOLNAME{0}'.format(version)))
hello!excuse me,{ connection failed 2019-03-01 17:55:31,601 - test_nyamuk - INFO - Connecting to server ....192.168.8.7 2019-03-01 17:55:31,609 - test_nyamuk - INFO - CONNACK reveived error: Client(test_nyamuk@192.168.8.46:38106): Username 'undefined' login failed for password_undefined },how do you solve this problem?
I can't run it well when "ret = client.connect(version=4)" . "ret = client.connect(version=3)" will be OK.