June 24, 2018, 5:29am
I am sending upd packet with
nc -u 192.168.1.106 1700
to lora-gateway-bridge but in lora-gateway-bridge,I have this error:
Jun 24 09:29:00 ubuntu lora-gateway-bridge: time=“2018-06-24T09:29:00+04:30” level=error msg=“gateway: could not handle packet: gateway: invalid protocol version” addr=“192.168.1.105:44192” data_base64=eyJzdGF0Ijp7InRpbWUiOiIyMDE0LTAxLTEyIDA4OjU5OjI4IEdNVCIsImxhdGkiOjQ2LjI0MDAwLCJsb25nIjozLjI1MjMwLCJhbHRpIjoxNDUsInJ4bmIiOjIsInJ4b2siOjIsInJ4ZnciOjIsImFja3IiOjEwMC4wLCJkd25iIjoyLCJ0eG5iIjoyfX0K
How can I fix it?
The UDP protocol is documented here:
Make sure your UDP packet is compatible with that protocol
June 26, 2018, 4:41pm
Because I use netcat and I dont use packet forwarder, Can you make a udp packet with that protocol with this info?
protocol version = 2
random token : for example 1234
PULL_DATA identifier 0x02
Gateway unique identifier (MAC address): for example : 00:0c:29:19:b2:37
Please take a look at the LoRa Gateway Bridge test-code:
It contains code that handles the
UDP <> Go struct code. You can use that as an example to generate UDP packets that are compatible with the packet-forwarder PROTOCOL.txt
You don’t have to use the packet-forwarder, but you do have to use the same protocol
Does the protocol version prepend to the message?
The full protocol is fully documented in the
PROTOCOL.txt document, linked in one of my previous posts.