2026-11-26 15:48 UTC

Xiaomi publishes hardware-free Bluetooth testing framework

state: seedheat: lowuncertainty: mediumrelevance: mediumbluetooth agent-testing software-simulationXiaomi

What is this?

BSWorld is an open-source Bluetooth testing framework from Xiaomi, published in the XiaoMi/bsworld GitHub repository and licensed under Apache 2.0. The repository describes a Linux-based setup in which Bluetooth host stacks and applications run without physical Bluetooth hardware: pytest scenarios coordinate multiple devices over a shared BabbleSim radio and simulation clock. The project documents integrations including BlueZ, Zephyr, NuttX/NimBLE, Apache NimBLE Linux, Trouble and Bumble, with logs and protocol/radio captures for inspection. Its GitHub page and PyPI package are surfaced in the supplied sources, but no dated release announcement or independent adoption evidence is provided. The “AI agents” framing appears in the Show HN title and project description; the documented core capability is Bluetooth testing, not an AI-specific testing method. Repeatability is conditional on identical binaries and inputs and controlled randomness; the README notes that external networks and unadapted, wall-clock-driven I/O can still introduce nondeterminism.

Why it matters

This is useful developer infrastructure rather than a new AI model: it could make Bluetooth integration tests easier to repeat, inspect and run in CI without fleets of physical devices. That may support faster development of connected devices and agent-assisted coding workflows, but the supplied evidence does not establish AI-specific features, broad adoption or measured impact.

Current assessment

Xiaomi’s GitHub repository makes BSWorld available as a hardware-free Bluetooth simulation framework for Linux development and testing. Tests define device topologies and expected behavior in pytest; multiple host stacks run against a shared simulated radio, with simulated time and artifacts including logs, HCI captures and radio traces. The repository documents RF controls such as attenuation and interference injection, plus integrations across several Bluetooth stacks. Its Docker quick start targets Linux/x86_64, while local development specifies Python 3.12 or newer. The project describes deterministic tests, but qualifies repeatability: identical binaries and inputs and controlled random sources are required, and some external or wall-clock-driven behavior can remain nondeterministic. A web result repeats the project’s claim of speeds up to hundreds of times faster than real time; no independent benchmark is supplied, so treat that as an attributed performance claim. The evidence supports availability through GitHub and PyPI, but does not pin down a formal launch date, release maturity, independent use or adoption. The practical implication is potentially lower-cost, more inspectable regression testing for Bluetooth software, including scenarios involving multiple devices and controlled radio conditions; the “for AI agents” positioning is not evidence of an AI-specific capability.

Measured heat

