LoRa downlink hexadecimal encoding

Hello,

I’m trying to figure the LoRa downlink hexadecimal encoding but struggling to implement it. I understand how to convert hex (15 base) to decimal (10 base) and binary (2 base) but i don’t get how the hex maps to the settings, its a little confusing hows it been explained in the instructions here . Could somebody help me?

For example, I purchased a Kona Home Sensor / Smart Room Sensor (T0004895). I’ve hooked it up to gas meter and its transmitting every time the meter impulses so i know its working which is good. However, i would like it to transmit a count of the pulses every hour to save battery power. what is the hex i need to write for this?

I’ve logged into the things network. In the instructions here it said to enter “0x AE 00 00 AF 02”. I entered the following “AE 00 00 AF 02” (The 0x just i understand now tells us that it is a hex). In the instructions it says this is what the command is.

“”"Disable the Digital Input event-driven transmission, but report the number of times the Digital Input has been triggered whenever a report is inquired (i.e. in the case of periodic reporting):

Smart Room Sensor TRM T0006338_TRM Version 1.0

TEKTELIC Communications Inc. Confidential Page 26 of 44
o DL payload: { 0x AE 00 00 AF 02 }
:black_small_square: Count Threshold set to 0 (zero)
:black_small_square: Value to Tx set to “Digital Input count” “”"

In simplistic terms, to read a value, you send its register number, like 22 for Ticks per Ambient Temperature. To write to it, you would send A2 00 08 which would write 8 to the register. It becomes A2 as 0x22 + 0x08 = 0xA2

That’s pretty much it - pick a register, to write to it, add 8 (using hex) to it’s register number and then the number which is whatever the document says you need to send in bytes which is set in hex.

Assuming you are trying to change the Digital/Analog Input and assuming you have left the Seconds per Core tick to the default of 3600 seconds, it looks like you’d need:

Set count threshold to 0 so it doesn’t transmit each time it gets a pulse:

AE 00 00 - page 24

and for the period / frequency of transmission:

A9 00 01 - page 19

Please check this rather than blindly applying them, I’m not responsible for your gas bill!

FYI, hex is referred to as base 16.