Communication with lora gateway bridge directly


I am trying to send messages to a gateway directly. If I send it using application server it is reaching packet forwarder and node both.

But if I send the same payload to gateway bridge via Mosquito_pub it does not reach packet forwarder however it reaches to mqtt server and I checked in wireshark, the gateway bridge does not create the packet at all.

What is the communication protocol to be used to connect to gateway bridge directly via mosquitto_pub.

See the two payload sections in the Gateway Bridge docs:

By default it uses protobuf.

I called the api using swagger with following payload
“deviceQueueItem”: {
“confirmed”: false,
“data”: “SGVsbG8=”,
“devEUI”: “70b3d58f88000088”,
“fCnt”: 0,
“fPort”: 2

The packet was received in the node and I intercepted the MQTT by subscribing to the topic and output is like below.

gateway/b827ebffff820998/command/down 0a12608800008890360002721734992b5529c8ee12280a08b827ebffff82099828f0819a9d03301b820104089aa5ab420b087d100c1a03342f3520016a0018c99e0122104f494c6373bc4877a9185aa0add2be5f2a340a12608800008890360002721734992b5529c8ee121e28f0819a9d03301b820104089aa5ab420b087d100c1a03342f3520016a003208b827ebffff820998

I sent the same message using the MQTT_publisher using a python script

a = '0a12608800008890360002721734992b5529c8ee12280a08b827ebffff82099828f0819a9d03301b820104089aa5ab420b087d100c1a03342f3520016a0018c99e0122104f494c6373bc4877a9185aa0add2be5f2a340a12608800008890360002721734992b5529c8ee121e28f0819a9d03301b820104089aa5ab420b087d100c1a03342f3520016a003208b827ebffff820998'
client.publish('gateway/b827ebffff820998/command/down' +" "+ a)

But this packet does not reach the packet forwarder but it is seen clearly the MQTT_SUB

What might be wrong in my approach.

Your version of the publish is likely sent as a string and not bytes.

I got the issue, thank you . we had to unhexlify it.

But how do we form this payload ourselves. I read through the protobuf document, I was able to trace the phypayload , gateway id and couple of other parameters but could not decode other bytes.
Is there any document or tool to decode?

Have you looked at ? It includes all the protobuf definitions and compiled libraries for a bunch of languages.