now 0 pts/hpeak 4 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 153h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-20 06:22 (minted)⭐ origin echo-reconstructedBSWorld tests Bluetooth hosts and applications through deterministic simulation, with support for several host stacks, configurable radio sc
Xiaomi on github (echo) · attributed from hn.story.50570766 · published time unknown
—
11-20 06:06first on hacker news · published · lag ?Show HN: BSWorld – AI agents can now test Bluetooth code without hardware
bsworld-runner
—
11-20 06:06amplified on hacker news 👑hn.story.50570766
bsworld-runner
peak 5 · 1 comments · 100% of case engagement
11-20 06:20our radar first saw it · lag ?discovery anchor: hn.story.50570766—
pace: p52 vs 2105 stories at the 96h mark (now 153h old) — ahead of agent-command-multiplayer-rts (1.2x), behind advocacy-groups-sue-ai-companies-to-halt-model-development (0.9x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: BSWorld – AI agents can now test Bluetooth code without hardware
Retrieved article excerpt

Open article · Retrieved 2026-11-20T06:21:22.612732+00:00

[BSWorld](https://github.com/XiaoMi/bsworld/blob/main/docs/images/bsworld-logo.svg)

English | [简体中文](https://github.com/XiaoMi/bsworld/blob/main/docs/zh-CH/README.md)

[CI](https://github.com/XiaoMi/bsworld/actions/workflows/ci.yml) [Release](https://github.com/XiaoMi/bsworld/releases/latest) [PyPI bscontroller](https://pypi.org/project/bscontroller/) [License](https://github.com/XiaoMi/bsworld/blob/main/LICENSE)

BSWorld tests Bluetooth Hosts and applications on Linux through deterministic simulation. Define the topology and expected behavior in pytest. Hosts connect to BSController over H4 HCI and communicate over a shared BabbleSim radio.

- Test open-source Host stacks without hardware or changes to their source code.
- Run multiple devices on one simulation clock. Run independent scenarios in parallel with pytest-xdist.
- Set path attenuation, inject interference and WLAN activity, or replay recorded radio signals.
- Inspect application logs, HCI BTSnoop captures, per-Controller radio captures, and shared Ellisys traces.

## Quick Start

BSWorld runs on Linux/x86\_64.

### Docker

The Docker image ships with BabbleSim, a 32-bit UML kernel, and a Guest root filesystem with the Host executables. Run the integration tests from the repository root on a host with [Docker Engine](https://docs.docker.com/engine/install/ubuntu/).

```
sudo docker pull ghcr.io/xiaomi/bsworld-linux:latest
mkdir -p .cache/docker-results
# The image runs as UID/GID 1000.
sudo chown 1000:1000 .cache/docker-results
sudo docker run --rm \
  --security-opt seccomp=docker/uml-seccomp.json \
  --mount "type=bind,src=$PWD/.cache/docker-results,dst=/output" \
  ghcr.io/xiaomi/bsworld-linux:latest
```

The results in `.cache/docker-results` include `pytest.xml`, process logs, HCI captures, and RF traces. For suite selection, image versions, and local builds, see the [Docker guide](https://github.com/XiaoMi/bsworld/blob/main/docker/README.md).

### Local Linux

Development and tests require Python 3.12 or newer. Install these tools on Ubuntu 24.04.

```
sudo apt-get update
sudo apt-get install -y \
  bash ca-certificates curl git repo file make binutils build-essential \
  python3.12 python3.12-dev python3.12-venv python3-pip \
  gcc-multilib g++-multilib coreutils findutils grep sed
```

Clone BSWorld and install it in a virtual environment.

```
git clone https://github.com/XiaoMi/bsworld.git
cd bsworld
export BSWORLD_ROOT="$PWD"
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e components/bscontroller -e '.[test]'
```

Run the development checks.

```
ruff check .
ruff format --check .
pytest tests/unit -q
```

#### Build and Test

Fetch the BabbleSim revisions pinned in `components/babblesim.xml`.

```
mkdir -p "$BSWORLD_ROOT/.cache/babblesim"
cd "$BSWORLD_ROOT/.cache/babblesim"
repo init --standalone-manifest --depth=1 -u "file://$BSWORLD_ROOT/components/babblesim.xml"
repo sync -c --no-tags
```

Set the build paths and compile BabbleSim.

```
export BSIM_OUT_PATH="$PWD/build"
export BSIM_COMPONENTS_PATH="$PWD/components"
export BSIM_BUILD_FAIL_ASAP=1
make -j"$(nproc)" everything
```

Run the BabbleSim integration tests from the repository root. In a new shell, activate `.venv` and restore `BSWORLD_ROOT` and `BSIM_OUT_PATH` before running the tests.

```
cd "$BSWORLD_ROOT"
pytest tests/integration/babblesim -n auto
```

To run the Host integration suites locally, prepare a 32-bit Guest as described in the [UML test environment guide](https://github.com/XiaoMi/bsworld/blob/main/tests/integration/uml/README.md).

## Supported Integrations

Each suite runs its Host in a UML Guest and tests it against Bumble on the same simulated radio.

| Guest Host | Coverage |
| --- | --- |
| [BlueZ](https://github.com/XiaoMi/bsworld/blob/main/tests/integration/uml/bluez/README.md) | Multi-Guest advertising, scanning, connection and disconnection |
| [Zephyr Bluetooth shell](https://github.com/XiaoMi/bsworld/blob/main/tests/integration/uml/zephyr/README.md) | Advertising, scanning, GATT, pairing, privacy, link updates, periodic advertising and sync transfer |
| [NuttX BTSak and NimBLE](https://github.com/XiaoMi/bsworld/blob/main/tests/integration/uml/nuttx/README.md) | Advertising, multi-device scanning, interference recovery, GATT reads, writes and notifications |
| [Apache NimBLE Linux](https://github.com/XiaoMi/bsworld/blob/main/tests/integration/uml/nimble/README.md) | Discovery and connection |
| [TrouBLE](https://github.com/XiaoMi/bsworld/blob/main/tests/integration/uml/trouble/README.md) | Battery Service discovery, reads, and notifications in both roles |

## Technical Architecture

Each Host connects to its own BSController over H4 HCI. The Controllers, the pytest clock, and any configured interference sources share a BabbleSim PHY.

Bumble runs in the pytest event loop. Each UML Guest runs in a separate process and receives simulation time from that loop through its own time-travel socket. A topology can run several Guests together.

[Bluetooth Hosts connected through BSController workers to a shared BabbleSim PHY](https://github.com/XiaoMi/bsworld/blob/main/docs/images/babblesim_arch.svg)  
*Figure 1: BSWorld architecture*

To set per-Controller options such as device address, buffer sizes, and Bluetooth version, see [BSController configuration](https://github.com/XiaoMi/bsworld/blob/main/docs/controllers.md).

Open `hciN.snoop` and `radioN.pcapng` in Wireshark to inspect a Controller's HCI traffic and radio activity. The shared `babblesim/ellisys.bttrp` collects BSController transmissions for Ellisys. For capture scope and file locations, see [Logs, traces, and captures](https://github.com/XiaoMi/bsworld/blob/main/docs/artifacts.md).

### Discrete-Time Scheduling

| Time base | Meaning |
| --- | --- |
| **Simulation time** | Advances when all PHY participants synchronize. It governs protocol timers, packet timing, RF events, asyncio waits, and test timeouts. |
| **Wall-clock time** | Measures test duration on the host and varies with CPU load and Linux scheduling. |

After startup, standard `asyncio` waits and timeouts use simulation time. See [Async waiting and simulation time](https://github.com/XiaoMi/bsworld/blob/main/docs/writing-tests.md#async-waiting-and-simulation-time) for examples.

Repeatability assumes identical binaries and inputs and controlled random sources. External networks, wall-clock-driven services, and other unadapted Host I/O can still introduce nondeterminism.

## Documentation

- [Write tests and configure RF scenarios](https://github.com/XiaoMi/bsworld/blob/main/docs/writing-tests.md)
- [Allocate and configure BSControllers](https://github.com/XiaoMi/bsworld/blob/main/docs/controllers.md)
- [Find logs, traces, and captures](https://github.com/XiaoMi/bsworld/blob/main/docs/artifacts.md)
- [Run unit tests, lint checks, and coverage](https://github.com/XiaoMi/bsworld/blob/main/docs/development.md)
- [Build or run the Docker test image](https://github.com/XiaoMi/bsworld/blob/main/docker/README.md)

## Community

- [Contributing](https://github.com/XiaoMi/bsworld/blob/main/CONTRIBUTING.md)
- [Code of Conduct](https://github.com/XiaoMi/bsworld/blob/main/CODE_OF_CONDUCT.md)
- [Security Policy](https://github.com/XiaoMi/bsworld/blob/main/SECURITY.md)

## License

BSWorld is licensed under the [Apache License 2.0](https://github.com/XiaoMi/bsworld/blob/main/LICENSE). For third-party licenses, see [Third-Party Notices](https://github.com/XiaoMi/bsworld/blob/main/THIRD_PARTY_NOTICES.md).
bsworld-runner51
🟧 echo.github ⭐BSWorld tests Bluetooth hosts and applications through deterministic simulation, with support for several host stacks, configurable radio scXiaomi——

Interpretation history

Decision trace