How firmware updates and restores work.

Build an independent updater with the protocols, file formats and tested sequences behind Red Thunder’s restore tools. Each section states what is verified and what remains unknown.

Published October 25, 2026 · Research from August–October 2026 · Reference: Nordic 2.173.0 / ST 8.132.0 / AudioNordic 3.174.0

Start with a spare car and verified files. Interrupted writes can erase content or leave the car in update mode. Preserve working content and language where possible; a complete backup method is not yet verified.

For app support, see Troubleshooting. The downloadable tools run offline and never connect to a car.

Machine-readable reference (JSON)Audio image inspector (Python)Packet and page examples (Python)

For driving, lights, sound and profile playback, see Bluetooth control and the Python example.

1. What a full restore installs

The car has four separately installed components: Nordic firmware (A), ST controller firmware (B), audio in NAND flash and animation profiles. Audio transfer also needs temporary Nordic firmware and the car’s ESP Wi-Fi service.

Firmware APhone → Bluetooth legacy DFU → Nordic application
Firmware BPhone → Bluetooth API → ST page updater
AudioPhone → Wi-Fi / WebSocket → ESP → SPI → AudioNordic → NAND
AnimationsPhone → Bluetooth API → animation profiles

The reference versions are A 2.173.0 and B 8.132.0. Temporary A 3.174.0 (AudioNordic) handles audio installation; restore standard A afterward. Updating A or B does not install the corresponding audio or animation content.

The phone’s soundbank and AnimationManifest.bin are app resources. The car uses AudioImage.bin, AnimationData.bin and AnimationDataMap.txt. Keep UI names, profile IDs and audio block addresses separate.

2. Sources and confidence

The main reference is the original Sphero Android app 1.2.3 (472). We inspected its managed/native code and decoded Nordic firmware, checked independent offline models, then tested restores on a development car. The original iOS updater was not audited.

  • Code inspection establishes packet formats, ordering and response handling.
  • Offline checks verify framing, page construction, CRCs and error cases; they do not emulate the whole car.
  • Hardware tests completed all 85 B pages, 31,168 audio chunks, standard-A return and 340 animation profiles. One uninterrupted Android restore took 46½ minutes and passed fresh checks and an owner’s functional check.
  • Limits: sent-packet hashes do not prove flash contents. One successful car does not establish recovery for every fault or older firmware pair.

This guide includes later corrections to block sizing, pending masks, WebSocket close and animation acknowledgments. The instructions below supersede the earlier experiments.

3. Bluetooth and packet framing

Cars normally advertise an LM- name. Verify the GATT profile and track the same car across reconnects; the name alone is insufficient.

PurposeUUID
API V2 service00010001-574f-4f20-5370-6865726f2121
API characteristic / debug shell00010002-574f-4f20-5370-6865726f2121
00010003-574f-4f20-5370-6865726f2121
DFU service00020001-574f-4f20-5370-6865726f2121
DFU control / packet00020002-574f-4f20-5370-6865726f2121
00020003-574f-4f20-5370-6865726f2121
DFU info / anti-DoS00020004-574f-4f20-5370-6865726f2121
00020005-574f-4f20-5370-6865726f2121
Standard battery levelService 180F, characteristic 2A19

Write UTF-8 usetheforce...band to the anti-DoS characteristic on application and bootloader connections. This is a protocol constant. Subscribe to notifications before requesting asynchronous results.

Commands below use hexadecimal device/command notation. BE16/BE32 mean big-endian 16/32-bit integers. Untargeted API V2 packets use this unescaped form:

8D | flags | device | command | sequence | payload… | checksum | D8
checksum = (~sum(unescaped fields and payload)) & 0xFF

Escape body and checksum bytes: 8D → AB 05, D8 → AB 50, AB → AB 23. The unescaped sum including checksum must equal FF. Reassemble across BLE notification boundaries, which may split or combine packets.

  • 0A: request a response and reset inactivity. 08: reset inactivity without an ordinary success response.
  • 01: response flag. 10/20: optional target/source fields before device, command and sequence. Parse flags rather than assuming fixed offsets.
  • Match ordinary command acknowledgments (ACKs) by sequence. Asynchronous completions follow separate command rules, often with sequence FF. Audio WebSocket frames use the untargeted envelope.
Format fixture, profile 0069 / sequence 42:
8D 0A 17 05 42 00 69 2E D8

Finalization success notification:
8D 00 1D 09 FF 01 D9 D8

Keep the evidence levels separate: a GATT callback confirms transport, an API ACK confirms acceptance, and a completion notification reports the operation result. Final state reads and physical checks answer different questions.

4. Check the car and choose the stages

The original manager prioritizes core firmware, audio, then animations. It reconnects and reassesses after each strategy. Its native strategy can combine marker, Nordic, ST, audio and animation steps.

Before writing, verify all selected files and hashes, read current A/B versions and update state, and check power. Red Thunder requires a charger and at least 80% battery; this is our safeguard, not a measured electrical minimum. Keep unavailable readings unknown.

CommandMeaning
11/00Main application version (routing depends on the processor/profile).
11/17 → 11/18Request B version; separate six-byte version notification.
11/19Animation version query.
11/23Stored audio language/version marker, despite its historical “audio CRC” name.
1D/0DPending-update query; preserve the raw bytes and firmware version.
1D/0CMutating pending-marker write: four-byte big-endian mask. B 00000002, audio 00000008, animation 00000010.

Pending reads and writes use different representations. Some standard read paths return IDs (audio 4, animation 5); AudioNordic returns audio mask 8. Write the documented bitmask, never an enum ordinal. Never clear flags to manufacture success.

A marker write can disconnect the car and briefly expose DFU. Follow the same car through that transition, discard cached diagnostics and reread its state. A brief DFU appearance during wake alone does not mean the car is stuck.

On an already verified current-firmware baseline, our coordinator does audio first, then selected standard-firmware reinstalls, saving an extra A pass. Recover missing core prerequisites first. In either order, finish by verifying standard A and content compatibility.

5. Firmware A: Nordic device firmware update (DFU)

Standard A uses a 181,276-byte encoded application and matching 14-byte init packet. AudioNordic uses a different 180,784-byte application/init pair. These are application-only updates: SoftDevice and bootloader size fields stay zero.

  1. Handshake, discover DFU characteristics and subscribe. Read DFU info: mode is byte 4, or byte 7 if byte 6 is nonzero in an eight-byte value. Mode 1 means bootloader; a short/unreadable result means unknown.
  2. From the application, send control 01 04 and reconnect to its bootloader. Once bootloader mode is confirmed, send 01 04 to start application-only DFU.
  3. On the packet characteristic, send three little-endian 32-bit sizes: 0, 0, application_length. Require 10 01 01.
  4. Send control 02 00, the matching 14-byte init packet, then control 02 01. Require operation-02 success.
  5. Configure receipts with the five-byte request 08 0C 00 00 00. Send control 03, then stream the original encoded file in 20-byte packets.
  6. Every 12 packets, await 11 + uint32_le(bytes_received). Require the expected cumulative count, handle the final partial batch and await operation-03 completion.
  7. Send 04 to validate; require 10 04 01. Send 05 to activate/reset, reconnect and verify the intended version. Control 06 only resets the bootloader.

DFU responses are 10 opcode status, with success 01; ordinary API success is 00. Buffer responses that arrive before their write callback, and consume each once.

For analysis, XOR application bytes with hex 12; standard A decodes to Thumb code at 0001C000. For transfer, send the encoded file unchanged. Keep each application paired with its own init packet.

6. Firmware B: pages and finalization

The 262,144-byte ST image has 128 pages of 2,048 bytes. Skip all-FF pages but preserve their original indices. This reference sends 85 pages and skips 43.

address = 0x0080 + original_page_index
payload = uint16_be(address) + original_2048_byte_page

First addresses: 0080, 0082, 0083, 0084, 0085, 0087
Last sent address: 00FD
  1. Write the B pending mask and complete its reconnect.
  2. Prepare with 1D/06 [01]; await the separate empty 1D/07.
  3. Send each page with 1D/01, flags 0A, and require its matching successful response.
  4. Use the original transport’s 20-byte fragments and 60-byte acknowledgment window (also its fallback when buffer size is unavailable). Request acknowledged transport on every third fragment and the final fragment.
  5. Send empty 1D/08. Require both its success ACK and 1D/09, sequence FF, raw payload 01.
  6. Reconnect and reread B and pending state. Retry missing reads within a bound, without repeating writes.

The original final-success timeout is ten seconds; our successful trace received it 4.8 seconds after the ACK. Decode by command: 1D/09 [01] means success, while 1D/0E readiness cannot satisfy finalization.

Both platform page builders matched the independent reference. Other runs acknowledged all pages and the finish command, then disconnected without final success or a valid B version. ACK counts alone neither prove installation nor identify the fault. No extra activation command was found.

Unlike the original app’s apparently uncapped retries, use bounded retries and renewed consent. B recovery restarts the page sequence; arbitrary page-offset resume is unverified.

7. Audio image format

