GitHub Digital Lab

Fox Red Labs / Builds / Networking

A Wi-Fi sensor that answers over MQTT

Build TI's MQTT example for the CC35X1, point it at a broker, and time how fast it answers with its temperature and accelerometer. Not connected to Home Assistant.

HardNo wiringno timed run

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

What you need

Works on this board
LP-EM-CC35X1LP-XDS110ET debuggerdebug probe
A computer running an MQTT brokerthe broker the board and the script both talk to
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. Start an MQTT broker that accepts clients without a login.COMPUTER WITH THE BROKER

    Note its address and port.

    You should see: The broker is listening on its port. The test used Mosquitto 2 on port 1883.

  2. Copy TI's example from the SDK to a folder outside this repository: examples/rtos/LP_EM_CC35X1/demos/mqtt_client.TERMINAL

    cp -R /Applications/ti/simplelink_wifi_sdk_10_20_00_39/examples/rtos/LP_EM_CC35X1/demos/mqtt_client ~/mqtt_client

    You should see: A mqtt_client folder in your home folder.

  3. In the copy, set your network name and password in wifi_settings.h (AP_SSID, AP_PASSWORD) and the broker in mqtt_settings.h (MQTT_CONNECTION_ADDRESS, MQTT_CONNECTION_PORT_NUMBER).EDITOR

    You should see: The two files hold your values. The password is now inside the firmware you build.

  4. Build the copy, sign it with the Toolbox's image builder and program it, as in step 4 of the ten-minute path in cc35x1/README.md. cc35x1/prebuild.sh has the build and image commands; use absolute paths.TERMINAL

    Run the ./simplelink-wifi-toolbox command from the Toolbox folder.

    Replace <probe serial> before you run this.

    ./simplelink-wifi-toolbox programmer -i XDS110 -param1 <probe serial> programming --tool_settings <path to the tool_settings.json the image builder wrote>

    You should see: The Toolbox reports the write finished.

  5. Read the board's serial port at 115200 baud, for example with a short Python termios script, and reset the board.SERIAL PORT

    Replace <probe serial> before you run this.

    /Applications/ti/ccs2101/ccs/ccs_base/common/uscif/xds110/xds110reset -s <probe serial>

    You should see: MQTT EVENT: CONNACK and four SUBACK lines.

  6. Set the broker address and port at the top of cc35x1/mqtt-test/request_reply.py.TERMINAL

    Then, from the repository folder, send 20 requests, one every 5 seconds, to the topic the example listens on and wait for the reply topic.

    python3 cc35x1/mqtt-test/request_reply.py 20 5 cc35xx/GetSensors cc35xx/Sensors

    You should see: A line sent 20 replies 20 loss_pct 0.0, a line of latencies in milliseconds with a median near 167 ms, and one sample reply holding the board's temperature and accelerometer values.

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

Detect a person in a room with Wi-FiA board that reads the Wi-Fi in a room and says whether anyone is there
A DNS ad blocker on a Wi-Fi boardA board that answers 0.0.0.0 for ad and tracker names on your network
Blink an LEDThe board's LED blinks, then blinks the pattern you set

Every build

If something goes wrong

At step 1TI's example cannot log in to a broker, so use a throwaway broker on a trusted network, and allow anonymous clients in its settings.
The SDK folder is not thereInstall the Wi-Fi SDK 10.20.00.39 first.
At step 3Keep this copy out of git, and program TI's Network Terminal over it when you are done.
It stops with Path to programming_instructions after path correction couldn't be foundRebuild with an absolute build folder (cc35x1/FAQ.md has the fix).
It stops with Life cycle OPERATIONAL is not validThe chip is not activated: do step 3 of the README's path.
More troubleshooting
The port is silentRead at 115200, the rate of TI's SDK examples; do not use stty then cat on macOS, it reads at the wrong rate.
There is no CONNACKCheck the network name, password and broker address in step 3.
Replies are 0The board and the script are on different brokers or the board never reached CONNACK (step 5).
A few are missingThe Wi-Fi link dropped them: the one-hour run lost none.

