GitHub Digital Lab

Fox Red Labs / Builds / Smart home and radio

A Bluetooth sensor your phone can find

Build and flash TI's data_stream example on the CC2340R5, see it advertise from your computer, then connect and time a 20-byte echo. No sensor value is sent.

HardNo wiring1 evening

The CC2340R5 this build runs on, drawn from its user guide. Drag to turn it.

What you need

Works on this board
LP-EM-CC2340R5LP-XDS110ET debuggerdebug probe
A computer with Bluetooththe phone stand-in that scans and connects
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

  1. Clip the LP-EM-CC2340R5 onto the LP-XDS110ET probe and plug the probe into your computer with a USB data cable.BENCH

    You should see: Your computer lists the probe, and two serial ports appear.

  2. Copy TI's data_stream example out of the SDK into a working folder and build it with TI Arm Clang.TERMINAL

    Run it in the example's freertos/ticlang folder.

    cp -R /Applications/ti/simplelink_lowpower_f3_sdk_9_21_00_36_LTS/examples/rtos/LP_EM_CC2340R5/ble/data_stream ~/data_stream cd ~/data_stream/freertos/ticlang make -j4 SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR=/Applications/ti/simplelink_lowpower_f3_sdk_9_21_00_36_LTS \ SYSCONFIG_TOOL=/Applications/ti/sysconfig_1.26.3/sysconfig_cli.sh \ TICLANG_ARMCOMPILER=/Applications/ti/ccs2101/ccs/tools/compiler/ti-cgt-armllvm_5.1.1.LTS

    You should see: The build ends without an error and leaves data_stream.hex in that folder.

  3. Flash the image with DSLite, using the board's CC2340R5.ccxml from the cc2340r5 folder of the repository.TERMINAL

    Replace <home> with your home folder. The write erases the whole chip first.

    Replace <repository folder> and <home> before you run this.

    cd <repository folder>/cc2340r5 /Applications/ti/uniflash_9.6.0/dslite.sh --mode flash -c CC2340R5.ccxml -e -f -u <home>/data_stream/freertos/ticlang/data_stream.hex

    You should see: DSLite prints that the flash finished. In the recorded run it connected and wrote on the first try.

  4. Scan for ten seconds from your computer.TERMINAL

    python3 tools/ai_runs/blescan.py 10

    You should see: A line Data Stream with a signal strength in dBm. At 1 to 2 m the recorded runs read about -42 dBm.

  5. Connect to it and time the echo.TERMINAL

    The script writes 20, 64 and 128 bytes, 50 times each, and waits for the board to send the text back with its letter case flipped.

    python3 cc2755p10/ble/ds_echo.py

    You should see: connected + services in about 0.55 s, then a line per size. The recorded run on this board: 45 ms median for 20 bytes, 105 ms for 64, 135 ms for 128.

What to build next

Make a Bluetooth game controller from a LaunchPadTwo buttons become a Bluetooth game controller
Asset tracking over BluetoothRun events, trips, run time and load mix for every machine, on your phone, no internet
Send a message to a satelliteGoal: a message from a CC2755P10 received by a satellite about 550 km up

Every build

If something goes wrong

Nothing appearsTry another cable; a charge-only cable looks the same.
Make cannot find the SDKSysConfig or the compiler, change the three paths to where yours are installed.
It cannot connectCheck that the probe is seated on the board and unplug and replug it. Do not use a mass erase to fix a connection error.
The name is missingPress the board's reset button, run the scan again and keep the Mac close. The Mac shows only some of the advertisements, so a short scan can miss it.
It prints found NoneThe scan did not see the board: repeat step 4 first.
More troubleshooting
Bytes come back wrongThe script says so on the size's line.

Every fix for this board: the FAQ.

Get the code

Ran here, with steps. TI's example seen by a Mac in 1.4 s; 45 ms round trip; no phone app or sensor reading tried

Start it

Paste this in a terminal. It hands off to an AI assistant with this board's notes.

./start.sh cc2340r5 bluetooth-sensor --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs ./start.sh cc2340r5 bluetooth-sensor --assistant claude
Not Claude Code? Copy this prompt instead.
Clone https://github.com/Fox-Red-Labs/fox-red-labs and read cc2340r5/AGENTS.md first. Then run Send a sensor reading to a phone over Bluetooth on my LP-EM-CC2340R5. Tell me when to plug in the board and what you saw at each step.
Only the code for this board
git sparse-checkout set cc2340r5 cc2755p10/blegit 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 cc2755p10/ble
Or take the whole repository
git clone https://github.com/Fox-Red-Labs/fox-red-labs.git
Reports 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

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 limitsTI's example is seen by a Mac in 1.4 s on the CC2340R5 and 0.90 s on the CC2755P10; no sensor reading was taken. Results, sources, timing and limits.