The English AudioImage.bin is 127,664,128 bytes: 974 logical blocks of 131,072 bytes. Block 0 begins CHIP. From block 1, records start on block boundaries with a 32-byte FILE header. Header integers are little-endian.

OffsetBytesMeaning
04ASCII FILE
44Header size, 32
84Payload byte length
124IEEE CRC-32 of payload
1612Preserved metadata; do not invent filename semantics
284IEEE CRC-32 of header bytes 0–27
occupied_blocks = ceil((32 + payload_length) / 131072)
next_record_block = current_record_block + occupied_blocks
aggregate_header_crc = CRC32(concatenated FILE header bytes 0..27)

Use reflected IEEE CRC-32: polynomial EDB88320, standard initial/final complement, compatible with zlib.crc32. Check vector 123456789 gives CBF43926. Aggregate only FILE bytes 0–27, excluding CHIP and stored header CRCs. Check bounds and stream payload validation.

  • Full image: 565 records, last start 973, terminal extent 974, aggregate 6F188543.
  • Previous prefix: 564 records, last start 972, aggregate 205AFE0B.
  • Last payload: 82,722 bytes, CRC EADE2005. Its final 4 KiB transfer chunk is padding and still requires completion.

The animation packer resolves filenames through lookup.txt, replacing the two bytes after opcode 07 with a BE16 audio address and retaining the mode byte. Car animation files do not preserve all app-side names; profile IDs are not audio block addresses.

The original app joins numbered AudioImage*.zip archive parts, validates the ZIP and expanded BIN, then installs one image. It does not stream individual spoken lines. Transfer includes CHIP, FILE headers and padding.

8. Check installed audio

Send 1B/11 with a BE32 logical block limit. Zero scans to the end; positive values bound blocks, not files. The inspected handler accepts values below hex 7B9, returns API 8 when busy and API 7 for larger values. Scan only while playback is stopped; scanning can stop sound.

Require the request ACK and separate 1B/12 notification. Its eight-byte payload is BE16 record count, BE16 last record start, then BE32 aggregate header CRC.

Reference completed notification:
8D 08 1B 12 FF 02 35 03 CD 6F 18 85 43 75 D8
                     ----- ----- -----------
                      565   973    6F188543

The scanner checks headers and the candidate final payload, not every installed payload. If that payload fails, it may return an earlier location/CRC with an inflated count. Compare the complete result and use independent boundary/prefix scans for recovery.

You can verify every CRC in the local image. The car’s scan is narrower: it neither provides a NAND backup nor proves audible playback.

9. Erase and upload audio

Install and verify AudioNordic 3.174.0. Read Wi-Fi info/MAC with 1E/02; even this request can enable the radio and save configuration on a cold start, so include radio cleanup.

Join the car’s network

For final MAC bytes m4 and m5, SSID is lightning + uppercase hex low nibble of m4. Password is word m5 >> 4 from this zero-based list + uppercase hex low nibble of m5. This deterministic scheme is not strong access control.

jackson, fillmore, towmater, chickhicks,
cruzramirez, victory, pistoncup, racecar,
pitstop, ultimate, speedway, airwrench,
champion, sheriff, racetrack, cozycone

Transfer sequence

Start at logical block N = 0, unless fresh resume checks establish another boundary. These addresses apply to the pinned 1.2.3 layout.

StageRequest / contract
Pending lifecycle1D/0C with BE32 00000008; require ACK, reconnect and fresh pending 8.
Unlock1B/0C, empty.
Erase1B/0A: BE16 start N + 0x0046, BE16 count 0x07BA − N. Exclusive end 0x0800. Await ACK plus empty 1B/0B.
Set audio start1E/03, BE16 N + 0x0046.
Prepare1D/06, payload 03; ACK plus empty 1D/07. If Busy (API 8), await type-03 readiness on 1D/0E, then retry within a bounded preparation window.
Radio / join1E/00, payload 01 enables the car AP in our client. Join the derived network with OS consent.
WebSocketws://192.168.4.1:81/, HTTP Upgrade, binary messages carrying API V2 frames.
Size each block1E/11, flags 0A, bytes 00 02 00 00 (131,072 big-endian), once before every 128 KiB image block.
Data1E/06, flags 0A, exactly 4,096 source bytes per message. Wait after each one.
Chunk completionExact empty packet 8D 00 1E 07 00 DA D8. An ordinary same-command ACK is insufficient.
CloseAfter all completions, send WebSocket close 1001 and await peer disconnect. The client initiates the close.
BLE finishEmpty 1D/08; ACK plus 1D/09 FF [01]. Then 1E/00 [00] radio off, restore standard A and freshly verify versions, pending state and selected audio headers.

