Supported gateways?

Dear,

Thanks fr this information.

I am able to connect the iBTS to the chirpstack following the steps provide into https://www.chirpstack.io/gateway-bridge/install/config/

I want now to check that the Network Server is able to decode the Finestamp according to the AES key relatd to the gateway.

Using this script (from kerlink)

#!/bin/bash
 
#checking parameters
if [[ $# -ne 2 ]];then
    echo 'Usage : ./etime_dec.sh <etime value> <AES 128-ecb-key>'
    exit
fi
 
ETIMEFIELD=$1
AESKEY=$2
 
# 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

with the

  • AESKEy provided by Kerlink, and

  • ETIMEFIELD comes from the json provided by application server (encryptedNS key)

    {
    “gatewayID”: “cnb/AC4HAms=”,
    “time”: “2020-11-17T13:26:45.234780Z”,
    “timeSinceGPSEpoch”: null,
    “rssi”: -66,
    “loRaSNR”: 14,
    “channel”: 5,
    “rfChain”: 0,
    “board”: 21,
    “antenna”: 0,
    “location”: {
    “latitude”: !!!,
    “longitude”: !!!,
    “altitude”: 260,
    “source”: “UNKNOWN”,
    “accuracy”: 0
    },
    “fineTimestampType”: “ENCRYPTED”,
    “encryptedFineTimestamp”: {
    “aesKeyIndex”: 0,
    “encryptedNS”: “65EGqvNJ/PaaLVC7GrmMIg==”,
    “fpgaID”: null
    },
    “context”: “C499XA==”,
    “uplinkID”: “44iaSgU2Qtiki0ZRcRZG9g==”,
    “crcStatus”: “CRC_OK”
    }

I am able to verify the AESKey.

My questions are the following :

  1. how to configure Chirpstack to get the fineTimestmp decoded with nanosecond resolution ?

In the Gateway configuration, I have updated

Board #0 configuration

with

FPGA ID

(I don’t know if this is very usefull …)

and

Fine-timestamp decryption key

provided by Kerlink, the same that I have used to validate the script from Kerlink.

  1. What about MSB / LSB / Hex String / Hex Array ???

  2. How to validate that the Chripstack NEtwork Server as been able to decipher the finestamp ?

In fact, according to https://github.com/brocaar/chirpstack-api/blob/master/protobuf/gw/gw.proto

	enum FineTimestampType {
        	    // No fine-timestamp available.
        	    NONE = 0;
        	    // Encrypted fine-timestamp.
        	    ENCRYPTED = 1;
        	    // Plain fine-timestamp.
        	    PLAIN = 2;
        	}

I am not sure that a DECIPHER key is updated in the json data.

Note that I have also try to send finestamps in plain normally deciphered by the iBTS itself as explained by Kerlink (for debug purpose only):

To activate deciphering from the gateway, edit the frequency plan (in  `/user/etc/lorad/` ):

* `“aes_key”: “00112233445566778899AABBCCDDEEFF”,`

* `“fine_timestamp_decrypt_enable”: true,`

Thanks for your support.

Nicolas