Expected result: Your computer sees a device called Data Stream, connects to it in about half a second, and gets 20 bytes echoed back in about 45 ms. The board sends back what the Mac wrote; it does not read a sensor.

What this shows

  • TI's own Bluetooth example builds from a terminal, flashes, and is found and connected to by a Mac with no pairing.
  • A round trip over Bluetooth takes 45 ms for 20 bytes on this board (one run of 50).
What this does not establish, and limits

What this does not establish

  • A sensor reading in the advertisement or the connection. No sensor was read over Bluetooth on any board in this repository for this project.
  • A phone app: only a Mac script was timed.
  • That the advertisement reaches a phone. No phone run is recorded for this example.

Limits to keep in mind

  • One board, one Mac and one run each, so the timings are single figures.
  • The 45 ms echo is probably paced by the connection interval macOS picks, not by the radio. The interval was not read.
  • The 1.40 s from flash to first sight was measured with TI's basic_ble example, not data_stream.

Sources

Versions, sizes and timing

SoftwareSimpleLink Low Power F3 SDK 9.21.00.36, TI Arm Clang 5.1.1.LTS, SysConfig 1.26.3, DSLite 9.6.0.5764
Connect0.55 s to connect and list services, ATT MTU 65
Echo45.0 / 105.0 / 135.1 ms median round trip at 20 / 64 / 128 bytes, goodput 3.5 / 4.8 / 7.4 kbit/s
First seen after flash1.40 s at 100 ms interval, 0.56 s at 20 ms (basic_ble)

Evidence

  • CC2340R5: TI's data_stream example was connected to from a Mac in 0.55 s (ATT MTU 65), and 20 bytes echoed back in 45.0 ms median over 50 tries with the content checked (2026-10-05, one run).
  • CC2340R5: TI's basic_ble example was first seen on a Mac 1.40 s after the flash command returned at the default 100 ms advertising interval, signal -42 dBm median (2026-10-05, measured once).

Other boards

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

Project
LP-MSPM0G3507MSPM0G3507 chip
LP-MSPM0L1306MSPM0L1306 chip
LP-EM-CC2340R5CC2340R52 chip
LAUNCHXL-F2800137TMS320F2800137 chip
Send a sensor reading to a phone over Bluetooth
LP-MSPM0G3507Not for this chipNo radio
LP-MSPM0L1306Not for this chipNo radio
LP-EM-CC2340R5Could workTI's example seen by a Mac in 1.4 s; 45 ms round trip; no phone app or sensor reading tried
LAUNCHXL-F2800137Not for this chipNo radio on this chip

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 (4)

StatusWhat was triedResult
Could workCan an LP-EM-CC2340R5 answer Nordic's phone apps, nRF Blinky and any Nordic UART terminal?
CC2340R5, 2026-10-12
The CC2340R5 advertises Nordic's LED Button Service and Nordic UART Service and a Mac drives both (LED write answered in 24.3 ms median, 60 of 60 UART lines echoed identical); the LED, the button and the phone...
Could workCan the LP-EM-CC2340R5 be a Bluetooth media remote for a Mac with no app, using TI's Bluetooth stack?
CC2340R5, 2026-10-12
A hand-written HID over GATT service on TI's basic_ble builds to 186.5 kB of flash and 30.9 kB of RAM. It advertises 11.9 s after the flash starts, and macOS calls it a "Compatible LE HID" and asks to pair with Just...
WorksDoes a vendor-free BTHome header work on the ESP32-C6 with less glue than on the TI CC2340R5?
ESP32-C6-DevKitC-1, 2026-10-11
The vendor-free BTHome header drops onto Espressif's NimBLE_Beacon example with 40 lines of glue against TI's 58. That is 35 in one new file and 5 changed elsewhere. The Mac decodes the packets as version 2, with...
WorksDoes a popular ESP32 Bluetooth gamepad library carry over to TI, ST and C2000 boards, and on which boards does it give the same bytes?
ESP32-C6-DevKitC-1, MSPM0 G3519, NUCLEO-U083RC, LAUNCHXL-F2800137, CC2340R5, 2026-10-19
The report core of ESP32-BLE-Gamepad gives the same descriptor and report bytes on the ESP32-C6, the MSPM0 G3519, the NUCLEO-U083RC, the LAUNCHXL-F2800137 and the CC2340R5 (5 of 5 lines each); on the CC2340R5...

Source files

    Code brought from elsewhere

    This project uses code that was written for other chips or tools. Each links to how to get it running.

    Start with your code, and the prompt to port your own