For my application, I want to log the signal strengths of one LoRa node for different gateways. I have managed to log the data for a single gateway. Now, I would like to expand to multiple gateways.
I have following approach in mind:
gateway0=messageDecoded["uplink_message"]["rx_metadata"][0]["gateway_ids"]["gateway_id"]
rssi0=messageDecoded["uplink_message"]["rx_metadata"][0]["rssi"]
snr0=messageDecoded["uplink_message"]["rx_metadata"][0]["snr"]
gateway1=messageDecoded["uplink_message"]["rx_metadata"][1]["gateway_ids"]["gateway_id"]
rssi1=messageDecoded["uplink_message"]["rx_metadata"][1]["rssi"]
snr1=messageDecoded["uplink_message"]["rx_metadata"][1]["snr"]
gateway2=messageDecoded["uplink_message"]["rx_metadata"][2]["gateway_ids"]["gateway_id"]
rssi2=messageDecoded["uplink_message"]["rx_metadata"][2]["rssi"]
snr2=messageDecoded["uplink_message"]["rx_metadata"][2]["snr"]
sf=messageDecoded["uplink_message"]["settings"]["data_rate"]["lora"]["spreading_factor"]
However, in this case, it would be good for me to know how TTN orders the gateways: I think it is by the time the gateway was added but I’m not sure. Could someone comment on this please?