eclipse / paho.mqtt-sn.embedded-c

Paho C MQTT-SN gateway and libraries for embedded systems. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
314 stars 179 forks source link

Error: Invalid MsgId publishing a message #223

Closed frabarba closed 3 years ago

frabarba commented 3 years ago

I am facing a problem using the Gateway Version: 1.4.0. When I publish a message to the gateway it is discarded by the gateway with the cause: Error: Invalid MsgId.357862090040066. The message is not forwarded to the broker, I'm sniffing with wireshark and I don't see the publish message. Using the monitor tool I have the following log: `root@it-sgn-vm-148:/opt/mqtt-sn# ./MQTT-SNLogmonitor

20201211 164424.841 CONNECT <--- 357862090040066 15 04 04 01 00 78 33 35 37 38 36 32 30 39 30 30 34 30 30 36 36 20201211 164424.841 CONNECT ===> 357862090040066 10 2E 00 04 4D 51 54 54 04 C2 00 78 00 0F 33 35 37 38 36 32 30 39 30 30 34 30 30 36 36 00 06 6E 37 74 65 73 74 00 09 54 33 73 74 32 30 31 32 21 20201211 164425.283 CONNACK <=== 357862090040066 20 02 00 00 20201211 164425.283 CONNACK ---> 357862090040066 03 05 00 20201211 164426.521 REGISTER 0031 <--- 357862090040066 14 0A 00 00 00 31 73 65 6E 73 6F 72 2F 68 65 61 74 2F 53 44 20201211 164426.521 REGACK 0031 ---> 357862090040066 07 0B 00 01 00 31 00 20201211 164428.121 SUBSCRIBE 0032 <--- 357862090040066 13 12 00 00 32 73 65 6E 73 6F 72 2F 68 65 61 74 2F 53 44 20201211 164428.121 SUBSCRIBE 0032 ===> 357862090040066 82 13 00 32 00 0E 73 65 6E 73 6F 72 2F 68 65 61 74 2F 53 44 00 20201211 164428.121 SUBACK 0032 <=== 357862090040066 90 03 00 32 00 20201211 164428.121 SUBACK 0032 ---> 357862090040066 08 13 00 00 01 00 32 00 20201211 164429.377 PUBLISH 0033 <--- 357862090040066 19 0C 00 00 01 00 33 32 33 20 64 65 67 72 65 65 73 20 43 65 6C 73 69 75 73 Error: Invalid MsgId.357862090040066 ` Using the same client but the Version: 1.3.1 of the gateway I have no problem. Do you have any idea about the cause? Thanks a lot.

image publish

ty4tw commented 3 years ago

Hi, MsgId of QoS0 Publish should be 0.

frabarba commented 3 years ago

Seem I have a bug... thanks very much. /francesco