Every fix for this board: the FAQ.

Get the code

Paste this in a terminal. It hands off to an AI assistant.

git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs ./start.sh cc35x1 wifi-sensor --assistant claude
Not Claude Code? Copy this prompt instead.
Clone https://github.com/Fox-Red-Labs/fox-red-labs and read cc35x1/AGENTS.md first. Then run Send a sensor reading to Home Assistant over Wi-Fi on my LP-EM-CC35X1, following docs/builds/wifi-sensor.md. Tell me when to plug in a board and what you saw at each step.

The code is in cc35x1/, with notes for your AI assistant in AGENTS.md.

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 MQTT example answers a request in 167 ms median on the CC35X1; not in Home Assistant. Results, sources, timing and limits.

Expected result: The board answers every request with its temperature and accelerometer readings, with a median of about 167 ms through the broker. Nothing reaches Home Assistant in this recipe.

What this shows

  • TI's MQTT example builds from a terminal, joins a home Wi-Fi network and answers 720 of 720 requests over an hour.
  • The reply carries the board's temperature and accelerometer values.
What this does not establish, and limits

What this does not establish

  • That the board appears in Home Assistant. The recorded results list no Home Assistant run, and its MQTT integration was not set up.
  • Anything about security: TI's example cannot log in to a broker, so the broker must allow anonymous clients.
  • Another board: only the CC35X1 ran this.

Limits to keep in mind

  • One board, one network, one hour, a broker on a wired Mac mini and the Mac on Wi-Fi. The 167 ms includes the broker and the Mac script, not only the radio.
  • Your network password is compiled into the image until you program another image over it.

Sources

Versions, sizes and timing

Topicsrequest on cc35xx/GetSensors, reply on cc35xx/SensorsREADME notes
Latency167.4 ms median, 1,206.2 ms slowest, 720 of 720 answered, 0.0 percent lost over 3,604 sthe data (CSV)
SoftwareSimpleLink Wi-Fi SDK 10.20.00.39, Mosquitto 2, Python 3 with paho-mqtt 2README notes

Evidence

  • CC35X1: TI's mqtt_client example answered 720 of 720 requests, one every 5 s over an hour, median 167.4 ms, slowest 1,206.2 ms, nothing lost (2026-10-09, board on 5 GHz Wi-Fi, throwaway Mosquitto 2 broker). the data (CSV)
  • Row radio_cmd_latency, variant mqtt-sensors-request-reply: 167.4 ms median over 720 requests. the data (CSV)

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 Home Assistant over Wi-Fi
LP-MSPM0G3507Not for this chipNo Wi-Fi
LP-MSPM0L1306Not for this chipNo Wi-Fi
LP-EM-CC2340R5Not for this chipNo Wi-Fi radio on this chip
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 (3)

StatusWhat was triedResult
WorksDoes Wi-Fi provisioning over Bluetooth work on the TI LP-EM-CC35X1, and how long from power-up to joined?
CC35X1, 2026-10-09
TI's Wi-Fi provisioning over Bluetooth works without TI's phone app. A Mac script writing four Bluetooth characteristics took the board from reset to a Wi-Fi IP address in 16.5 to 17.8 s, 7.13 s of it after the...
Could workDoes TI's Wi-Fi CSI presence model on the LP-EM-CC35X1 detect a person in a room through the house Wi-Fi, and how well?
CC35X1, 2026-10-09
In a lived-in house the shipped model said "presence" in 98% of scored windows across 21 minutes. In the one phase with a known label, the room empty with the door closed, it said "presence" in 135 of 136 windows. It...
WorksCan an MCU-only thermostat work: a LaunchPad with an LVGL touch screen, a radar sending presence, and a Wi-Fi radio feeding Home Assistant?
MSPM0 G3519, IWRL6432BOOST, CC35X1, 2026-10-10
The screen half runs on live radar data: radar frame to panel in 111 ms median over 10 minutes with 2,310 frames and none dropped, on a two-page screen that also shows a Wi-Fi presence badge. The Mac sits in the radar...

Source files