I built BSWorld — a virtual Bluetooth world where AI agents can develop and test Bluetooth software
Hi r/embedded
I’ve been working on an open-source project called BSWorld — a deterministic Bluetooth simulation framework designed to make Bluetooth development accessible to AI coding agents and CI.
GitHub: XiaoMi/bsworld
The idea came from a problem we encountered when using AI for embedded development:
AI can write Bluetooth code, but it can’t operate a hardware Bluetooth lab.
A real Bluetooth test may require multiple boards, flashing firmware, serial ports, power cycling devices, RF interaction, packet capture, and reproducing timing-sensitive failures.
This creates a hard boundary for AI agents. They can modify and compile the code, but once testing requires the physical world, autonomous development largely stops.
BSWorld tries to move that physical Bluetooth lab into software.
Instead of mocking Bluetooth APIs, we run real Bluetooth software inside a deterministic simulated environment and connect simulated controllers to BabbleSim’s radio/PHY simulation.
So an AI agent can potentially complete the whole loop:
modify code → build → boot multiple devices → communicate over simulated RF → run tests → inspect HCI/OTA traces → diagnose failures → modify code again
without anyone touching a physical board.
The simulated RF environment can reproduce things that are normally difficult for an AI agent — or even a human developer — to control precisely:
- multiple Bluetooth devices
- advertising/connection timing
- interference and collisions
- attenuation and packet loss
- HCI traces
- over-the-air packet traces
- deterministic reproduction of failures
- accelerated discrete-time execution
We’re also experimenting with QEMU + BabbleSim discrete-time synchronization, so larger embedded/Linux systems can participate in the same virtual RF world.
Another direction we’re working on is a pure-Python Bluetooth Controller, which would make it much easier for AI agents to manipulate LL behavior, timing and edge cases during testing.
The long-term idea is not just to simulate one Bluetooth stack.
We’d like BSWorld to become a virtual Bluetooth lab for AI agents where different open-source Hosts and Controllers can be composed, tested against each other, and debugged entirely in software.
I’m curious what Bluetooth developers here think:
If an AI agent had access to a fully controllable virtual Bluetooth lab, what Bluetooth bugs or test scenarios would you want it to handle automatically?
2 comments
Mentions
I built BSWorld — a virtual Bluetooth world where AI agents can develop and test Bluetooth software Hi r/embedded I’ve been working on an open-source project called BSWorld — a deterministic Bluetooth simulation framework designed to make Bluetooth development accessible to AI coding agents and CI. GitHub: XiaoMi/bsworld The idea came from a problem we encountered when using AI for embedded development: AI can write Bluetooth code, but it can’t operate a hardware Bluetooth lab. A real Bluetooth test may require multiple boards, flashing firmware, serial ports, power cycling devices, RF interaction, packet capture, and reproducing timing-sensitive failures. This creates a hard boundary for AI agents. They can modify and compile the code, but once testing requires the physical world, autonomous development largely stops. BSWorld tries to move that physical Bluetooth lab into software. Instead of mocking Bluetooth APIs, we run real Bluetooth software inside a deterministic simulated environment and connect simulated controllers to BabbleSim’s radio/PHY simulation. So an AI agent can potentially complete the whole loop: modify code → build → boot multiple devices → communicate over simulated RF → run tests → inspect HCI/OTA traces → diagnose failures → modify code again without anyone touching a physical board. The simulated RF environment can reproduce things that are normally difficult for an AI agent — or even a human developer — to control precisely: - multiple Bluetooth devices - advertising/connection timing - interference and collisions - attenuation and packet loss - HCI traces - over-the-air packet traces - deterministic reproduction of failures - accelerated discrete-time execution We’re also experimenting with QEMU + BabbleSim discrete-time synchronization, so larger embedded/Linux systems can participate in the same virtual RF world. Another direction we’re working on is a pure-Python Bluetooth Controller, which would make it much easier for AI agents to manipulate LL behavior, timing and edge cases during testing. The long-term idea is not just to simulate one Bluetooth stack. We’d like BSWorld to become a virtual Bluetooth lab for AI agents where different open-source Hosts and Controllers can be composed, tested against each other, and debugged entirely in software. I’m curious what Bluetooth developers here think: If an AI agent had access to a fully controllable virtual Bluetooth lab, what Bluetooth bugs or test scenarios would you want it to handle automatically?