A fresh erase starts at physical block 70 and spans 1,978 blocks. The image needs 974 sizing messages and 31,168 data messages. For resume, seek the file to N × 131072. The older original 1.2.0 library’s 950-block erase and single whole-image size command are unsuitable for this image.

Transport requirements

Validate HTTP 101 and Sec-WebSocket-Accept; use fresh random client masks. Bound message sizes and fragmentation, and handle ping/pong and close. Text and unrelated valid API messages may arrive: ignore or retain them without advancing progress, extending deadlines or resending uncertain chunks. Original timeouts are ten seconds per chunk and fifteen for disconnect, not guaranteed timings.

The bridge receives 34-byte SPI units: two envelope bytes and 32 payload bytes. Sixty-four units fill a 2,048-byte NAND page. AudioNordic alternates buffers, programs pages and skips bad blocks at block transitions; logical image blocks therefore differ from physical addresses.

10. Recover an interrupted transfer

Resume from a freshly verified FILE start, never a saved byte count. The original client compares the car’s last intact record/header-prefix CRC with the image, then rewrites that record from its start. A mismatch selects zero.

Our additional checks require the same car, image and connection, plus matching scans at the candidate boundary and a distinct earlier prefix. Save raw notifications, including count anomalies. Reacquire evidence after reconnect before erasing.

Example only, logical start N = 973:
local seek       = 127533056
physical start   = 973 + 70 = 1043
physical count   = 1978 - 973 = 1005
remaining image  = one 131072-byte block

Chunk completions use sequence zero with no offset. A delayed completion can resemble the next chunk’s result. Keep one chunk outstanding and fixed deadlines; after ambiguous delivery, start a new transport session and reassess rather than blindly replaying.

An early tail test received 31/32 completions and needed separately verified recovery. A later 32/32 test revealed the client-close requirement. Neither supports routinely finalizing incomplete transfers.

Before each mutation, journal its intent, file hashes, selected components, car identity, stage, confirmed results and uncertainty. Cancellation cannot undo an erase. After restart, offer recovery with renewed consent; never silently resume a stored offset or mark an unfinished stage complete.

11. Install animation profiles

The reference data/map are 100,777/4,644 bytes. Each nonempty map row is decimal profile_id,offset,length. Its 340 unique profiles cover the data contiguously; highest ID is 386. Each ends with opcode FE.

Known instruction widths, including opcode, are FF:3, 01:4, 03:5, 04:4, 05:2, 06:2, 07:4, 08:6, 0A:19, 0C:12. Reject unknown or truncated instructions. Opcode 07 contains a BE16 audio start and one mode byte.

  1. Validate files, map bounds, unique IDs and profile instructions.
  2. Write 1D/0C mask 00000010, reconnect and reread pending state.
  3. Prepare 1D/06 [04]; require its ACK and empty 1D/07.
  4. Send 17/06, flags 0A, payload uint16_be(id) + profile bytes. Complete paced BLE transport and require saved result 17/09, sequence FF, payload [id & FF, 00].
  5. Keep one profile outstanding: the saved result carries only the low ID byte. An additional ordinary success ACK is optional; any observed error still stops the transfer.
  6. Finish with 1D/08 ACK plus 1D/09 FF [01]. Reread pending zero and animation version.

Reference installs report version 5C05E888. If a read is missing while the controller settles, retry the read within a bound, without resending profiles or finish.

Interrupted animation installs restart the bundle with consent; profile-offset resume is unverified. Audio references 111 and 115 remain unresolved in the local FILE-start inventory. This does not establish incompatibility, and the hardware test did not exercise every scene.

12. Language markers

The historical “audio CRC” field is a decimal language/version marker, separate from scanner CRC 6F188543. The original client normalizes zero to internal English value 11; zero alone does not mean empty NAND.

11/22 writes the four-byte marker; 11/23 reads it. The original app can set it before transfer, or update it when the expected last block/header CRC match and no audio update is pending. The marker alone proves neither installation nor language.

For custom voices, verify the image layout, count, last block, header CRC and pending state before writing and reading back a distinct marker. Custom marker values are your extension, not an official registry. Preserve matching animation addresses; changing a marker does not translate audio or repair content.

13. Backups and factory-mode research

A complete stock Wi-Fi backup path remains unverified. The inspected AudioNordic upload handler rearms a zero-filled SPI transmit buffer without copying NAND into it. The ESP server image remains unidentified/unaudited, so other endpoints are still an open question. Generic SDK read symbols alone do not establish a registered McQueen command.

Factory shell: static findings

Standard A 2.173.0 accepts shell text through 10/02, with packet-aware output on 10/03. We audited decompressed registration tables as well as handlers. This is research, not a validated backup procedure.

  1. Send bare factory; it disables factory mode and prints an unsigned challenge.
  2. Calculate (challenge % 714025) × 1366 + 150889. Send factory <response> using the decimal result. A match sets RAM flags and clears the challenge; 411 independent instruction-level cases passed.
  3. Require explicit factory status from cb_info, not just an API ACK.
  4. Exit with factory 0 and confirm status zero. Disconnect alone is not verified cleanup.

Factory mode alters battery handling, initialization and configuration saves, and unlocks destructive manufacturing commands. Use healthy power and a fixed read-only command allowlist; avoid normal control, calibration and saves. Ordinary restores do not need factory mode.

Why reads are not yet a backup

  • rfb block page starts a NAND page read into a shared buffer, but its handler clears the completion callback. ACK, prompt and “Reading Block” output do not prove fresh bytes.
  • rd offset reads one byte with an eight-bit offset; the first 32 header bytes fit.
  • rtd subpage prints 256 bytes but bypasses packet-aware output.

A usable backup needs reliable completion/freshness, offsets, bad-block mapping, bounded chunks, integrity and restart rules. ST animation readback is also unresolved. Adding Nordic readback may still need ESP changes for Wi-Fi replies.

Older firmware

Recovered Android apps 1.0.1/1.1.0 did not supply authentic car images A 2.89/B 8.51. Early and final libraries already use BE16 17/05 profile requests and two-float 16/02 Ackermann requests. No alternate shorter format was found; compatibility with every older car remains unproven.

14. Phone lifecycle and downloads

Give one restore coordinator ownership of Bluetooth, notifications, Wi-Fi and the journal. Pause driving, chat and scenes. After reconnect, discard old responses/timeouts and refresh identity, power and state before writing.

iOS needs Hotspot Configuration authorization and Local Network access; background execution is finite. On Android, bind the socket to the joined car network. Download files first—the car AP has no internet. Keep the phone nearby and powered; do not assume background time covers a 45–75 minute restore.

Track internet download and car-write progress separately. Pin compressed/expanded sizes and SHA-256, bound decompression, reject incorrect ranges/encodings and unexpected redirects, and expose cached files only after full verification. Recheck image headers and payload CRCs before installation. HTTP Range resumes the download, never the car upload; a verified cache avoids another download.

Explicitly turn the car’s Wi-Fi off, restore and verify standard A and run fresh diagnostics. Record an unanswered physical check separately from a completed installation. Conversely, past completion must not substitute for a missing current version read.

15. Implementation checklist and open work

  1. Inputs: validate file hashes, sizes, CRCs, animation bounds and language compatibility.
  2. Operations: separately track queued bytes, transport completion, API ACKs and asynchronous results.
  3. Final state: reconnect to standard firmware; reread A, B, pending, the selected audio fingerprint and animation version.
  4. Reconnect: test an ordinary new connection without stale locks or an old plan authorizing writes.
  5. Physical output: observe screen, sound and movement. Animation telemetry cannot establish physical operation.
  6. Failures: inject disconnects and lost ACKs in offline/fake-car tests. Reject wrong-car state, avoid uncertain replays and expose failed cleanup.

Older firmware may omit percentage, audio-marker or sensor-configuration probes. Missing optional metadata does not establish corrupt content or justify a full update.

Open work includes full installed-payload readback, the ESP server audit, older firmware/content pairs, unexplained finalization disconnects and physical testing of every profile. Keep failed-run evidence intact even after a later successful recovery.

16. Reference files and sources

reference.json contains full hashes, sizes, UUIDs, commands and evidence limits. The downloads include no firmware/audio binaries, decompiled source, private logs, identifiers or service credentials. Obtain files you are entitled to use and compare exact fingerprints.

Reference artifactBytes / identifier
Original Android 1.2.3 (472) APK91,874,115 bytes
Standard Nordic A / init181,276 / 14 bytes · A 2.173.0
Temporary AudioNordic / init180,784 / 14 bytes · A 3.174.0
ST Firmware B262,144 bytes · B 8.132.0
English AudioImage.bin127,664,128 bytes · 974 blocks · 565 records
English animation data / map100,777 / 4,644 bytes · 340 profiles · observed version 5C05E888

The retained APK passed Orbotix signature and hash checks; its ARM library is Thumb code. Verify actual bytes, not a mirror label or filename: one archive response appended HTML to an APK.

For corrections, send the firmware version, minimal reproduction and evidence, removing private identifiers and credentials. Verified older firmware, an identified ESP image or a reliable readback method would help close the remaining gaps.