iBTS Kerlink Fine Time Stamp

Hi All,

I have updated my old chirpstack v3 to v4 release (chirpstack-gateway-bridge and chirpstack LNS).
It seems that the AES keys are no more requested in the LNS and I am still trying to get the FineTimeStamp values from the iBTS kerlink gateways thru a MQTT topic.
Can you please help regarding this ?

1 Like

We might need to add this feature to the ChirpStack MQTT Forwarder instead. I think it is a better place to handle the decryption than in the LNS.

Hi Brocaar,

I would definitively recommand the LNS to manage the fineTimstamps during the deduplication process.
As a consequence, the unique application topic and message may include all the device uplink tx_info information (a gateway array including for each their RSSI, frequency, DR, channel, … and FineTime Stamps).
In fact, as you may know, the localisation algorithm requires these values (RSSI, frequency FineTimeStamp, DR, channel, …) to pprovide device position.

Regarding the decyphering process, it might be as you suggest in the ChirpStack MQTT Forwarder. But new API and LNS UI shall be designed to be able for a user to add the keys, as it used to be for chirpstack v3.

Please find below, from kerlink, a snippet code to decipher the finetimestamp values

#checking parameters
if [[ $# -ne 2 ]];then
    echo 'Usage : ./etime_dec.sh <etime value> <AES 128-ecb-key>'
# OpenSSL decyphering (convert from base64 to decimal, decypher, convert from bin to hex, remove trailing '0'
RESULT=$(echo -n $ETIMEFIELD | base64 -d | openssl enc -d -aes-128-ecb -K $AESKEY -nopad | xxd -u -p | sed 's/^0\+/0x/')
# Display data
echo "etime decyphered = $RESULT"
echo -n "etime real value = "
printf "%d / 10^9 / 2^5\n" $RESULT | bc -l