FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

4167 questions

4739 answers

3460 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
335 views
in Vehicle tracking by anonymous

Hi,

I've been setting up a FMC640, to send messages to Azure IoT_hub via MQTT.

I receives messages from the Device, but I don't know how to decode the massage. I have read that Teltonika uses

CODEC8/CODEC8E to encode their AVL-messages. I haven't found anything on how to decode the message.

The following is two messages that I have received on the IoT_Hub:

{
  "body": "\u0000\u0000\u0000\u0000\u0000\u0000\u0003#\b\u000e\u0000\u0000\u0001\u0006P&g\f\u0001\u0007\u0004|D!1r\u0014\u0000\u000e\u0000u\u0007\u0000\u00004\u0010\b3\u00004\u0001\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u00126\u0000\u0011B^8\u0018\u0000\u0000l\u0000\u000bm\u0000\u0003\u0000\u0000\u0000\u0000\u0001\u0006O(4\r\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^F\u0018\u0000\u0000l\u0000\u000bm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(2\u0005\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^$\u0018\u0000\u0000l\u0000\u000fm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(1\u001e\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0011\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^3\u0018\u0000\u0000l\u0000\u000bm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(.\u001d\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0011\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^/\u0018\u0000\u0000l\u0000\u0007m\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(-]\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0011\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^F\u0018\u0000\u0000l\u0000\u000fm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(*5\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0011\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^[\u0018\u0000\u0000l\u0000\u000bm\u0000\u000b\u0000\u0000\u0000\u0000\u0001\u0006O(&M\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0011\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^C\u0018\u0000\u0000l\u0000\u000fm\u0000\u000b\u0000\u0000\u0000\u0000\u0001\u0006O(\u001d\u001d\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0011\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^3\u0018\u0000\u0000l\u0000\u000bm\u0000\u000b\u0000\u0000\u0000\u0000\u0001\u0006O(\u00195\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^<\u0018\u0000\u0000l\u0000\u0007m\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(\u0013E\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^P\u0018\u0000\u0000l\u0000\u000bm\u0000\u000b\u0000\u0000\u0000\u0000\u0001\u0006O(\u0011e\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^a\u0018\u0000\u0000l\u0000\u000fm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(\u000f]\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^F\u0018\u0000\u0000l\u0000\u000bm\u0000\u0003\u0000\u0000\u0000\u0000\u0001\u0006O(\u000bu\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0011\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\u000b6\u0000\bB^\u001d\u0018\u0000\u0000l\u0000\u000fm\u0000\u0007\u0000\u0000\u000e\u0000\u0000@Y",
  "enqueuedTime": "Tue Feb 14 2023 14:39:10 GMT+0100 (Central European Standard Time)",
  "properties": {}
}
{
  "body": "\u0000\u0000\u0000\u0000\u0000\u0000\u0003#\b\u000e\u0000\u0000\u0001\u0006P):\\\u0001\u0007\u0004|D!1r\u0014\u0000\u0003\u0000\u0000\u0010\u0000\u00004\u0010\b3\u00004\u0001\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^3\u0018\u0000\u0000l\u0000\u0007m\u0000\u0003\u0000\u0000\u0000\u0000\u0001\u0006O(Z5\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^K\u0018\u0000\u0000l\u0000\u000fm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(X*\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^A\u0018\u0000\u0000l\u0000\u0007m\u0000\u000b\u0000\u0000\u0000\u0000\u0001\u0006O(TB\u0001\u0007\u0004~\u0002!1q{\u0000\u0005\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^T\u0018\u0000\u0000l\u0000\u000bm\u0000\u000b\u0000\u0000\u0000\u0000\u0001\u0006O(Re\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^l\u0018\u0000\u0000l\u0000\u000fm\u0000\u0003\u0000\u0000\u0000\u0000\u0001\u0006O(N}\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^]\u0018\u0000\u0000l\u0000\u000bm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(K\u0015\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^\u001d\u0018\u0000\u0000l\u0000\u000fm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(I\n\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0012\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^*\u0018\u0000\u0000l\u0000\u000bm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(E\"\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^z\u0018\u0000\u0000l\u0000\u000fm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(CA\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^%\u0018\u0000\u0000l\u0000\u000bm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(?]\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^\u000f\u0018\u0000\u0000l\u0000\u000fm\u0000\u0007\u0000\u0000\u0000\u0000\u0001\u0006O(=R\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^a\u0018\u0000\u0000l\u0000\u000bm\u0000\u000b\u0000\u0000\u0000\u0000\u0001\u0006O(;q\u0001\u0007\u0004~\u0002!1q{\u0000\u0006\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^3\u0018\u0000\u0000l\u0000\u000fm\u0000\u000b\u0000\u0000\u0000\u0000\u0001\u0006O(7\t\u0001\u0007\u0004~\u0002!1q{\u0000\u0007\u0000Y\u0013\u0000\u0000l\u000e\u0006\u0016\u0001G\u0003p\u0001\u0015\u0003H\u0000o\u0001\bC\u0000\u0000D\u0000\u00005\u0000\n6\u0000\u0006B^2\u0018\u0000\u0000l\u0000\u000bm\u0000\u000b\u0000\u0000\u000e\u0000\u0000`_",
  "enqueuedTime": "Tue Feb 14 2023 14:42:16 GMT+0100 (Central European Standard Time)",
  "properties": {}
}

Since I can't decode the message I don't know if it's correct or wrong.

Thanks in advance.


by anonymous

I assume your data is malformed, that is why it cannot be decoded.

The \u0003# would translate to 323 as hex values, it would be 803 as big endian 16 bit integer. There are more bytes in the message, my count is 943.

For someone who has to implement something that, please, base64 encode the data before sending it if the receiving end does not support byte arrays. 

2 Answers

0 votes
by anonymous
Hello.

MQTT is not Teltonika protocol. MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT). It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices with a small code footprint and minimal network bandwidth. MQTT today is used in a wide variety of industries, such as automotive, manufacturing, telecommunications, oil and gas, etc.

Please search for mqtt specification on the specialized services, like for example:

https://mqtt.org/

Regards
0 votes
by anonymous

Theres no good solution for multiplexing HTTP/1.1 to upstreams so websockets don’t scale very well. Is there a proxy that can terminate ws and multiplex MQTT upstream? netgear login