Error: could not handle packet: gateway: invalid protocol version"

I am sending upd packet with

nc -u 1700

to lora-gateway-bridge but in lora-gateway-bridge,I have this error:

Jun 24 09:29:00 ubuntu lora-gateway-bridge[2273]: time=“2018-06-24T09:29:00+04:30” level=error msg=“gateway: could not handle packet: gateway: invalid protocol version” addr=“” data_base64=eyJzdGF0Ijp7InRpbWUiOiIyMDE0LTAxLTEyIDA4OjU5OjI4IEdNVCIsImxhdGkiOjQ2LjI0MDAwLCJsb25nIjozLjI1MjMwLCJhbHRpIjoxNDUsInJ4bmIiOjIsInJ4b2siOjIsInJ4ZnciOjIsImFja3IiOjEwMC4wLCJkd25iIjoyLCJ0eG5iIjoyfX0K

How can I fix it?

The UDP protocol is documented here:

Make sure your UDP packet is compatible with that protocol :slight_smile:

Because I use netcat and I dont use packet forwarder, Can you make a udp packet with that protocol with this info?

Bytes Function
0 protocol version = 2
1-2 random token : for example 1234
3 PULL_DATA identifier 0x02
4-11 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 :slight_smile: You don’t have to use the packet-forwarder, but you do have to use the same protocol :slight_smile:

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.