Fox Red Labs / Builds / Smart home and radio
Update a board's firmware by radio
A CC2340R5 took a signed update over Bluetooth from a computer in 43 s; a CC35X1 installed one over Wi-Fi in 8 s. The Zigbee update from Home Assistant has not finished.
HardNo wiringabout 2 min to build
The CC2340R5 this build runs on, drawn from its user guide. Drag to turn it.
The CC35X1 this build runs on, drawn from its user guide. Drag to turn it.
What you need
On Linux or WindowsThe steps were recorded on a Mac; paths and port names in them are the Mac ones.
macOS (recorded)
- TI's tools
/Applications/ti, or~/ti- Serial port
/dev/cu.usbmodem<serial>1- Probe access
- nothing to do
Linux
- TI's tools
~/ti(also searched:/opt/ti)- Serial port
/dev/ttyACM0(by name:/dev/serial/by-id/*<serial>*-if00*)- Probe access
- one udev rule, how
Windows
- TI's tools
C:\ti(also searched:%USERPROFILE%\ti)- Serial port
COM<n>, named "XDS110 Class Application/User UART" in Device Manager- Probe access
- the XDS110 USB driver from UniFlash or CCStudio
Your probe's serial on any system: python3 tools/frl/frl.py detect. Not run on a board under Linux or Windows. Everything else that differs: the full table.
On Linux or WindowsThe steps were recorded on a Mac; paths and port names in them are the Mac ones.
macOS (recorded)
- TI's tools
/Applications/ti, or~/ti- Serial port
/dev/cu.usbmodem<serial>1- Probe access
- nothing to do
Linux
- TI's tools
~/ti(also searched:/opt/ti)- Serial port
/dev/ttyACM0(by name:/dev/serial/by-id/*<serial>*-if00*)- Probe access
- one udev rule, how
Windows
- TI's tools
C:\ti(also searched:%USERPROFILE%\ti)- Serial port
COM<n>, named "XDS110 Class Application/User UART" in Device Manager- Probe access
- the XDS110 USB driver from UniFlash or CCStudio
Your probe's serial on any system: python3 tools/frl/frl.py detect. Not run on a board under Linux or Windows. Everything else that differs: the full table.
Steps
Set up Python and point at TI's public key.TERMINAL
Make a Python environment with bleak, then set the path of the public key compiled into TI's MCUboot (change the SDK path if yours differs). The client uses the key to check the signature.
python3 -m venv ~/ble && ~/ble/bin/pip install bleak export KEYS=/Applications/ti/simplelink_lowpower_f3_sdk_9_21_00_36_LTS/source/third_party/mcuboot/boot/ti/source/mcuboot_app/keys.cYou should see: bleak installs without errors.
Build both images.TERMINAL
From the repository root. The script builds two copies of TI's
basic_ble_oad_dual_imageexample and signs them: v1 is namedFRL OAD 1and toggles the green LED every second, v2 isFRL OAD 2and toggles the red LED four times a second.build.shuses the macOS formsed -i ''. GNUsed(Linux) wantssed -ithere. Not run on Linux or Windows.PY=~/ble/bin/python cc2340r5/oad/build.shYou should see: About two minutes: 'v1 built in 65 s', 'v2 built in 49 s'.
cc2340r5/oad/images/holdsmcuboot_dual_image.hex,frl_oad_v1.binandfrl_oad_v2.bin(236 kB each).Check the update image without a board.TERMINAL
A dry run parses the image header, recomputes the SHA-256 and checks the signature against TI's key.
~/ble/bin/python tools/oad/oad_client.py --dry-run --keys-c $KEYS cc2340r5/oad/images/frl_oad_v2.binYou should see:
sha256_ok True,signature_ok True,version 2.0.0+0, a transfer plan of 1024 blocks of 236 data bytes, thendry run OK.Back up the board.TERMINAL
Before writing, read the whole flash and the boot configuration to a folder outside the repo (the board may hold a Zigbee network key). DSLite's
memory -rtakes the length as a count of 32-bit words, not bytes. Then merge them into a restore file. In theDSLitepath,osxis the Mac folder; on Linux or Windows use the one UniFlash made there.export DSLITE=/Applications/ti/uniflash_9.6.0/deskdb/content/TICloudAgent/osx/ccs_base/DebugServer/bin/DSLite CCXML=cc2340r5/CC2340R5.ccxml BK=$HOME/cc2340r5-oad-backup && mkdir -p $BK $DSLITE memory -c $CCXML -r 0x0,0x20000 -o $BK/main_flash.bin $DSLITE memory -c $CCXML -r 0x4E020000,0x200 -o $BK/ccfg.bin python3 cc2340r5/oad/images.py merge $BK/restore.hex $BK/main_flash.bin@0x0 $BK/ccfg.bin@0x4E020000You should see:
main_flash.binis 512 kB andccfg.binis 2 kB.Flash the bootloader and v1.TERMINAL
One command writes both files, because UniFlash erases the whole chip at the start of every program load.
$DSLITE flash -c $CCXML -e -f -u cc2340r5/oad/images/mcuboot_dual_image.hex cc2340r5/oad/images/frl_oad_v1.bin,0x6000You should see: About 13 s. The green LED toggles once a second and
FRL OAD 1is advertising.Send v2 over the air.TERMINAL
The client finds the board by name, sends the 1,024 blocks, sends the enable command and waits for the new name.
~/ble/bin/python tools/oad/oad_client.py --name "FRL OAD 1" --expect-name "FRL OAD 2" --keys-c $KEYS --json oad-run.json cc2340r5/oad/images/frl_oad_v2.binYou should see: The running version, progress every 5% with kbit/s, then the download time, the time from enable to the new name and the new version. Recorded run: 31.4 s, 7.8 s, version 2.0.0, packet size 251.
Check by probe.TERMINAL
Read the image header at 0x6000; the version is byte 20.
$DSLITE memory -c $CCXML -r 0x6000,0x8 -o $BK/hdr.bin && xxd $BK/hdr.binYou should see: Byte 20 reads 02 after the update and 01 before. The red LED should now toggle four times a second (not watched on the recorded run).
Put the board back.TERMINAL
The same chip erase clears the flash first, then the backup is written.
$DSLITE flash -c $CCXML -e -f -u $BK/restore.hexYou should see: The board is as it was before step 5.
Build the first image at version 0.0.1.0.TERMINAL
The script copies TI's
ota_example, puts the version in its banner, builds it and signs it with the Toolbox. The default output folder isout/cc35x1-ota.build.shuses the macOS formsed -i ''. GNUsed(Linux) wantssed -ithere. Not run on Linux or Windows.cc35x1/ota/build.sh 0.0.1.0You should see: It prints the build folder and lists
primary_vendor_image.sign.binandtool_settings.json.Program the board once.TERMINAL
This puts the example on the two-slot flash layout the update needs. Use absolute paths inside
tool_settings.json. The Toolbox does not reset the board afterward. The Toolbox folder below is the macOS one; on another system use the folder its installer made, and setTBinbuild.shto match.Replace <probe serial> before you run this.
cd /Applications/ti/simplelink_wifi_toolbox_macos_4_3_23 && ./simplelink-wifi-toolbox programmer -i XDS110 -param1 <probe serial> programming --tool_settings <absolute path to out/cc35x1-ota/v0.0.1.0/freertos/ticlang/toolbox/tool_settings.json> xds110reset -s <probe serial>You should see: After the reset, the serial port (115200) shows
CC35xx OTA Example Application FRL 0.0.1.0.Build the update image at 0.0.2.0.TERMINAL
The server lists a file as new only when its header version is higher than the running one. Copy the signed file into a folder under the name the server expects, with TI's server script beside it.
cc35x1/ota/build.sh 0.0.2.0You should see: The same listing, this time under
v0.0.2.0. Copy itsprimary_vendor_image.sign.bintovendor_image_0.0.2.0.binin a new folder.Serve the image over HTTPS.TERMINAL
Use TI's own server and playground certificates from the Wi-Fi SDK's
tools/ota_https_server/folder (copy the folder, or run it in place). With Python 3, run itsota_server.pywith--dir <your folder>from step 3. Find your computer's Wi-Fi address.You should see: The server listens on port 8443 of your computer's Wi-Fi address.
Hold the board's serial port open.TERMINAL
The bridge relays the probe's serial port to a local TCP port, and
tools/frl/lock.pykeeps other programs off that port meanwhile. The bridge usestermios, so it runs on macOS and Linux, not Windows; the port name below is the Mac one.Replace <probe serial> before you run this.
python3 tools/frl/lock.py exec --serial <probe serial> -- python3 cc35x1/ota/bridge.py /dev/cu.usbmodem<probe serial>1 7701 &You should see: The command returns to the prompt with the bridge running in the background.
Run the update.TERMINAL
The driver walks the example's menu: scan, join your network, query the server, download, install, reboot into the trial image, then keep or go back. Your Wi-Fi name and password come from the environment only. Use
--end keepto accept the new image or--end revertto go back.Replace <network name>, <password> and <your computer's Wi-Fi address> before you run this.
FRL_WIFI_SSID=<network name> FRL_WIFI_PASSWORD=<password> node cc35x1/ota/drive.mjs --server https://<your computer's Wi-Fi address>:8443 --end keepYou should see: Lines for each phase ending '== download', '== install', '== reboot into trial' and 'after: 0.0.2.0'. In the 2026-10-22 runs: join 2.2 to 2.7 s, download 3.6 s, install under 0.1 s, restart 3.1 s.
Read the serial output
Open the board's USB serial port in any terminal program at 115200 baud. The lines the program prints appear there.
What to build next
If something goes wrong
| The build in the next step uses this environment | Its command sets PY to it. |
| It stops on a missing path | The SDK, SysConfig and compiler paths are at the top of build.sh; change them to your install. |
| A line says False | Rebuild; the check was tested on five deliberately broken copies and refused all of them. |
main_flash.bin is not 512 kB | You gave the length in bytes; use 0x20000 words. |
| The probe reports error -615 when it runs the app | MCUboot was not flashed with it; run the same command again with both files. |
More troubleshooting
| It stops before sending with 'ATT MTU ... would corrupt the image' | Your computer agreed a packet size under 243; try again, or see the protocol section of cc2340r5/oad/README.md. |
| It still reads 01 | MCUboot did not install the image; it refuses an image that is not newer than the running one. |
| It does not start | Read cc2340r5/FAQ.md before writing again. |
Every fix for this board: the FAQ.
| It prints 'build failed' or 'signing failed' | Read the log it names. The SDK, Toolbox and compiler paths are at the top of build.sh. |
| The Toolbox refuses | The chip may not be activated; stop and follow cc35x1/AGENTS.md. This chip cannot be read back, so keep the signed bundle of the image it ran before. |
| The server later shows nothing as NEW | Check the version is higher and the file is named vendor_image_<version>.bin. |
The board cannot reach it later (Server query failed (HTTPS: -11 ...)) | Check the address and that your computer and the board are on the same network. |
| The port is busy | Close any serial monitor that has it open. |
More troubleshooting
| The menu says 'Invalid input' | The driver sent a line feed; answers end with a carriage return only. |
| At step 6 | If a slot shows FAILED the board erases it first (download took 20.5 s). |
Every fix for this board: the FAQ.
Get the code
Ran here, with steps. Over Bluetooth from a laptop: 43 s for the whole update, with TI's dual-image example. How it ran on this board.
Start it
Paste this in a terminal. It hands off to an AI assistant with this board's notes.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh cc2340r5 ota-update --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py cc2340r5 ota-update --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git clone --depth 1 --filter=blob:none --sparse https://github.com/Fox-Red-Labs/fox-red-labs.git
cd fox-red-labs
git sparse-checkout set cc2340r5 tools mac-setupRan here, with steps. Over Wi-Fi from a computer: download about 1 s, install and reboot 8 s, new image running (one attempt)
Start it
Paste this in a terminal. It hands off to an AI assistant with this board's notes.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh cc35x1 ota-update --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py cc35x1 ota-update --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git clone --depth 1 --filter=blob:none --sparse https://github.com/Fox-Red-Labs/fox-red-labs.git
cd fox-red-labs
git sparse-checkout set cc35x1 site toolsEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: cc35x1/AGENTS.md.
git clone --depth 1 --filter=blob:none --sparse https://github.com/Fox-Red-Labs/fox-red-labs.git
cd fox-red-labs
git sparse-checkout set cc35x1 site tools mac-setupOr take the whole repository
git clone https://github.com/Fox-Red-Labs/fox-red-labs.gitReports from others, and the report forms
Clone the repository and open the board's folder below. AGENTS.md is a plain text file of notes for AI coding assistants, and llms.txt at the root indexes the site for one.
git clone https://github.com/Fox-Red-Labs/fox-red-labs.git
- LP-EM-CC2340R5: folder
cc2340r5/.- README: the board's lab notebook (what was run, in order)
- Notes for an AI coding assistant working in this repository: notes for an AI assistant; copy it into your own project if you use one
- FAQ: errors and fixes
The other 1 board folder
- LP-EM-CC35X1: folder
cc35x1/.- README: the board's lab notebook (what was run, in order)
- Notes for an AI coding assistant working in this repository: notes for an AI assistant; copy it into your own project if you use one
- FAQ: errors and fixes
- LP-EM-CC35X1: folder
Code is BSD-3-Clause, writing is CC BY 4.0; third-party folders keep their own licenses.
Built it? Tell us
Built this, or got stuck? Report it on GitHub with a few short answers. Your report shows here in your words, marked as yours. A failure that repeats on the bench gets its fix here.
Evidence and limits43 s over Bluetooth on the CC2340R5; over Wi-Fi on the CC35X1 it installed in 8 s; the Zigbee update has not finished. Results, sources, timing and limits.
Update a CC2340R5 over Bluetooth from a computer's terminal
Expected result: The client prints a clean transfer of 1,024 blocks with no retries, then the board resets and advertises FRL OAD 2, and the version read back is 2.0.0.
What this shows
- A CC2340R5 can take a signed firmware update over Bluetooth from a terminal: 31.4 s transfer, 7.8 s to the new name, one run on an Intel Mac.
- TI's dual-image example keeps your app running during the download; each slot is 236 kB and the app uses 192 kB.
- The image check (SHA-256 and signature) runs on your computer before any radio is used.
What this does not establish, and limits
What this does not establish
- A repeat: one run, one Mac.
- That the red LED toggles: the name, version and header say v2 runs, but the LED was not watched.
- A Zigbee update from Home Assistant: it did not finish (88.7% of the image at best), and this page has no steps for it.
- Wi-Fi: the CC2340R5 has none.
Limits to keep in mind
- TI documents OAD with a phone app or a Windows tool; the terminal client here is this repository's own, written from the SDK source.
- The dual-image layout halves the room for the app (236 kB per slot).
- Checked on one Intel Mac, macOS 15.7.9.
Sources
Versions, sizes and timing
| Speed | 61.5 kbit/s of image data: 236 kB in 31.4 s, ATT MTU 251 | README notes |
|---|---|---|
| Image | 236 kB sent, 18.5% of it 0xFF padding | README notes |
Evidence
- 2026-10-07, one run: 31.4 s transfer of 1,024 blocks, 7.8 s from the enable command to the new name, version 2.0.0 read back. About 41 s from scan to new name, 43 s with the version read. README notes
- The run's console and JSON output.
- The image header at 0x6000 read byte 20 = 02 after the update. README notes
Other boards
- CC35X1ran another way
- MSPM0G3507, MSPM0L1306, F2800137, MSPM0C1104, MSPM0G3519, MSPM33C321A, AM13E230Not for this chip no radio
What the status words mean
Works ran here and did what it shouldCould work some of it ran; real porting effort is left; hover for whatNot for this chip the chip or its vendor software cannot; hover for why
Update a CC35X1 over Wi-Fi from a computer
Expected result: The driver prints each phase with its time, the board reboots into version 0.0.2.0, and the slot table after shows the new version active.
What this shows
- A CC35X1 downloads, verifies, installs and boots a new signed image over Wi-Fi from a Mac server: install and reboot in 8 s on the 2026-10-09 attempt.
- A reset without accepting rolls the board back to the OTA app, as TI documents.
- Four rounds on 2026-10-22 (update, go back, update and keep, update into the other slot) all ended as expected.
What this does not establish, and limits
What this does not establish
- A repeat of the 8 s figure: it is one attempt with a 27.7 kB image.
- Updates from Home Assistant or the internet: the server was a Mac on the home network.
- Safety against power loss mid-update: not tested.
Limits to keep in mind
- The chip must be activated first, which burns fuses and cannot be undone.
- The chip cannot be read back, so a restore needs a saved signed bundle.
- Checked on one Intel Mac and one board.
Sources
Versions, sizes and timing
| Install | download about 1 s, install and reboot 8 s, 27.7 kB image, one attempt | Notes for an AI coding assistant working in this repository |
|---|---|---|
| Phases (1.29 MB image) | scan 1.9 s, join 2.2 to 2.7 s, download 3.6 s, restart 3.1 s | Notes for an AI coding assistant working in this repository |
Evidence
- 2026-10-09: TI's ota_example found a newer image on a Mac HTTPS server, downloaded 27.7 kB in about a second, installed and rebooted in 8 s; the new image printed its banner and echoed typed characters. One attempt. Notes for an AI coding assistant working in this repository
- 2026-10-22: four rounds of a 1.29 MB image driven by site/flash/cc35-ota.js through a serial-to-TCP bridge, update in 12 to 28 s. Notes for an AI coding assistant working in this repository
Other boards
- CC2340R5not assessed
- MSPM0G3507, MSPM0L1306, F2800137, MSPM0C1104, MSPM0G3519, MSPM33C321A, AM13E230Not for this chip no radio
What the status words mean
Works ran here and did what it shouldCould work some of it ran; real porting effort is left; hover for whatNot for this chip the chip or its vendor software cannot; hover for why
Result grid
Details
43 s for the whole update, with TI's dual-image example. Over Zigbee from Home Assistant: starts, then stalls: 88.7% of a 200 kB image at best (12 transfers, none finished). suspected cause: radio environment.Works ran here and did what it shouldShould work it builds; only naming, packaging or build glue is in the way; hover for whichCould work some of it ran; real porting effort is left; hover for whatNot for this chip the chip or its vendor software cannot; hover for why
Experiments (1)
| Status | What was tried | Result |
|---|---|---|
| Could work | Can Home Assistant update a TI LP-EM-CC2340R5 Zigbee device over the air? CC2340R5, 2026-10-05 | Best 88.74% of 200 kB, which is 177.5 kB in 92 minutes at 33 bytes a second, with a Zigbee plug beside the board. It stopped when the board's block requests stopped reaching Home Assistant for 30 s. Twelve transfers,... |
Source files
- LP-EM-CC2340R5 OAD notes (CC2340R5)

