Channel_index = 0, data-formats

Hello
i play around with rx_metadata and sometimes my code puts out an error Message. When channel_index = 0, there is no channel_index parameter in the JSON object. Ch_index0 Ch_index1

channel_index 0 = 868.1Mhz // but not shown
channel_index 1 = 868.3Mhz
channel_index 2 = 868.5Mhz

when i am right.

https://www.thethingsnetwork.org/docs/lorawan/frequency-plans/

in this document 1. → is 868.1Mhz, that is not matching with the channal_index right?

Channel index has no consistent meaning outside the configuration of a particular gateway. Since it’s meaningless it may be some gateways don’t report it.

You should ignore it and use the frequency given (perhaps once for the report as a whole?) instead.

Any null, zero or blank value is not included in the JSON payload courtesy of the Google Protocol Buffers to JSON convertor in use with no plans to resolve it.

1 Like

…which would be insane nonsense as 0 is a specific ordinal value in contrast to unspecified or unknown.

Except that the particular field in question at the moment is meaningless and should be ignored to begin with.

Use the frequency which is universal, not the index which reflects only a particular gateway’s local implementation detail.

Sorry i have to RTFD :confused:

Note:

Empty fields are omitted from payloads. As such, if a certain field has a value of "" , 0 or false it will not be present in the message.

https://www.thethingsindustries.com/docs/reference/data-formats/

i switch to read the frequency directly. Thanks