Hi,
In my setup i have one node with RN2483 and a gateway in RaspberryPi 3 with IC880A board. In other raspberry pi 3 i have the loraserver running.
In class A nodes it’s required to send a tx message to receive downlink in the receive windows.
With mqqt i send the next message to this topic “application/2/node/0004a30b001ebebc/tx”:
"reference": "abcd1234",
"confirmed": false,
"fPort": 10,
"object": {
"timestamp": 1522266426
}
}
As you can see in server logs the mqqt message was received:
application/2/node/0004a30b001ebebc/join {"applicationID":"2","applicationName":"SoilMoistureSensor","deviceName":"soilsensor","devEUI":"0004a30b001ebebc","devAddr":"07f60629"}
gateway/aa555a0000000101/tx {"token":47487,"txInfo":{"mac":"aa555a0000000101","immediately":false,"timestamp":763277644,"frequency":868300000,"power":14,"dataRate":{"modulation":"LORA","spreadFactor":12,"bandwidth":125},"codeRate":"4/5","iPol":null,"board":0,"antenna":0},"phyPayload":"IEeRez3JOkJD01pQqDOXC2s="}
gateway/aa555a0000000101/ack {"mac":"aa555a0000000101","token":47487}
gateway/aa555a0000000101/rx {"rxInfo":{"mac":"aa555a0000000101","timestamp":772504124,"frequency":868500000,"channel":2,"rfChain":1,"crcStatus":1,"codeRate":"4/5","rssi":-35,"loRaSNR":6.8,"size":19,"dataRate":{"modulation":"LORA","spreadFactor":12,"bandwidth":125},"board":0,"antenna":0},"phyPayload":"gCkG9gcAAAABXwOLu2wKYIF7KA=="}
application/2/node/0004a30b001ebebc/rx {"applicationID":"2","applicationName":"SoilMoistureSensor","deviceName":"soilsensor","devEUI":"0004a30b001ebebc","rxInfo":[{"mac":"aa555a0000000101","rssi":-35,"loRaSNR":6.8,"name":"Gateway","latitude":39.20153105608282,"longitude":-9.33091163635254,"altitude":112}],"txInfo":{"frequency":868500000,"dataRate":{"modulation":"LORA","bandwidth":125,"spreadFactor":12},"adr":false,"codeRate":"4/5"},"fCnt":0,"fPort":1,"data":"EBcAzP3Y","object":{"battery":{"battery":100,"temperature":64984},"soil":{"moisture":4119,"temperature":204}}}
gateway/aa555a0000000101/tx {"token":36139,"txInfo":{"mac":"aa555a0000000101","immediately":false,"timestamp":773504124,"frequency":868500000,"power":14,"dataRate":{"modulation":"LORA","spreadFactor":12,"bandwidth":125},"codeRate":"4/5","iPol":null,"board":0,"antenna":0},"phyPayload":"YCkG9gegAAA0LINk"}
gateway/aa555a0000000101/ack {"mac":"aa555a0000000101","token":36139}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:40:55Z","rxPacketsReceived":3,"rxPacketsReceivedOK":2,"txPacketsReceived":2,"txPacketsEmitted":2,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:41:25Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:41:55Z","rxPacketsReceived":1,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:42:25Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:42:55Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:43:25Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:43:55Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:44:25Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:44:55Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:45:25Z","rxPacketsReceived":1,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:45:55Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
application/2/node/0004a30b001ebebc/tx {"reference":"abcd1234","confirmed":false,"fPort":10,"object":{"timestamp":1522266426}}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:46:25Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:46:55Z","rxPacketsReceived":1,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/rx {"rxInfo":{"mac":"aa555a0000000101","timestamp":1155961820,"frequency":868100000,"channel":0,"rfChain":1,"crcStatus":1,"codeRate":"4/5","rssi":-36,"loRaSNR":10.5,"size":19,"dataRate":{"modulation":"LORA","spreadFactor":12,"bandwidth":125},"board":0,"antenna":0},"phyPayload":"gCkG9geAAQAB2j0UYy9uoLms2w=="}
application/2/node/0004a30b001ebebc/rx {"applicationID":"2","applicationName":"SoilMoistureSensor","deviceName":"soilsensor","devEUI":"0004a30b001ebebc","rxInfo":[{"mac":"aa555a0000000101","rssi":-36,"loRaSNR":10.5,"name":"Gateway","latitude":39.20153105608282,"longitude":-9.33091163635254,"altitude":112}],"txInfo":{"frequency":868100000,"dataRate":{"modulation":"LORA","bandwidth":125,"spreadFactor":12},"adr":true,"codeRate":"4/5"},"fCnt":1,"fPort":1,"data":"EBoAzv3Y","object":{"battery":{"battery":100,"temperature":64984},"soil":{"moisture":4122,"temperature":206}}}
gateway/aa555a0000000101/tx {"token":23125,"txInfo":{"mac":"aa555a0000000101","immediately":false,"timestamp":1156961820,"frequency":868100000,"power":14,"dataRate":{"modulation":"LORA","spreadFactor":12,"bandwidth":125},"codeRate":"4/5","iPol":null,"board":0,"antenna":0},"phyPayload":"YCkG9gelAQADUQcAASRsdLQ="}
gateway/aa555a0000000101/ack {"mac":"aa555a0000000101","token":23125}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:47:25Z","rxPacketsReceived":2,"rxPacketsReceivedOK":1,"txPacketsReceived":1,"txPacketsEmitted":1,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:47:55Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
gateway/aa555a0000000101/stats {"mac":"aa555a0000000101","time":"2018-04-26T19:48:25Z","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
My payload encoder function in App server is:
// - fPort contains the LoRaWAN fPort number
// - obj is an object, e.g. {"temperature": 22.5}
// The function must return an array of bytes, e.g. [225, 230, 255, 0]
function Encode(fPort, obj) {
return [obj.timestamp>>24 && 0xFF,obj.timestamp>>16 && 0xFF,obj.timestamp>>8 && 0xFF,obj.timestamp && 0xFF];
}
In RN2483 i send one message and get “ok\r\n” next “mac_tx_ok\r\n”.
Why i don’t received the message in RN2483? Should get “ok\r\n” and next “mac_rx x xxxxx”. How can i make debug to this?
Thanks