Skip to content

Potential Bug with MQTT Client.lvlib:Client.lvclass:Ping.vi #14

@agluck28

Description

@agluck28

When implementing ping to other MQTT brokers, tested on Mosquitto, VerneMQ and HiveMQ, once the LabVIEW client sent the Ping, the broker would then disconnect the client due to an invalid message from being received.

Looking into the code, and I think there is an issue with the Ping.vi expecting a response. The response implementation uses the message ID of the packet to tie things together, however the PINGREQ type has no message ID and always defaults to a value of 0. This appears to cause the Client to respond back to the broker when it receives a PINGRESP packet, or really any packet, with a payload of 0x0000 which is an unknown packet type causing the disconnect.

By passing in the False flag for the Wait for ack input, this allows the Pings to be sent and the broker to respond as expected.

image

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions