Solutions

OTA firmware at 76.8 kbps: what fits and how long it takes

Over-the-air updates on a 470 MHz link are decided by packet size and ACK overhead, not the headline rate. A worked 512 kB image, with resume arithmetic.

A 512 kB firmware image is a small file on a desk and a long afternoon on a 470 MHz link. The number that decides whether over-the-air updates are practical is not the radio's headline rate but the wall-clock time to move the image, and that time is set by packet size, acknowledgement overhead and how much of the duty cycle you are allowed to use.

76.8 kbps is 9.6 kB per second, and you will not see 9.6

Convert once and remember the number: 76.8 kbps is 9600 bytes per second of channel time. A 512 kB image is 524,288 bytes, so the theoretical floor is 54.6 seconds. Three things push the real figure higher — framing bytes, the acknowledgement that follows every packet, and the pauses a store-and-forward terminal takes to hand bytes to flash.

With the settings the hardware actually exposes, the practical figure for a 512 kB image is about 59 seconds at 76.8 kbps, 3.8 minutes at 19.2 kbps and 29.7 minutes at 2.4 kbps. That spread is the whole design space. Pick the fastest mode and the update fits in a coffee break; pick the slowest and you are scheduling an overnight window per site.

Delivery time for a firmware image at three air rates, computed from packet arithmetic

The chart is computed, not measured: 800-byte payloads, 12 bytes of framing per packet, 6 ms of acknowledgement and turnaround per packet. Change any of those three and the curve moves, but the shape does not — time scales linearly with image size and inversely with rate, and the constant offset from the acknowledgement hurts most at the fast end.

The arithmetic of one packet

Everything below follows from a single expression. Per-packet wall time is the payload plus framing at the configured rate, plus the turnaround:

t_pkt = (P + F) * 8 / R + t_ack
G     = P / t_pkt                      # goodput, B/s
T     = ceil(size / P_max) * t_pkt     # whole image, s

P = payload bytes per packet (spec max 800)
F = framing bytes: preamble + sync + header + CRC (assumption: 12)
R = air-interface data rate, bit/s
t_ack = acknowledgement + radio turnaround (assumption: 6 ms)

Air rate

Per-packet time, 800 B

Goodput

Share of the 9600 B/s channel

Channel bytes eaten by the 6 ms ACK

2.4 kbps

2712.7 ms

295 B/s

98.3%

1.8 B

19.2 kbps

344.3 ms

2323 B/s

96.8%

14.4 B

76.8 kbps

90.6 ms

8832 B/s

92.0%

57.6 B

The last column is the part most teams miss. Six milliseconds of turnaround is a rounding error at 2.4 kbps and a 58-byte tax at 76.8 kbps, because the radio could have sent 58 bytes in that time. Efficiency therefore falls as the rate rises, and it falls much faster if the payload shrinks.

Channel efficiency versus payload size at 76.8 kbps

At 32-byte payloads the link delivers 31.5% of its capacity. At 256 bytes it is 78.6%, and at the specified maximum of 800 bytes it is 92.0%. If a protocol designer caps packets at 64 bytes "to keep them small", a 512 kB update stretches from 59 seconds to roughly 1.9 minutes before any retransmission. The fix is not a faster radio; it is fewer, fuller packets.

What the hardware already gives you

Two terminals in the catalogue cover the two common shapes: a DIN-rail RS485 unit and an outdoor IP65 unit. Both expose 76.8 kbps as the top rate, which makes them the interesting cases for firmware distribution.

Parameter

TP5603-D01L10 (485)

TP5500

Air-interface data rate

1.2 / 2.4 / 4.8 / 9.6 / 19.2 / 76.8 kbps

2.4 / 19.2 / 76.8 kbps

Max payload per packet

800 bytes

not published in the spec table

Transmit power

17 dBm

26 ± 1 dBm

Receiver sensitivity

-116 dBm

-116 dBm @ 19.2 kbps, 470 MHz

Serial side

RS485, 2400–115200 baud

RS485 + RS232

Local update path

BLE 5.1 for configuration and upgrade

none listed

Supply / consumption

DC 12 V typical (8–28 V), ≤ 1 W

DC 12 V (5–28 V), ≤ 1 W

Operating temperature

-40 to +70 °C

-40 to +70 °C

