Azure IoT Hub - telemetry encoding

Hello!
So I’ve managed to connect my RUT240 to my Azure IoT Hub, and can receive different MQTT-messages from the device via telemetry on the hub.

Problem is, when the message arrives, it contains multiple escape-character like newline etc, “\r\n”.

Example:
“this\r\n is\r\n my\r\n mesage\r\n”

Is there any way to remove these?
From what I’ve gathered it has something to do with the encoding not being utf-8 or utf-16. Can I change this on the device-side?

Hello,

could you describe exactly what features are you using and what is being sent, as it’s very unclear what generates these messages.

What firmware version are you using?

Hello!
So I set up the service “Cloud Solution”, so the device is connected to my IoT-hub on Azure.
The configuration for this, is with MQTT-messages on the topic “events”.

Then in the I/O Juggler I’ve set up some conditions based on a signal that will be read from a sensor. Furthermore, I’ve then set up some actions and triggers, so that when the signal changes, a different MQTT-message will be sent to Azure.

The problem is, that when the messages arrives on Azure, they contain characters they are not supposed to have.
Some messages it’s escape-characters like the newline, “\r\n”, but as of now, I only need to remove the backslashes. See picture for reference.

In order for our back-end to read these messages correctly, I need those backslashes removed.
And from the information I’ve gathered, Azure documentation etc, this is supposedly because of the encoding of these messages, and they need to specifically arrive in the UFT-8 or UTF-16 encoding, for Azure to read it.

This topic was automatically closed after 15 days. New replies are no longer allowed.