-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep Alive bytes swapped #1
Comments
A related question: In mqttTCPIPserver.vi, in the "Keep Alive Loop" at the bottom, there is a 'wait on notification' function with a subsequent case structure. The selector for the case structure is now connected to the 'timed out?' terminal of the 'wait on notification' function. Wouldn't it be more logical to connect the case selector to the 'notification' terminal instead? Or am I misinterpreting your intention? |
Victor, What have you figured out for both of these issues? I'm using this MQTT model also.. I'm having problems with time outs. Any help would be much appreciated. Thanks Steve |
Together with a colleague I made some modifications to this library, I'll see if I can upload them from my work computer tomorrow. It's in LabVIEW version 2017 now. |
Victor,
thanks that would be great! I found the byte swap and removed it. Any other nuggets besides the Keepalive timeout that you found?
Thanks
Steve
Steve Young
[email protected]
… On May 1, 2018, at 1:04 PM, victorclaessen ***@***.***> wrote:
Together with a colleague I made some modifications to this library, I'll see if I can upload them from my work computer tomorrow. It's in LabVIEW version 2017 now.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#1 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHj2nuuUdfQbIuh0jxHZVmJCv251kzUUks5tuL-7gaJpZM4SB-gO>.
|
I'm sorry I just realised I totally forgot about this. The most important thing we added was to make sure to flush the outgoing packet queue before reconnecting, otherwise upon reconnect some data/publish packets get sent out before the packets that establish the connection with the broker (sort of login packets), which will confuse the broker to the point that it just disconnects. https://github.com/victorclaessen/mqtt-LabVIEW I also made an example program (kind of targeted for internal use with out broker) where I tried to put everything in as few subVI/structures as I could to keep the main program small. (requires the above library). https://github.com/victorclaessen/example_mqtt_LabVIEW_program Hope that helps. Victor |
You Rock... thx
Steve Young, CTO
BAMLabs inc
… On May 4, 2018, at 2:38 PM, victorclaessen ***@***.***> wrote:
I'm sorry I just realised I totally forgot about this. The most important thing we added was to make sure to flush the outgoing packet queue before reconnecting, otherwise upon reconnect some data/publish packets get sent out before the packets that establish the connection with the broker (sort of login packets), which will confuse the broker to the point that it just disconnects.
https://github.com/victorclaessen/mqtt-LabVIEW
I also made an example program (kind of targeted for internal use with out broker) where I tried to put everything in as few subVI/structures as I could to keep the main program small. (requires the above library).
https://github.com/victorclaessen/example_mqtt_LabVIEW_program
Hope that helps.
Victor
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi, thanks for making this library. It's really nice!
However, I think I found a bug:
The MQTT spec (3.1.2.10) specifies that the Keep Alive bytes are in order MSB, LSB. But in mqttCmdConnect\mqttCmdBuildVarHdr.vi the high and low bytes of the keepalive value are swapped before building the CONNECT header. I suspect that that swap is unnecessary, and results in the wrong value being used by the broker for the keep alive time. I verified that with Wireshark by checking the transmitted TCP packet of the CONNECT command.
Best regards,
Victor
The text was updated successfully, but these errors were encountered: