Arduino-Profile-Examples icon indicating copy to clipboard operation
Arduino-Profile-Examples copied to clipboard

Transmit protocol

Open jmezzera opened this issue 5 years ago • 0 comments

I'm currently developing a project that relies on an Arduino sending data to a MQTT server over LoRa and a dragino GateWay. I'd really like to send data in JSON, however, all examples (at least the ones I found) use the format attrName1=attrValue1&attrName2=attrValue2[...]. Using this protocol, I could send data correctly and receive it in the other end; however, when a use JSON encoding, the GW receives it correctly but doesn't forward it. Logs below

Mon Aug 24 19:49:44 2020 user.notice root: [IoT.MQTT]: Check for sensor update
Mon Aug 24 19:49:44 2020 user.notice root: [IoT.MQTT]: Found Data at Local Channels: 10009
Mon Aug 24 19:49:44 2020 user.notice root: [IoT.MQTT]:  Find Match Entry for 10009
Mon Aug 24 19:49:44 2020 user.notice root: [IoT.MQTT]:  [-t] /TOPIC
Mon Aug 24 19:49:44 2020 user.notice root: [IoT.MQTT]:  [-m] {"field1":29, "field2":86,"field3":87}
Mon Aug 24 19:49:50 2020 user.notice root: [IoT.MQTT]: Check for sensor update
Mon Aug 24 19:49:52 2020 daemon.info lg02_pkt_fwd[26457]:
Mon Aug 24 19:49:52 2020 daemon.info lg02_pkt_fwd[26457]: RXTX~ Receive(HEX):3c31303030393e7b226669656c6431223a33342c20226669656c6432223a38352c226669656c6433223a38397d

Is the & encoding the only one supported or am I missing something?

jmezzera avatar Aug 24 '20 19:08 jmezzera