Nemeus Gateway: could not handle packet: json: cannot unmarshal number

Hi,

I have problems with the data reception on the gateway bridge. Nothing appears on the MQTT and I have such type of error on the gateway log.

Anyone have seen that before ?

time=“2017-10-16T19:27:14+02:00” level=info msg=“gateway: received udp packet from gateway” addr=192.168.100.112:1700 protocol_version=1 type=PushData
time=“2017-10-16T19:27:14+02:00” level=error msg=“gateway: could not handle packet: json: cannot unmarshal number 561490035414000 into Go value of type uint32” addr=192.168.100.112:1700 data_base64=AbWBANiAOW10ZAAAeyJyeHBrIjpbeyJ0bXN0Ijo1NjE0OTAwMzU0MTQwMDAsInRpbWUiOiIyMDE3LTEwLTE2VDE3OjI3OjE1LjAwMDAwMFoiLCJjaGFuIjowLCJyZmNoIjo0LCJmcmVxIjo4NjguMzAwMDAwLCJzdGF0IjoxLCJtb2R1IjoiTE9SQSIsImRhdHIiOiJTRjEyQlcxMjUiLCJjb2RyIjoiNC81IiwibHNuciI6Ni4wLCJyc3NpIjotNzEsInNpemUiOjMzLCJkYXRhIjoiZ0xmcTNBWUFBQUFCdngyWVlZblJoT3l0eHpDam9iQUZOdVRjV2lQSngyL3gifV19

Which gateway are you using? And what kind of packet-forwarder is running on this gateway?

We are using nemeus gateway with semtech packet forwarder.

Here is some typical frame received:

JSON : {"rxpk":[{"tmst":561568346652000,"time":"2017-10-17T15:12:26.000000Z","chan":0,"rfch":5,"freq":868.500000,"stat":1,"modu":"LORA","datr":"SF12BW125","codr":"4/5","lsnr":-19.0,"rssi":-133,"size":47,"data":"QAEAAAAAcACAOdMTPiPJa4njl8h30oSxAvU+om0Ncnk7bYte2Tv/2tvmj+2UcQM="}]}

JSON : {"rxpk":[{"tmst":561568353900000,"time":"2017-10-17T15:12:33.000000Z","chan":0,"rfch":3,"freq":868.100000,"stat":1,"modu":"LORA","datr":"SF12BW125","codr":"4/5","lsnr":-17.0,"rssi":-126,"size":47,"data":"QAEAAAAAcQCAV3DKvrIY8O7s8+Fgk8wzVTzRnx28yt9AlAmg5Yv47oIUO3r4Vag="}]}

JSON : {"rxpk":[{"tmst":561568358652000,"time":"2017-10-17T15:12:38.000000Z","chan":0,"rfch":5,"freq":868.500000,"stat":1,"modu":"LORA","datr":"SF12BW125","codr":"4/5","lsnr":-19.0,"rssi":-133,"size":47,"data":"gAEAAAAAcgCAug6VJ2i2h6qOTx6FsAP7rz8EhP2C8gi1Vz6uyPZVcPm8mnAtUJQ="}]}

Note that the stat packet is working fine:
JSON : {"stat":{"time":"2017-10-17 15:14:55 GMT","lati":47.495255,"long":-0.492637,"alti":32,"rxnb":37,"rxok":33,"rxfw":33,"ackr":0.0,"dwnb":0,"txnb":0,"dwla":0,"rxw2":0,"coll":0,"rxtx":0,"fwve":"nemeus-mg003-16W22-gateway-CRC00000000"}}

Seems that it’s comming from a 64bits ‘tmst’.

I’ve got an answer on the manufacturer side that they have another firmware with the tmst field using 32bits.

I will test it tomorrow.

Yes, I think that is the issue. I remember this has been reported before (not on the forum, but on GitHub). Following the packet-forwarder PROTOCOL.TXT the tmst fiels must be a 32bit unsigned integer: https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT#L135.