LabVIEW Error 1369 or Incorrect Character in MQTT Subscriber Message

Updated Jul 28, 2023

Reported In

Software

  • LabVIEW

Issue Details

  • I am using the 3rd party MQTT toolkit provided by LabVIEW Open Source Project to publish and subscribe to MQTT messages. I can publish the messages successfully, but my Subscriber is reading anomalous characters such as "?" or "".
  • When my MQTT Subscriber in LabVIEW reads messages, it sometimes generates error 1369. What is causing this?
  • Whenever I read MQTT messages in LabVIEW, I see the below error. How can I resolve this?
Error 1396 occurred at ??? in <VI name>
Possible reason(s):
LabVIEW: (Hex 0x574) Cannot convert text from the source character set to the destination character set.


MQTT error.PNG

Solution

This error occurs due to incorrect message syntax or Quality of Service (QoS) level. Refer to the steps below to identify which needs changing:
  1. MQTT messages should consist of only ASCII characters and avoid using spaces or special characters where possible.
  2. Increase the QoS Level to 1 or 2.
    • Characters may be read incorrectly if using a QoS Level of 0 or "At Least Once".

Additional Information

For more information on MQTT syntax and structure, refer to [External] MQTT Topic Structure and Syntax.