LegacyDfuTransport
Kable-based transport for the Nordic Legacy DFU protocol (Nordic SDK 11/12 / Adafruit BLEDfu).
Most nRF52 boards in the field — including the RAK4631 with the recommended Adafruit/oltaco "OTAFIX" bootloader — speak Legacy DFU rather than Secure DFU. The two protocols share nothing at the upload layer:
Different service & characteristic UUIDs (
1530/1531/1532vsFE59/8EC9…).Different opcodes; init packet is sent on the Packet char between two control-point writes (vs Secure's CREATE/PACKET/EXECUTE object flow).
PRN payload is bytes-received uint32 (vs Secure's offset+CRC32).
No CRC32 in the protocol — image integrity relies on the device's CRC16 in the init packet.
Phase-1 buttonless trigger is shared with SecureDfuTransport (see triggerButtonlessDfu there).
Properties
Low-speed when the bootloader did not negotiate a larger MTU, leaving us on the 20-byte packet floor. Valid once connectToDfuMode has established the connection (the MTU is known by then).
Functions
Scans for the device in DFU mode (address or address+1) and establishes the GATT connection, enabling notifications on the Control Point.
Drives the full upload sequence (START, init-packet brackets, PRN setup, firmware stream, validate, activate).
As transferFirmware, additionally reporting coarse DfuUploadPhase transitions so the UI can explain a wait that produces no progress (Legacy DFU erases the whole application region before it accepts a single byte). Transports without a meaningful prepare step keep the default, which never reports a phase.
Sends the legacy DFU init packet using the SDK 7+ extended-init flow: