Hi,
I am using LoPy and custom code for the sensor, so it MIGHT BE my mistake (but so far no clue whats wrong).
What:
I send the command to MQTT server:
{“fPort”:1,“data”:“bGVkRW5hYmxlLHRydWU=” , “confirmed”: true}
This reaches succesfully the device and device acts accordingly: it sends up message, what can be observed on a gateway:
JSON up: {“rxpk”:[{“tmst”:4043324075,“chan”:1,“rfch”:1,“freq”:868.300000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:9.5,“rssi”:-46,“size”:29,“data”:“QCzwvQKAuh0CTV78tVq0IKBjWj+TYKFKOhdYxKg=”}]}
INFO: [up] PUSH_ACK received in 0 ms
INFO: [down] PULL_RESP received - token[0:0]
JSON down: {“txpk”:{“imme”:false,“tmst”:4044324075,“freq”:868.3,“rfch”:0,“powe”:14,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“ipol”:true,“size”:32,“data”:“oCzwvQKFsgEDUgcAAQFj21hf/gNOZxEMFbwPovEyuK0=”}}
INFO: tx_start_delay=1495 (1495.500000) - (1497, bw_delay=1.500000, notch_delay=0.000000)
as well as on the server:
Nov 30 22:56:59 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:56:59+01:00” level=info msg=“gateway: received udp packet from gateway” addr=192.168.1.29:35358 protocol_version=2 type=PullData
Nov 30 22:56:59 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:56:59+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=192.168.1.29:35358 protocol_version=2 type=PullACK
Nov 30 22:57:00 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:57:00+01:00” level=info msg=“gateway: received udp packet from gateway” addr=192.168.1.29:44355 protocol_version=2 type=PushData
Nov 30 22:57:00 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:57:00+01:00” level=info msg=“gateway: rxpk packet received” addr=192.168.1.29:44355 data=QCzwvQKAsR0CELWWUUIX7I9HwXMaZ2fNuOjzh389 mac=a21c52fffe9dbbfa
Nov 30 22:57:00 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:57:00+01:00” level=info msg=“backend: publishing packet” topic=“gateway/a21c52fffe9dbbfa/rx”
Nov 30 22:57:00 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:57:00+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=192.168.1.29:44355 protocol_version=2 type=PushACK
Nov 30 22:57:00 LoRa loraserver[423]: time=“2017-11-30T22:57:00+01:00” level=info msg=“backend/gateway: rx packet received”
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“packet(s) collected” dev_eui=70b3d54999134adf gw_count=1 gw_macs=a21c52fffe9dbbfa mtype=UnconfirmedDataUp
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“rx info sent to network-controller” dev_eui=70b3d54999134adf
Nov 30 22:57:01 LoRa lora-app-server[577]: time=“2017-11-30T22:57:01+01:00” level=info msg=“handler/mqtt: publishing data-up payload” topic=“application/1/node/70b3d54999134adf/rx”
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“mac-command block added to queue” cid=LinkADRReq dev_eui=70b3d54999134adf frmpayload=false
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“adr request added to mac-command queue” dev_eui=70b3d54999134adf dr=5 nb_trans=0 req_dr=5 req_nb_trans=1 req_tx_power_idx=2 tx_power=0
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“device-session saved” dev_addr=02bdf02c dev_eui=70b3d54999134adf
Nov 30 22:57:01 LoRa lora-app-server[577]: time=“2017-11-30T22:57:01+01:00” level=info msg=“device-queue item updated” id=1
Nov 30 22:57:01 LoRa lora-app-server[577]: time=“2017-11-30T22:57:01+01:00” level=info msg=“data-down item requested by network-server” confirmed=true dev_eui=70b3d54999134adf fcnt=425 id=1
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“received data down from application” confirmed=true data_base64=“C/IRc/rx46A5BP6a25s=” dev_eui=70b3d54999134adf fcnt=425 more_data=false
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“pending mac-command block set” cid=LinkADRReq commands=1 dev_eui=70b3d54999134adf frm_payload=false
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“mac-command block removed from queue” cid=LinkADRReq dev_eui=70b3d54999134adf
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“backend/gateway: publishing tx packet” topic=“gateway/a21c52fffe9dbbfa/tx”
Nov 30 22:57:01 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:57:01+01:00” level=info msg=“backend: packet received” topic=“gateway/a21c52fffe9dbbfa/tx”
Nov 30 22:57:01 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:57:01+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=192.168.1.29:35358 protocol_version=2 type=PullResp
Nov 30 22:57:01 LoRa loraserver[423]: time=“2017-11-30T22:57:01+01:00” level=info msg=“device-session saved” dev_addr=02bdf02c dev_eui=70b3d54999134adf
Nov 30 22:57:01 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:57:01+01:00” level=info msg=“gateway: received udp packet from gateway” addr=192.168.1.29:35358 protocol_version=2 type=TXACK
Nov 30 22:57:01 LoRa lora-gateway-bridge[417]: time=“2017-11-30T22:57:01+01:00” level=info msg=“gateway: tx ack received” mac=a21c52fffe9dbbfa random_token=0
So the question is: why lora-app-server schedules the payload forever and does not clean the message in the queue?
loraserver_app=# SELECT * from downlink_queue;
id | reference | dev_eui | confirmed | pending | fport | data
-----±----------±-------------------±----------±--------±------±---------------------------------
223 | | \x70b3d54999134adf | t | t | 1 | \x6c6564456e61626c652c66616c7365
(1 row)
I suspect the LoPy for some reason does not send confirmation in the first place, cause: I do not see it on GW nor I can see it in the loraserver log (in straigthforward consequence).
This bite me since some time, I had this tested and working (confirmations) and now with the simplest python code I can’t them have back.
Best,
SB