The BLE 5.1 interface on the TP5603-D01L10 is worth separating from the radio path. Over the air, 512 kB costs about a minute and a half of duty cycle at 76.8 kbps; over BLE at an application throughput of 20 kB/s it is 26 seconds, and at 50 kB/s it is 10.5 seconds (generic BLE figures, not a published product specification). For a technician standing at the cabinet, the local path is the right tool. The over-the-air path is for the other 200 cabinets nobody is standing at, where a minute of air time is cheap and a site visit is not.

The outdoor TP5500 trades serial flexibility for link margin: 26 dBm into the same -116 dBm sensitivity figure, with no local update interface listed. That makes its OTA path the only path, which sets the bar for how robust the transfer has to be before it is deployed at a water site.

The quiet cost of the fast mode: 6 dB

Sensitivity and rate trade against each other. The published figure is -116 dBm at 19.2 kbps; at four times the bandwidth the noise floor rises by 10·log10(4) = 6.0 dB, so the usable sensitivity at 76.8 kbps is about -110 dBm (estimate, not a published specification). In free space, 6 dB is a factor of two in range: 10^(6/20) = 2.0.

That is the trade the rate selector hides. A site that closes the link at 19.2 kbps with 8 dB of margin will close it at 76.8 kbps with 2 dB — enough on a quiet day, not enough in rain or with a truck parked in the Fresnel zone. Because a failed update is not a smaller update but a retried one, the fast mode can easily be the slower choice. Before scheduling anything at 76.8 kbps, measure the margin as described in why -90 dBm can beat -80 dBm and pick the rate from that number, not from the datasheet's best case.

Fragmentation that survives a power cut

A 512 kB image is 656 packets at the maximum payload. Sending them as an undifferentiated stream means any interruption restarts the whole transfer, and at 76.8 kbps an interruption is not rare: a watchdog reset, a brownout during flash erase, a gateway that reboots its scheduler.

The protocol that survives this is a small manifest plus block acknowledgement. The image is cut into 4 kB blocks, each block has a CRC, and the receiver persists its progress after every block.

MANIFEST = {
    "image_id": "tp5603-1.4.2",
    "size": 524288,
    "sha256": "…",            # of the whole image
    "block": 4096,
    "block_crc": [0x1a2b, …], # one CRC per 4 kB block
}

# receiver side, persisted across reboots
state = {"image_id": None, "next_block": 0, "bitmap": bytearray(16)}

