lorabasics / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software
https://doc.sm.tc/station
Other
359 stars 183 forks source link

Downlink dntxed not sent? #71

Closed brocaar closed 2 years ago

brocaar commented 4 years ago

Station acknowledges transmit requests from the LNS with a message of type dntxed. This message is only sent when a frame has been put on air. There is no feedback to the LNS if a frame could not be sent (e.g., because it was too late, there was a conflict with ongoing transmit, or the gateway’s duty cycle was exhausted). These conditions are summarized in health status messages and do NOT trigger an individual response.

https://doc.sm.tc/station/tcproto.html#transmit-confirmation

I have compiled the latest source (bd17e53) and testing on a Raspberry Pi with the SX1302 CoreCell. Downlinks are sent successfully (the device is able to OTAA join). However, I do not receive any dntxed from the BasicStation confirming that the downlink was accepted.

beitler commented 4 years ago

Hi Orne, thanks for reporting this. Could you please compile and run station with XDEBUG and post here the logs around the downlink. That will help to pin down the problem. One thing you can check for is whether you populate the EUI field. The value deveui=0 will cause dntxed events to be dropped https://github.com/lorabasics/basicstation/blob/bd17e53ab1137de6abb5ae48d6f3d52f6c268299/src/s2e.c#L269 Thanks!

brocaar commented 4 years ago

One thing you can check for is whether you populate the EUI field. The value deveui=0 will cause dntxed events to be dropped

Thanks! That is the case as I'm not populating the DevEUI field.

Why is the DevEUI field a requirement for the dntxed? I would have expected to receive a dntxed message with deveui=0 in in this case. These is also the diid which can be used for correlation.

beitler commented 2 years ago

We added some clarifications w.r.t. the DevEui field in the docs. The expectation is that the dnmsg object contains a non-zero DevEui value. Some LNS implementations may use the DevEui to disambiguate the diid in case it is not globally unique. DevEui=0 is a reserved value which is used internally identify txjobs which don't require a dntxed message - multicast, etc.

brocaar commented 2 years ago

Thanks for adding this to the docs :+1: