← Eggert Gudmundsson Projects

Connectivity · cellular link behaviour

CoAP Performance

Eight weeks of keepalive messages sent every 30 seconds from a bench nRF9151 to a self-hosted server. Loss follows the time of day: close to zero from 22:00 to 08:00, rising through the afternoon and peaking at 18:00–20:00, on every day with data. A later firmware period lost about a tenth as much as the earlier one, with the same daily shape.

Device
nRF9151 (cali.EGG68), on the bench, mains powered
Radio
cellular IoT, modem set to LTE-M or NB-IoT (which one carried each send was not logged)
Protocol
CoAP (Constrained Application Protocol), confirmable, over DTLS (Datagram TLS) with a pre-shared key; a new DTLS session per message
Server
self-hosted libcoap/GnuTLS server, readings stored in Postgres
Cadence
one keepalive every 30 s
Data
42,361 scored keepalive slots over 29 days, 2026-08-12 to 2026-10-09

Summary

A keepalive counts as lost when its 30-second slot has no matching record on the server. That covers both messages that never left the device and messages lost on the way. Across both periods, losses are concentrated between 09:00 and 21:00 and are close to zero the rest of the time.

Lost, Aug 12 – Sep 17

4.6%

29,417 slots, 21 days

Lost, Sep 29 – Oct 9

0.5%

12,944 slots, 8 days

22:00–08:00

≈0%

both periods

Peak, 18:00–20:00

12–14%

earlier period; ~2% in the later one

What was measured

The device sends a small text keepalive every 30 seconds, independently of its sensor data. Each one carries a sequence number, the device's uptime in milliseconds, and the modem's signal readings (RSRP, reference signal received power, and RSRQ, reference signal received quality). The keepalive began as the probe for an earlier packet-loss investigation and kept running underneath the sensor work since then, so the server holds an unbroken record of what arrived.

Uptime advances by exactly 30,000 ms between consecutive keepalives, so within one power-on period the number of keepalives that should have arrived between any two that did is known exactly. Gaps between power-on periods (device switched off, reflashed, or moved) are not counted as loss.

The daily shape

Two line charts against hour of day, 00 to 23, each with two lines: Aug 12 to Sep 17 in blue and Sep 29 to Oct 9 in orange. Panel a, loss rate in percent: both lines sit at zero from 22:00 to 08:00; the blue line rises from about 2% at 09:00 to a peak of 14% at 18:00 and stays near 13% until 20:00, then falls to zero by 22:00; the orange line follows the same pattern at a much lower level, peaking near 2% at 19:00. Panel b, each line divided by its own period average: the two lines largely overlap, both near zero overnight and three to four times their average in the early evening.
a. Share of keepalives lost in each hour of the day, per period. b. The same rates divided by each period's overall loss rate, so the shapes can be compared directly despite the tenfold difference in level. Grey bands mark 22:00–08:00. Hours are UTC, which is local time in Iceland (no daylight saving).

Loss is close to zero from 22:00 to 08:00, climbs from mid-morning, peaks at 18:00–20:00, and drops back to zero between 21:00 and 22:00. The change at 22:00 is abrupt in both periods. Panel b shows the two periods tracking each other: whatever sets the timing is the same, only the size differs.

This matches a shorter study earlier in the project, which used the device's own logs over three days in mid-August and found loss following the clock rather than how long the device had been running. The server-side record extends that to 29 days.

Day by day

Two grids of coloured cells, one row per day and one column per hour, colour from pale (no loss) to dark blue (25% or more lost), grey where there is no data. Left grid, Aug 12 to Sep 16: every row is pale overnight; afternoon and evening cells range from pale on Aug 13 and 14 to dark from 13:00 to 19:00 on Sep 14, 15 and 16. Right grid, Sep 29 to Oct 4: mostly pale, with light blue cells between 11:00 and 20:00 on Sep 29 and scattered faint cells on other days.
Loss rate for each day and hour, both periods. Grey cells have fewer than 30 minutes of scored data. Colour is capped at 25%.

The overnight quiet holds on every day with data. The daytime part does not have a fixed size: some days are nearly clean (Aug 13 and 14), others lose a quarter or more of their keepalives for hours in the afternoon (Sep 14, 15 and 16). The hourly averages above are the sum of very different days.

The two periods

The data splits into two runs separated by a gap of about twelve days. The firmware changed several times between and within them, and the analysis does not establish which change accounts for the difference in loss. One difference is clear from the data itself: until 2026-09-28 the device also sent a thermal-image frame over CoAP once a minute, alongside the keepalives. From 2026-09-29 sensor uploads were off by default and the keepalive was the only traffic. Each message opens its own DTLS session, so the earlier period carried about 50% more handshakes on the same link.

The daily shape points outside the device: it repeats on the clock regardless of when the device was powered on. Load on the serving cell over the working day is the obvious candidate, but nothing here measures it.

Method & caveats

  • About 18,500 slots could not be scored. Until 2026-10-09 the database rejected a record whose sequence number matched an earlier one. The device's sequence counter restarts at each power-on, so after a restart many keepalives that did arrive were discarded. Wherever a missing slot could have been one of these, it is excluded rather than counted as lost. The database rule has since been fixed.
  • The sequence counter is shared with other message types (the thermal frames), so gaps in sequence numbers are not lost keepalives. Expected keepalives come from the 30-second timer instead.
  • Runs of more than 20 consecutive lost slots (over 10 minutes) are treated as outages, not packet loss, and left out of the rates: five on Sep 12–13 (11 to 171 minutes) and one on Sep 30 (170 minutes).
  • Server-side interruptions would also appear as loss. For the period before 2026-10-02 there is no independent server log to rule them out.
  • One device, one location, one network. Nothing here says how another cell or another site would behave.

Data: api.readings on the project's CoAP server, exported 2026-10-09 (40,955 keepalive records), plus api.thermal_readings for the shared sequence numbers. Classification and figure scripts are kept in the device project repository, not published here.