The network server will wait until the last moment before a packet needs to be sent in case the application has data to send with the current downlink. We have found that occasionally the network server cannot service the packet to be sent the radio before the timestamp expires.
Increasing the priority of the network server and packet forwarder reduce the occurrence of a late packet. Our next release will contain this fix.
renice -n -20 $(pgrep lora-network-se)
renice -n -20 $(pgrep basic_pkt_fwd)
mDot.h – you case pass false as the second parameter to do non-blocking send.
/** Send data to the gateway
* validates data size (based on spreading factor)
* @param data a vector of up to 242 bytes (may be less based on spreading factor)
* @returns MDOT_OK if packet was sent successfully (ACKs disabled), or if an ACK was received (ACKs enabled)
*/
int32_t send(const std::vector<uint8_t>& data, const bool& blocking = true, const bool& highBw = false);