def on_block(seq, payload, crc):
    if crc32(payload) != MANIFEST["block_crc"][seq]:
        return {"ack": seq, "status": "crc_error"}      # ask for the same block
    flash.write(IMAGE_BASE + seq * 4096, payload)
    state["bitmap"][seq // 8] |= 1 << (seq % 8)
    state["next_block"] = seq + 1
    persist(state)                                       # one page, after every block
    return {"ack": seq, "status": "ok"}

def resume():
    return {"image_id": MANIFEST["image_id"],
            "from_block": state["next_block"],
            "bitmap": bytes(state["bitmap"])}

This is the same idea the CoAP block-wise extension standardises for constrained nodes: RFC 7959 defines Block1/Block2 options with block sizes from 2^4 to 2^10 bytes, precisely so a receiver can fetch a large representation in pieces without depending on IP fragmentation. A 4 kB block sits above that range on purpose — it is the erase granularity of most external flash, and it keeps the resume bitmap small: 128 blocks, 16 bytes, for a 512 kB image.

The storage side needs the same discipline. MCUboot's design uses two image slots plus a scratch area sized to the largest flash sector: 4 kB on many parts, 128–256 kB on some. Budget for it before promising an update path:

Image size

A/B slots

Scratch (4 kB sectors)

Total flash before bootloader and settings

256 kB

512 kB

4 kB

516 kB

512 kB

1024 kB

4 kB

1028 kB

1024 kB

2048 kB

4 kB

2052 kB

A 1 MB part cannot host A/B updates of a 512 kB image. It can host overwrite-only updates, which remove the rollback path — a trade many teams make without noticing, because nothing in the build fails when the second slot does not fit.

Failure modes at 76.8 kbps

The failures below are the ones that show up in commissioning, not in the lab.

Symptom

Mechanism

How to prove it

Transfer stalls near the end, then times out

Flash erase blocks the task that feeds the radio, so packets arrive late and the peer gives up

Log per-block timestamps; a 200 ms gap every 4 kB points at erase

Resume restarts from zero after a power cut

Block bitmap lived in RAM

Power-cycle mid-transfer at 50%; the first request after boot must name block ~64, not 0

CRC errors cluster on full 800-byte packets

Long continuous transmit heats the PA or exposes a poor match, and only long bursts fail

Repeat with 256-byte payloads; if errors vanish, fix the RF path before blaming the protocol

Update takes nine minutes at 76.8 kbps

Serial port is the bottleneck, not the radio

9600 8N1 is 960 B/s → 546 s for 512 kB; set 115200, which is 11.5 kB/s and no longer limiting

Terminal resets during the write

Supply droop while flash draws current; 8 V on a 12 V rail that sagged

Scope the DC input during erase, not during idle

Update succeeds, device boots old firmware

Swap never completed: scratch smaller than the largest sector

Read the bootloader's swap status byte after the first reboot

Two of these are worth designing out rather than debugging later. The serial bottleneck is a one-line configuration change, and the erase stall disappears if the receiver writes 4 kB blocks ahead of the arriving stream and feeds the watchdog inside the erase loop.

One image, one interruption: 512 kB end to end

Put the pieces together. A 512 kB image at 76.8 kbps is 656 packets of 90.6 ms, which is 59.4 seconds of channel time. Suppose the link drops three times during the window — a plausible rate on a site with marginal margin.

If the receiver restarts from zero on every drop, the expected cost is the full elapsed time plus, on average, half the image per interruption: 59.4 + 3 × 29.7 ≈ 149 seconds. If it resumes from the last good 4 kB block, each interruption costs one block (0.43 s of air time) plus 1.5 s to re-attach: 59.4 + 3 × 1.9 ≈ 65 seconds. The difference is 84 seconds per update per site, and it grows linearly with the number of drops.

Total time to finish a 512 kB update with block-level resume versus restarting from zero

The same arithmetic explains why resuming matters more than a faster radio: doubling the rate saves 30 seconds on a clean link, while resuming saves 84 seconds on an interrupted one, and interrupted links are the ones that run at night on a schedule.

Verifying it in the field, in ten minutes

Do this before scheduling the first production update, on one terminal that represents the site:

  1. Send a 64 kB test payload and time it. At 76.8 kbps expect roughly 7.4 s (64 kB is 82 packets × 90.6 ms); at 19.2 kbps expect 28 s. Anything more than 15% slower means packets are being retried or the serial side is throttling.
  2. Read the RSSI and set the rate from the margin, not from the datasheet. A site with less than 10 dB of margin should be updated at 19.2 kbps.
  3. Cut power at roughly half of a 256 kB transfer and time the recovery. The first request after boot must name a block near the middle of the image; if it names block 0, the bitmap is not persisted.
  4. Pull the antenna for five seconds mid-transfer and watch the retry behaviour. The receiver should keep its progress and the sender should resume, not restart.
  5. Confirm the serial speed at both ends and log one full update with per-block timestamps. A clean run has no gap longer than about 60 ms between blocks at 76.8 kbps.

If steps 3 and 4 pass on the bench, the update will survive a substation outage. If they fail, no amount of air rate will save the rollout.

FAQ

Can a 512 kB update fit inside a 1% duty cycle?

Not in one session. 512 kB is 54.6 seconds of pure air time at 76.8 kbps, so a 1% duty cycle means about 91 minutes of wall clock; at 5% it is 18 minutes and at 10% it is 9 minutes. Where duty cycle is constrained, the practical pattern is block-wise distribution across an extended window with a resume bitmap, or a local update over BLE for anything above a few hundred kilobytes.

Does choosing 76.8 kbps reduce range?

Yes, by about 6 dB against 19.2 kbps, which is a factor of two in free-space range. In cluttered sites the loss is usually larger, because a lower signal-to-noise ratio also erodes the margin against fading. Update at the fastest rate the measured margin supports, and drop a step when the margin is thin.

Do I need CoAP, or can a transparent DTU do this?

A transparent terminal moves bytes faithfully and nothing more, so the manifest, block CRC and resume bitmap have to live in your application, on both ends. CoAP block-wise transfer (RFC 7959) gives you the framing and the option encoding if your device already speaks it. Either way the arithmetic above does not change; only who owns the state machine does.

Why does the same image take so much longer on the gateway side?

The gateway in a star network carries every node's traffic. With 100 nodes on one concentrator, a scheduled update window has to be carved out of the polling budget, which is why the polling arithmetic in the 100-node study matters before an update campaign: the fleet's update time is the per-node time multiplied by the number of nodes the gateway can serve per window. The TP5510 gateway page lists the interface and capacity figures for that planning step.

More in Solutions