Gateway_id not arriving in MQTT message

Hi All,

I am trying to send a Tx by publishing to an MQTT with my Protobuf DownlinkFrame message. The gateway bridge claims it has in an invalid gateway_id, as it appears to be all zeroes. I have encoded my gateway_id as base64 in the protobuf message, however, and don’t know what is going wrong.

Here is the error from the gateway bridge:

INFO[23033] integration/mqtt: downlink frame received downlink_id=85506f95-0e60-4134-a4de-3d9e148a8e17 gateway_id=0000000000000000
ERRO[23033] send downlink frame error error=“get gateway error: gateway does not exist”

The protobuf message (not serialised) is this, which clearly has a gateway_id set at the end:

downlink_id: “\3405\361r\263\215G\340\276\3233\201aU\352\303”
items {
phy_payload: “eyJtOTcifQ==”
tx_info {
frequency: 916800000
power: 26
lora_modulation_info {
bandwidth: 125
spreading_factor: 7
code_rate: “4/5”
}
context: “\000\237>\253”
}
}
gateway_id: “3KYyACuL//8=”

Any advice or help would be much appreciated, as this is stopping me from sending downlinks. Thank you.

Just an update, in case anyone else has the same problem. I switched to JSON format for the MQTT payload and it works now.

If anyone has a solution to the error occurring with Protobuf, please let me know- I would love to not have to use JSON.

Kind regards,
Sam

EDIT: It seems there is another error now. Not sure if it is related, but JSON does not work either.

Could you post your code for “gateway_id as base64 in the protobuf message”? Depending on your language, that work should already be done for you when marshaling, so it could be the case that you are encoding it twice inadvertently.

Hiya Bconway,

Thanks for the reply. It is in the protobuf message:

gateway_id: “3KYyACuL//8=”

I used an online base64 converter and it came out to “dc a6 32 00 2b 8b ff ff” which is what was expected, so I think that part is correct.

Cheers