WisNode Tag LoRaWAN Payload Reference
This reference describes the LoRaWAN® uplink payload format used by WisNode Tag running TrackIT firmware. Use it to decode uplinks on TTN, ChirpStack, or a custom backend, including message type identification, common field parsing, GNSS coordinate conversion, and JavaScript decoder validation.
For device setup and pairing, refer to the Quick Start Guide.
Payload Basics
All WisNode Tag application uplinks follow the same basic parsing rules. Decode these common fields before processing the payload by message type.
| Item | Description |
|---|---|
| FPort | Application uplink payloads use FPort 2. |
| Byte order | Multi-byte fields use big-endian byte order. |
| Header | Byte 0 indicates the message type. Supported values are 0xCA, 0xCB, 0xCC, 0xCD, and 0xCE. |
| PktID | Byte 1 is the packet counter. It ranges from 0x00 to 0x1F and wraps back to 0x00 after 0x1F. |
| CRC | Payloads do not include a trailing CRC. Network Server decoders do not need to verify payload CRC. |
| Coordinates | Longitude and latitude are signed 32-bit integers. Divide the raw value by 1,000,000 to get decimal degrees (e.g. raw 121123456 → 121.123456°). |
| UTC | UTC time is encoded as a 4-byte Unix timestamp in seconds, using uint32 big-endian format. |
| Status byte | Bits 0–5 represent workmode; bit 6 indicates charging status (1 = charging, 0 = not charging). |
Uplink Message Types
WisNode Tag uses the first byte of the payload, also called the Header, to identify the uplink message type.
| Header | Name | Length | When sent | Trigger Condition |
|---|---|---|---|---|
0xCA | No location | 16 bytes | Sent when the device reports status but GNSS has no valid fix. | The device sends a regular report, but GNSS location is not available. |
0xCB | Location | 26 bytes | Sent when the device has a valid GNSS fix. | The device sends a regular report with valid GNSS longitude and latitude. |
0xCC | SOS | 18 + N bytes | Sent when SOS is triggered. | Press the round front button on the top of the device three times in succession. |
0xCD | Cancel SOS | 10 bytes | Sent when SOS is cancelled. | After SOS is triggered, press the round front button on the top of the device three times again to cancel SOS. |
0xCE | 6-level alarm | 11 bytes | Sent when a motion, vibration, shaking, or fall alarm is triggered. | Set the battery mode to Movement before using this alarm feature. |
Recommended Decoded Fields
For consistent backend integration, map decoded WisNode Tag payloads to the following fields. Not every field is included in every message type. Refer to each message type section for example payloads and decoded output.
| Field | Description |
|---|---|
type | Decoded message type, such as no_fix, position, sos, cancel_sos, or alarm. |
header | Raw header byte. For example, 202 represents 0xCA. |
pkt_id | Packet counter, ranging from 0 to 31. |
app_id | AppID or UserID, decoded as uint32. |
dev_id | DevID, decoded as uint32. |
battery | Battery level in percent, from 0 to 100. |
utc | Unix timestamp in seconds. |
workmode | Work mode value parsed from status bits 0–5. |
charging | Charging status parsed from status bit 6. |
longitude | Longitude in decimal degrees. |
latitude | Latitude in decimal degrees. |
accuracy | GNSS accuracy value, decoded as uint8. |
satellites | GNSS satellite count, decoded as uint8. |
sos_info | SOS text string. Available only in 0xCC messages. |
alarm_level | Alarm or vibration level. Available only in 0xCE messages. |
errors | Decoder validation errors, if any. |
Payload Format by Message Type
This section describes the byte-level format of each WisNode Tag uplink message. Each message type includes its payload structure, field mapping, and an example decoded output.
No location
The 0xCA message is sent when the device reports status but does not have a valid GNSS fix.
Payload length: 16 bytes
Payload structure: Header + PktID + AppID + DevID + Battery level + UTC + Status(no trailing CRC).
The 0xCA payload field map defines the byte offset, field length, field name, and decoding rule for each field.
| Offset | Length | Field | Decode as |
|---|---|---|---|
| 0 | 1 | Header = 0xCA | uint8 |
| 1 | 1 | PktID | uint8 |
| 2 | 4 | AppID | uint32 big-endian |
| 6 | 4 | DevID | uint32 big-endian |
| 10 | 1 | Battery level | uint8, percent |
| 11 | 4 | UTC | uint32 big-endian, Unix seconds |
| 15 | 1 | Status | bits 0–5 = workmode, bit 6 = charging |
Example payload:
CA 01 00 00 00 11 00 00 00 22 64 65 53 F1 00 48
Decoded output:
{
"type": "no_fix",
"header": 202,
"pkt_id": 1,
"app_id": 17,
"dev_id": 34,
"battery": 100,
"utc": 1700000000,
"workmode": 8,
"charging": true
}
Location
The 0xCB message is sent when the device has a valid GNSS fix and can report location data.
Payload length: 26 bytes
Payload structure: Header + PktID + AppID + DevID + Longitude + Latitude + Accuracy + Satellites + Battery level + UTC + Status(no trailing CRC).
The 0xCB payload field map defines the byte offset, field length, field name, and decoding rule for each field.
| Offset | Length | Field | Decode as |
|---|---|---|---|
| 0 | 1 | Header = 0xCB | uint8 |
| 1 | 1 | PktID | uint8 |
| 2 | 4 | AppID / UserID | uint32 big-endian |
| 6 | 4 | DevID / DID | uint32 big-endian |
| 10 | 4 | Longitude | int32 big-endian ÷ 1,000,000 |
| 14 | 4 | Latitude | int32 big-endian ÷ 1,000,000 |
| 18 | 1 | Accuracy | uint8 |
| 19 | 1 | Satellites | uint8 |
| 20 | 1 | Battery level | uint8, percent |
| 21 | 4 | UTC | uint32 big-endian, Unix seconds |
| 25 | 1 | Status | bits 0–5 = workmode, bit 6 = charging |
Example payload:
CB 02 00 00 00 11 00 00 00 22 07 37 FA C0 01 80 F0 48 05 08 63 65 53 F1 00 09
Decoded output:
{
"type": "position",
"header": 203,
"pkt_id": 2,
"app_id": 17,
"dev_id": 34,
"longitude": 121.109184,
"latitude": 25.227336,
"accuracy": 5,
"satellites": 8,
"battery": 99,
"utc": 1700000000,
"workmode": 9,
"charging": false
}
SOS
The 0xCC message reports an SOS event when SOS is triggered on the device.
Payload length: 18 + N bytes
Payload structure: Header + PktID + AppID + DevID + Longitude + Latitude + SOS Info(optional)(No trailing CRC).
The 0xCC payload field map defines the byte offset, field length, field name, and decoding rule for each field.
| Offset | Length | Field | Decode as |
|---|---|---|---|
| 0 | 1 | Header = 0xCC | uint8 |
| 1 | 1 | PktID | uint8 |
| 2 | 4 | AppID / UserID | uint32 big-endian |
| 6 | 4 | DevID | uint32 big-endian |
| 10 | 4 | Longitude | int32 big-endian ÷ 1,000,000 |
| 14 | 4 | Latitude | int32 big-endian ÷ 1,000,000 |
| 18 | N | SOS Info | ASCII string, no length byte |
SOS Info starts at offset 18 with no separate length field. If the payload is exactly 18 bytes, SOS Info is an empty string.
Example payload:
CC 02 00 00 04 C3 00 00 04 B4 06 7C B5 C0 02 0A 0A F0 FF FF FF FF ...
Decoded output:
{
"f_port": 2,
"type": "sos",
"header": 204,
"pkt_id": 2,
"app_id": 1219,
"dev_id": 1204,
"longitude": 108.836288,
"latitude": 34.212592,
"sos_info": "<SOS info bytes>",
"errors": []
}
Cancel SOS
The 0xCD message reports that an active SOS event has been cancelled.
Payload length: 10 bytes
Payload structure: Header + PktID + AppID + DevID(no trailing CRC).
The 0xCD payload field map defines the byte offset, field length, field name, and decoding rule for each field.
| Offset | Length | Field | Decode as |
|---|---|---|---|
| 0 | 1 | Header = 0xCD | uint8 |
| 1 | 1 | PktID | uint8 |
| 2 | 4 | AppID / UserID | uint32 big-endian |
| 6 | 4 | DevID | uint32 big-endian |
Example payload:
CD 04 00 00 04 C3 00 00 04 B4
Decoded output:
{
"f_port": 2,
"type": "cancel_sos",
"header": 205,
"pkt_id": 4,
"app_id": 1219,
"dev_id": 1204,
"errors": []
}
6-level alarm
The 0xCE message is sent when a motion, vibration, shaking, or fall alarm is triggered.
Payload length: 11 bytes
Payload structure: Header + PktID + AppID + DevID + Level(no trailing CRC).
| Offset | Length | Field | Decode as |
|---|---|---|---|
| 0 | 1 | Header = 0xCE | uint8 |
| 1 | 1 | PktID | uint8 |
| 2 | 4 | AppID / UserID | uint32 big-endian |
| 6 | 4 | DevID | uint32 big-endian |
| 10 | 1 | Level | uint8 |
Example payload:
CE 03 00 00 00 11 00 00 00 22 04
Decoded output:
{
"type": "alarm",
"header": 206,
"pkt_id": 3,
"app_id": 17,
"dev_id": 34,
"alarm_level": 4
}
JavaScript Decoder
This section provides a JavaScript decoder for WisNode Tag LoRaWAN uplink payloads. The shared decoder logic can be reused on TTN, ChirpStack, or a custom backend.
The decoder expects the payload to be provided as a byte array. TTN and ChirpStack typically provide bytes directly. If your platform provides the payload as a Base64 string, convert it to a byte array before calling the decoder.
Shared Decoder Logic
Use the following shared decoder logic to parse WisNode Tag payloads by message type.
function readUInt32BE(bytes, offset) {
return (
((bytes[offset] << 24) >>> 0) +
((bytes[offset + 1] << 16) >>> 0) +
((bytes[offset + 2] << 8) >>> 0) +
(bytes[offset + 3] >>> 0)
) >>> 0;
}
function readInt32BE(bytes, offset) {
var value = readUInt32BE(bytes, offset);
return value > 0x7fffffff ? value - 0x100000000 : value;
}
function parseStatus(status) {
return {
workmode: status & 0x3f,
charging: (status & 0x40) !== 0,
raw_status: status
};
}
function addStatusFields(decoded, status) {
var parsed = parseStatus(status);
decoded.workmode = parsed.workmode;
decoded.charging = parsed.charging;
decoded.raw_status = parsed.raw_status;
}
function readAscii(bytes, offset, length) {
var chars = [];
for (var i = 0; i < length; i++) {
var c = bytes[offset + i];
if (c === 0) {
break;
}
chars.push(String.fromCharCode(c));
}
return chars.join("");
}
function decodeTrackItPayload(bytes, fPort) {
var decoded = {
f_port: fPort,
errors: []
};
if (fPort !== 2) {
decoded.errors.push("unexpected_fport");
}
if (!bytes || bytes.length < 2) {
decoded.errors.push("payload_too_short");
return decoded;
}
var header = bytes[0];
decoded.header = header;
decoded.pkt_id = bytes[1];
switch (header) {
case 0xca:
if (bytes.length < 16) {
decoded.errors.push("invalid_0xCA_length");
return decoded;
}
decoded.type = "no_fix";
decoded.app_id = readUInt32BE(bytes, 2);
decoded.dev_id = readUInt32BE(bytes, 6);
decoded.battery = bytes[10];
decoded.utc = readUInt32BE(bytes, 11);
addStatusFields(decoded, bytes[15]);
break;
case 0xcb:
if (bytes.length < 26) {
decoded.errors.push("invalid_0xCB_length");
return decoded;
}
decoded.type = "position";
decoded.app_id = readUInt32BE(bytes, 2);
decoded.dev_id = readUInt32BE(bytes, 6);
decoded.longitude = readInt32BE(bytes, 10) / 1000000;
decoded.latitude = readInt32BE(bytes, 14) / 1000000;
decoded.accuracy = bytes[18];
decoded.satellites = bytes[19];
decoded.battery = bytes[20];
decoded.utc = readUInt32BE(bytes, 21);
addStatusFields(decoded, bytes[25]);
break;
case 0xcc:
if (bytes.length < 18) {
decoded.errors.push("invalid_0xCC_length");
return decoded;
}
decoded.type = "sos";
decoded.app_id = readUInt32BE(bytes, 2);
decoded.dev_id = readUInt32BE(bytes, 6);
decoded.longitude = readInt32BE(bytes, 10) / 1000000;
decoded.latitude = readInt32BE(bytes, 14) / 1000000;
decoded.sos_info = readAscii(bytes, 18, bytes.length - 18);
break;
case 0xcd:
if (bytes.length < 10) {
decoded.errors.push("invalid_0xCD_length");
return decoded;
}
decoded.type = "cancel_sos";
decoded.app_id = readUInt32BE(bytes, 2);
decoded.dev_id = readUInt32BE(bytes, 6);
break;
case 0xce:
if (bytes.length < 11) {
decoded.errors.push("invalid_0xCE_length");
return decoded;
}
decoded.type = "alarm";
decoded.app_id = readUInt32BE(bytes, 2);
decoded.dev_id = readUInt32BE(bytes, 6);
decoded.alarm_level = bytes[10];
break;
default:
decoded.type = "unknown";
decoded.errors.push("unknown_header_0x" + header.toString(16));
break;
}
return decoded;
}
Use the Decoder on TTN/ TTS
For The Things Network (TTN) or The Things Stack (TTS), paste the shared decoder logic above into the payload formatter, then add the following decodeUplink(input) wrapper.
function decodeUplink(input) {
var data = decodeTrackItPayload(input.bytes, input.fPort);
return {
data: data,
warnings: [],
errors: data.errors
};
}
Use on ChirpStack
ChirpStack may use different JavaScript decoder entry functions depending on the version. After adding the shared decoder logic, use one of the following entry functions.
// ChirpStack entry function - Option 1: Decode(fPort, bytes)
function Decode(fPort, bytes) {
return decodeTrackItPayload(bytes, fPort);
}
// ChirpStack entry function - Option 2: decodeUplink(input) (for compatibility with newer versions)
function decodeUplink(input) {
var data = decodeTrackItPayload(input.bytes, input.fPort);
return {
data: data,
warnings: [],
errors: data.errors
};
}
