Dutch Sensor Systems - logo
Version 2.0 (2021-20-10)

This document describes the downlink possibilities of the IoT SoundSensor, and also contains the encryption and decryption-logic in Javascript.
Tip: Press [F12] and watch console for detailed info.


Examples in the source of this page: This document contains several functions that are copied from our working codebase. Because your local telecom provider probably differs from KPN Telecom (Dutch), you can use it as pseudo-code.
There are two downlink possibilities: transmit settings to the IoT SoundSensor and request settings from the IoT SoundSensor. After transmitting an uplink, the sensor opens a window to receive a downlink. Be aware that it can take 1 LoRa transmission interval length before the sensor can receive a downlink.

Transmit settings
After the sensor receives the settings, the sensor transmits an ACK uplink message (acknowledgement). This ACK message contains a CRC value. This value is calculated by the sensor and based on its current settings. You should use this CRC value to validate if your downlink configuration attempt succeeded.
The CRC value calculation: Polynomial is 0x8005 (Koopman calls this ANSI-16 0xC002), see Javascript for example.

The settings payload format (14 bytes):
byte indexvalue
0message type (0x03)
1correction (-6.0 - 6.0, transmitted as byte)
2GPS Mode: OFF (0x00), ONCE (0x01), INTERVAL (0x02)
3 - 6GPS interval in ms (3600000 - 43200000) Little Endian
7sample count
8 - 11transmit interval in ms (60000 - 3600000) Little Endian
12LED bit, Headphone bit, Message Info bit, Bat bit, First Timestamp bit, Last Timestamp bit, LAfast bit, LAslow bit
13LCfast bit, LCslow bit, LAeq bit, LCeq bit, LAmax bit, LAmin bit, LCmax bit, LCmin bit

The ack payload format (3 bytes):
byte indexvalue
0message type (0xC0)
1 - 2CRC value

Request settings
After the sensor receives the settings request, the sensor transmits its settings.

The request payload format (1 byte):
byte indexvalue
0message type (0x02)

The settings payload format (14 bytes, same as transmit message):
byte indexvalue
0message type (0x80)
1correction (-6.0 - 6.0, transmitted as byte)
2GPS Mode: OFF (0x00), ONCE (0x01), INTERVAL (0x02)
3 - 6GPS interval in ms (3600000 - 43200000) Little Endian
7sample count
8 - 11transmit interval in ms (60000 - 3600000) Little Endian
12LED bit, Headphone bit, Message Info bit, Bat bit, First Timestamp bit, Last Timestamp bit, LAfast bit, LAslow bit
13LCfast bit, LCslow bit, LAeq bit, LCeq bit, LAmax bit, LAmin bit, LCmax bit, LCmin bit


You can paste your own settings response payload: