Skip to content

EV_TXCOMPLETE taking time to occur : Arduino Pro mini + LoRa RFM95W #293

@fguiet

Description

@fguiet

Hi,

Here is my configuration:

Use case

Issue

When no water is consumed, my module sends a LoRa message every hour including battery voltage...

As you can see on the log below, the first message occurs one hour after the module has started.
Ok, everything fine here ... EV_TXCOMPLETE occurs 2sec after paket queued which seems to be ok.
But...starting from the second message....you can see that the EV_TXCOMPLETE event occurs 12min45s after packet has been queued ...
Even worst on the third message...EV_TXCOMPLETE event occurs after 23min from paket queued ...
Then on the 4th...everything's fine again....

Can someone have an explanation ? and a workaround ?

I forgot to mention that I did not see any problems when I am consuming water ... because (I thing) messages are sent very often...The problem seems to occur when no message has been sent for a long time (here one hour).

2 things I have already tried :

  1. Before calling : LMIC_setTxData2

LMIC.bands[BAND_MILLI].avail = os_getTime();
LMIC.bands[BAND_CENTI].avail = os_getTime();
LMIC.bands[BAND_DECI].avail = os_getTime();

  1. During setup

LMIC_setClockError(MAX_CLOCK_ERROR * 10 / 100);

Here a log:

20:43:42.452 -> Setup completed, starting...
21:43:48.086 -> Sending battery voltage info
21:43:48.086 -> Sending message
21:43:48.086 -> Time is : 3600005
21:43:48.182 -> Packet queued
21:43:50.490 -> 225150989: EV_TXCOMPLETE (includes waiting for RX windows)
21:43:50.490 -> Time is : 3602421

22:43:54.173 -> Sending battery voltage info
22:43:54.173 -> Sending message
22:43:54.173 -> Time is : 7200006
22:43:54.268 -> Packet queued
22:55:39.098 -> 225547350: EV_TXCOMPLETE (includes waiting for RX windows)
22:55:39.098 -> Time is : 7903731

23:44:00.286 -> Sending battery voltage info
23:44:00.286 -> Sending message
23:44:00.286 -> Time is : 10800007
23:44:00.380 -> Packet queued
00:07:27.680 -> 225942112: EV_TXCOMPLETE (includes waiting for RX windows)
00:07:27.680 -> Time is : 12205015

00:44:06.439 -> Sending battery voltage info
00:44:06.439 -> Sending message
00:44:06.439 -> Time is : 14400008
00:44:06.533 -> Packet queued
00:44:08.810 -> 363280267: EV_TXCOMPLETE (includes waiting for RX windows)
00:44:08.857 -> Time is : 14402424

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions