We’re excited to announce the release of BleuIO Pro Firmware v1.0.4.14, bringing enhanced control, improved security, and extended functionality to your Bluetooth development experience. This update focuses on giving users more flexibility in automation while keeping sensitive configurations protected.
New: Password Protection for AUTOEXEC List
One of the most significant updates in this release is the ability to lock the AUTOEXEC list with a password.
The AUTOEXEC list allows you to automate commands that run when the device powers on. In previous versions, anyone with access to the device could read, modify, or delete these commands.
With the new password feature, you can now secure your automation scripts by setting a password that prevents unauthorized access or changes.
Once a password is set, the list is locked — meaning it cannot be viewed or modified without entering the correct password.
The password persists through power cycles, ensuring protection even after the device restarts.
Updating the firmware to a different version will clear the password, allowing you to reset it if needed.
This feature is especially useful for developers deploying BleuIO Pro in environments where multiple users might interact with the device, ensuring that sensitive setup scripts remain intact.
Extended Wait Time for AT+WAIT Command
Another improvement is the extended maximum wait time for the AT+WAIT command. Previously limited to 60 seconds, the command can now wait up to 1 hour (3600 seconds) — matching the functionality of the BleuIO (SSD005).
This enhancement provides more flexibility for time-sensitive applications or scenarios that require extended delays between command executions, such as long data collection intervals or connection monitoring.
New Commands Added
To support the new password-protection functionality, several new AT commands have been introduced:
1. AT+SETAUTOEXECPWD
Used to create or set a password for the AUTOEXEC list. If a password already exists, you’ll need to provide the old one before setting a new one.
2. AT+ENTERAUTOEXECPWD
Allows you to enter the password when prompted to access or modify the AUTOEXEC list.
3. AT+CLRAUTOEXECPWD
Used to clear or remove an existing password. To do so, the correct password must be entered first — adding an extra layer of protection.
These commands make it easy to manage your device’s security without complicating the user experience.
Bug Fixes and Improvements
Fixed an issue in verbose mode where some error codes and error messages did not match. This update ensures more accurate debugging information and smoother development workflows.
In this project, we’ll show how to build a real-time air quality monitoring system using the BleuIO USB dongle and Ubidots. The setup listens for Bluetooth Low Energy (BLE) advertising packets from a HibouAir sensor, decodes the CO2, temperature, and humidity data, and sends them directly to Ubidots, where you can visualize and analyze the readings on a live dashboard.
The result is a seamless pipeline from BLE sensor to Ubidots’ cloud platform. This makes it easy to track air quality in real time and share the results with colleagues, clients, or your own IoT applications.
What is Ubidots?
Ubidots is a powerful industrial IoT platform designed to help developers, researchers, and businesses transform raw sensor readings into meaningful insights. More than just a place to store data, Ubidots provides tools to build custom dashboards, alerts, and reports that can be shared across teams or even embedded into products. It is widely used in industries such as smart cities, agriculture, energy, logistics, and healthcare, where real-time monitoring and automation are critical.
By integrating BleuIO with Ubidots, you gain the ability to collect real-time BLE sensor data without the need for complex gateways. The values captured from your sensors can be pushed directly to Ubidots variables through simple HTTPS POST requests, making the process both fast and reliable. Once the data is in Ubidots, you can take advantage of its powerful dashboard features to create professional visualizations with gauges, charts, and triggers, giving you an intuitive way to monitor and analyze your environment.
In short, BleuIO acts as the BLE gateway, and Ubidots becomes the visualization and analytics layer.
HibouAir Sensor – broadcasts CO2, temperature, and humidity.
Python libraries: pip install pyserial requests
Ubidots account (a free version is available).
Ubidots API Token – used to authenticate when posting data to your account.
The Script and How It Works
We’ve written a Python script that automates the whole process from BLE scan to Ubidots push. You can find the full code on GitHub: GitHub Link for Script
Here’s how the script works step by step:
Connects to the BleuIO dongle over the serial port you specify (e.g., /dev/cu.usbmodemXXXX on macOS or COMX on Windows).
Switches the dongle into central mode with the AT+CENTRAL command (done only once).
Scans for HibouAir packets using AT+FINDSCANDATA=220069=3, which looks for advertising data that matches HibouAir’s manufacturer ID.
Selects the last valid packet that contains the expected pattern (5B070504). This ensures we work with the freshest data.
Decodes the advertising data into usable values:
CO in parts per million (ppm).
Temperature in Celsius (°C).
Humidity in relative percent (%RH). The script also applies sanity checks to ignore invalid readings.
Pushes the values to Ubidots via HTTPS POST requests. The request format looks like this: { "co2": { "value": 415 }, "temperature": { "value": 23.4 }, "humidity": { "value": 52.1 } } Each key (co2, temperature, humidity) becomes a variable in Ubidots.
The script repeats this process every 10 seconds, so your dashboard stays updated in real time.
This approach keeps everything lightweight and avoids any need for complex backend servers or brokers.
Output
Once the script is running, your Ubidots device (e.g., bleuio-hibouair) will automatically appear in the Devices section. It will have variables for CO2, temperature, and humidity.
Use Cases
This project can be applied in many real-world scenarios where air quality and environmental monitoring are essential. For example, it can be used for indoor air quality monitoring in offices, classrooms, or laboratories to ensure a healthy environment for occupants. In smart building management, the integration of CO₂ and temperature readings into HVAC systems can help optimize ventilation and energy use. The approach also fits perfectly into cold chain logistics, where continuous temperature and humidity tracking is critical for maintaining the safety and quality of sensitive shipments. In the field of environmental research, this setup provides a quick and reliable way to capture and visualize field data without the need for heavy infrastructure. Finally, it is also ideal for IoT prototyping, as Ubidots makes it easy to build dashboards and visualize sensor data quickly without writing or maintaining a backend system.
With just a BleuIO dongle, a BLE sensor, and a few lines of Python, you can build a real-time IoT dashboard in Ubidots. This project demonstrates how easy it is to collect, decode, and visualize BLE data without needing extra hardware or complicated setups.
This project shows how to turn a BleuIO USB dongle into a tiny gateway that streams live air-quality data from a HibouAir sensor straight to Adafruit IO. The script listens for Bluetooth Low Energy (BLE) advertising packets, decodes CO2, temperature, and humidity, and posts fresh readings to your Adafruit IO feeds every few seconds. The result is a clean, shareable dashboard that updates in real time—perfect for demos, labs, offices, classrooms, and proofs of concept.
What is Adafruit IO—and why pair it with BleuIO?
Adafruit IO is a cloud platform for makers and developers that lets you collect, visualize, and route device data using a simple REST API or MQTT. You don’t need any Adafruit hardware; if you can make an HTTPS request, you can send data. BleuIO fits in beautifully here: the dongle handles the BLE side—scanning and parsing sensor frames—while a short Python script formats those values and pushes them to Adafruit IO. In practice that means you can take any BLE-advertising sensor, translate its packets into numbers, and land them on an IoT-friendly dashboard without servers or containers.
Requirements
To complete this project, you will need:
BleuIO BLE USB Dongle – acts as the BLE central device to capture advertising packets.
Adafruit IO Key – available under your account’s “My Key” page for authentication.
How it works
When you start the script, it opens the BleuIO serial port and switches the dongle into central role the very first time the program runs. From then on it repeatedly performs a short BLE scan that filters for HibouAir advertising frames. The scanner always picks the latest matching packet and decodes the fields we care about: CO2 (ppm), temperature (°C), and humidity (%rH). The script then posts each value to its own Adafruit IO feed over HTTPS. Because Adafruit IO is designed for live IoT data, your dashboard widgets update as soon as new points arrive. The loop cadence is configurable (10 seconds by default), which keeps you comfortably under Adafruit IO’s free-tier request limits.
The code (key points)
The script is intentionally small and readable. It opens the serial device (for example /dev/cu.usbmodemXXXX on macOS or COM7 on Windows), sends the BleuIO commands to scan for a few seconds, and parses the returned “Device Data [ADV]” lines.
A compact decoder extracts CO2, temperature, and humidity from the HibouAir manufacturer data, including the byte order and scaling.
To make the setup painless, credentials are read from variables (AIO_USER, AIO_KEY) and feed names default to co2, temperature, and humidity. Each value is sent to the REST endpoint /api/v2/{username}/feeds/{feed_key}/data with a simple JSON body {"value": <number>}.
The script includes gentle sanity checks (for example, temperature range and humidity bounds) to ignore any malformed frames, and it prints a concise log line each time it pushes fresh data.
Here is the GitHub link with the full source so you can clone and run it as-is or adapt it to other sensors.
How to run the code
Before running, set your serial port and Adafruit IO credentials.
On macOS you can list ports with ls /dev/cu.usbmodem*;
on Windows use Device Manager to find the COM number. Update username and AIO key information, then run the script. The program will put BleuIO into central mode on first launch and, every cycle, will scan, decode, and push CO2, temperature, and humidity to the three feeds. If you see an HTTP 401 error, double-check the AIO key; a 404 usually means a feed name typo. If the script can’t open the serial port, confirm the path and that no other program is holding it open.
Creating Adafruit IO feeds, key, and dashboard
Log in to Adafruit IO and create three feeds named co2, temperature, and humidity. Your AIO Key is available under your account’s “My Key” page; copy it and keep it private. With feeds in place, open the Dashboards section and create a new dashboard for this project (for example, “HibouAir Live”). Add a few blocks: a gauge or line chart for CO₂ (with a range that makes sense for your space), another gauge or slide for temperature, and a slide or line chart for humidity so you can see the trend over time. Each block points to its corresponding feed. As the script posts to those feeds, the blocks will animate and refresh automatically. You can reorder blocks, tweak colors and ranges, and share a read-only link if you want others to watch along.
Output
Once everything is connected, the dashboard shows a live CO2 number in gauge an line chart, an updating temperature value, and a humidity box that advances with each new reading. The values move in near real time as the script cycles, and any spikes or changes in air quality appear immediately.
Use cases
Real-time air-quality dashboards are useful in far more places than a lab bench. Facility manager can watch CO2 levels across meeting rooms to optimize ventilation; schools and libraries can surface temperature and humidity alongside occupancy schedules; small manufacturers can keep an eye on comfort and safety in production spaces; and hobbyists can monitor their home offices or studios. Because the pipeline is “BLE sensor → BleuIO → HTTPS → Adafruit IO,” you can swap HibouAir for other BLE advertisers and reuse the same approach to visualize anything from soil moisture to ambient light.
This project highlights how quickly you can go from BLE broadcast to live cloud dashboard with BleuIO and Adafruit IO. There’s no server to maintain, no container to deploy—just a tiny USB dongle, an air quality monitoring device like HibouAir, a short Python script, and a few clicks on the Adafruit IO site. The result is a shareable, real-time view of your environment that’s easy to extend, brand, and automate.
In this project, we demonstrate how to stream Bluetooth Low Energy (BLE) sensor data directly into Microsoft Power BI using the BleuIO USB dongle. By combining a HibouAir environmental sensor with BleuIO and a simple Python script, we can capture live readings of CO2, temperature, and humidity and display them in real time on a Power BI dashboard.
The goal of this project is to make BLE data visualization simple and accessible. Instead of dealing with complex server setups or containers, BleuIO provides an easy way to turn raw BLE advertising packets into meaningful insights that anyone can understand at a glance.
Why Power BI?
Microsoft Power BI is a business analytics platform designed to turn raw data into interactive dashboards and reports. One of its most powerful features is the ability to handle real-time streaming datasets, allowing live updates from sensors or IoT devices.
For IoT developers and organizations, this is a game-changer. Imagine watching air quality readings from your office appear in real time, or combining BLE sensor data with other business metrics to get a fuller picture of your environment. By using BleuIO as a BLE-to-cloud bridge, developers can integrate IoT data into Power BI dashboards quickly, without heavy infrastructure.
Toggle Historic data analysis ON if you want Power BI to store rows for reporting.
Save the dataset and copy the Push URL that Power BI generates. This will look something like: https://api.powerbi.com/beta/.../datasets/{id}/rows?key=...
This Push URL is what the Python script will use to send live sensor data to your dashboard.
The Script
We wrote a Python script that takes care of the entire process. Once it starts, the script connects to the BleuIO dongle through the serial port and switches it into central mode (this is done only the first time it runs). From then on, it performs a BLE scan every 10 seconds, specifically looking for HibouAir sensor advertising data. When the sensor is found, the script decodes the broadcast payload into CO2, temperature, and humidity values. These values are then packaged into the required JSON format and pushed directly to Power BI, where they appear instantly on your dashboard.
Before running the script, make sure to update two important details:
Dongle port location: On macOS it will look like /dev/cu.usbmodemXXXX, while on Windows it will appear as COMX.
Power BI Push URL: Use the one you generated earlier during the dataset setup.
With the script running and sending live data, the next step is to build your Power BI dashboard.
Go to My workspace in Power BI and click New → Dashboard.
Give the dashboard a descriptive name, for example HibouAir Live Data.
Select + Add a tile → Custom streaming data, then choose the dataset you created earlier.
Pick a visualization type that suits your needs:
A Card to display the current CO₂ value.
A Gauge to track temperature within a target range.
A Line chart to watch humidity changes over time.
Map the fields (CO2, temperature, humidity, timestamp) to each visual and pin them to your dashboard.
Within seconds of running the script, you’ll see live sensor readings begin to appear in your Power BI dashboard — updating automatically with every scan.
Output
Here’s what the final result looks like when the dashboard starts receiving data from the HibouAir sensor.
Use Cases
This project shows just one way to use BLE and Power BI together, but the possibilities are broad. For example, you could build air quality monitoring dashboards in offices, schools, or factories to help maintain healthier environments. In agriculture, farmers could create smart dashboards that combine soil and environmental sensors to optimize crop conditions. The same method can be applied to cold chain logistics, where monitoring temperature and humidity is essential for transporting food or medicine. Fitness and health enthusiasts could stream real-time data from BLE wearables into personal dashboards, making progress more visible and motivating. And for developers, Power BI is an excellent tool for rapid IoT prototyping, offering instant visualization of new sensor data without building a complex backend system.
With BleuIO and Microsoft Power BI, it’s easy to transform BLE sensor broadcasts into live dashboards. This integration makes it possible to visualize environmental data in real time, share insights instantly, and build prototypes faster than ever before. Whether you’re a developer, researcher, or business professional, combining BLE sensors with Power BI opens the door to smarter, data-driven decisions.
We are happy to announce the release of BleuIO firmware v2.7.9.6. This update brings an important new feature designed to make your device more secure: password protection for the AUTOEXEC list.
With this functionality, you can lock your AUTOEXEC list using a password. Once locked, no one can read, modify, or delete the commands inside unless they enter the correct password. The password will remain active even after power cycles, ensuring your setup stays protected. Please note that updating the firmware to a different version will clear the password.
What’s New in v2.7.9.6
Added Functionality
Ability to lock the AUTOEXEC list with a password.
Password protection persists through power cycles.
Updating firmware to another version will clear the password.
New Commands
We’ve introduced three new AT commands to manage this feature:
AT+SETAUTOEXECPWD
Create or change a password for the AUTOEXEC list.Requires the old password if you want to change it.Maximum length: 255 ASCII characters.
Example:AT+SETAUTOEXECPWD=my_password
AT+ENTERAUTOEXECPWD
Used to enter the password when prompted.Grants access to locked commands.
AT+CLRAUTOEXECPWD
Clears the existing password (requires entering the password first).Returns the AUTOEXEC list to an unprotected state.
How to Use the New Feature
The recommended way to use this functionality is:
Add commands to your AUTOEXEC list as usual.
Lock the list by setting a password with AT+SETAUTOEXECPWD.
If you need to make changes later:
Use AT+CLRAUTOEXECPWD to remove the password.
Modify your AUTOEXEC list.
Lock it again using AT+SETAUTOEXECPWD.
When a password is set, the following commands will require authentication first:
AT+CLRAUTOEXECPWD
AT+SETAUTOEXECPWD
AT+AUTOEXEC
AT+AUTOEXECLOOP
AT+CLRAUTOEXEC
Why This Matters
The AUTOEXEC list is a powerful tool that allows you to automate commands when your BleuIO dongle starts up. By adding password protection, you ensure that only authorized users can view or change these startup configurations. This is especially important in production environments where security and stability are critical.
Update Today
We encourage all users to update to v2.7.9.6 to take advantage of this new security feature. For full release notes and instructions, visit our documentation page.
This tutorial walks you through a tiny, privacy-first web app that reads only the advertised CO2 level from a nearby HibouAir sensor using a BleuIO USB BLE dongle. There’s no pairing, cloud, or backend—just your browser, the dongle, and a page that decodes a numeric CO2 value broadcast in BLE advertisements and renders it as a color bar (default window 400–2000 ppm) with a simple “High CO2” warning when your threshold is crossed.
A single HTML file that talks to BleuIO over the Web Serial API. The page puts BleuIO in the central role, periodically runs a targeted scan for your HibouAir Board ID, and parses the Manufacturer Specific Data (MSD) bytes in each advertisement to extract CO2 (ppm). The value drives a horizontal gradient bar; cross the threshold and a warning banner appears. Everything runs locally in the browser.
Try it now:Live demo on GitHub Pages — plug in BleuIO, and press Connect. Make sure to pass correct HibouAir Board ID
Why a CO2-only, browser-based monitor?
CO2 is a practical proxy for ventilation. Elevated levels are associated with stale air, drowsiness, and reduced productivity. Many spaces—meeting rooms, classrooms, offices, homes—benefit from quick visual feedback so people know when to air out the room. Reading only a single, device-computed number from BLE advertisements keeps the design simple, fast, and privacy-preserving.
BLE devices periodically broadcast short advertisement packets with real-time CO2 values. We can read them without pairing.
This page filters to a specific Board ID, captures the advertisement line, extracts the longest hex payload, and then decodes CO2 from a fixed position inside the MSD. The result is mapped to a 0–100% fill of the bar (for a display window of 400–2000 ppm), and we show a banner when CO2 ≥ threshold (default 1000 ppm).
Below is the exact function used in this project:
function decodeCo2FromAdv(hex) {
// sanitize → bytes
hex = (hex || '').replace(/[^0-9A-F]/gi, '');
if (hex.length % 2) hex = hex.slice(0, -1);
const b = new Uint8Array(hex.length / 2);
for (let i = 0; i < b.length; i++) b[i] = parseInt(hex.substr(i*2,2), 16);
// locate MSD anchor and read CO2 at fixed offset (big-endian)
for (let i = 0; i <= b.length - 5; i++) {
if (b[i] === 0x5B && b[i+1] === 0x07 && b[i+2] === 0x05) {
const idx = i + 23; // CO2 MSB position in this layout
if (idx + 1 < b.length) {
return (b[idx] << 8) | b[idx+1]; // ppm
}
}
}
return null;
}
The BLE flow
When you click Connect, the page opens a serial session to BleuIO and sends:
AT+CENTRAL once, to enter scanning mode
AT+FINDSCANDATA=<BOARD_ID>=3 every cycle to run a 3-second targeted scan
The reader consumes lines until BleuIO prints SCAN COMPLETE, then waits and repeats
Each time an advertisement arrives, the page extracts the hex payload, decodes CO2, updates the bar, and toggles the High CO2 banner if the threshold is exceeded.
Output
You’ll see a horizontal color bar labeled with the current CO2 ppm. The bar fills from left to right as values rise within the 400–2000 ppm window. A bold High CO2 banner appears when the reading crosses your threshold (default 1000 ppm), serving as a polite nudge to improve ventilation.
Use cases
This simple CO2 bar works well anywhere people gather and air can get stale. In meeting rooms and classrooms it provides a live cue to crack a window or switch on ventilation as occupancy rises. In open offices it nudges teams toward timely air exchanges, helping reduce stuffiness and afternoon dips in alertness. At home it’s a lightweight way to keep bedrooms and living spaces fresh during gatherings or winter months with closed windows. Shared studios and makerspaces also benefit from quick, ambient feedback without the overhead of dashboards or wall displays.
Because the app reads only a single numeric value that HibouAir already broadcasts, it avoids handling personal data and is easy to deploy in privacy-sensitive environments.
Accuracy & practical notes
This is a lightweight indicator, not a calibration tool. CO2 readings in advertisements update periodically and represent the sensor’s current value. Placement matters: keep your HibouAir within a reasonable range of BleuIO to reduce missed packets. If your environment regularly exceeds the default window, you can adjust the display range and threshold in the code.
Extend the project
You can grow this prototype in several practical directions. Start by logging readings to CSV or IndexedDB for simple trend analysis over days or weeks. If you have multiple sensors, add a multi-device view that scans several Board IDs and presents compact tiles in one page. For automation, trigger a webhook or send a serial command to control a fan or relay whenever CO2 exceeds your threshold. You can also pair it with the earlier Noise Bar and show Noise + CO2 side-by-side for a fuller picture of comfort and productivity.
We are excited to announce the release of BleuIO Firmware v2.7.85. This update brings important fixes and improvements to ensure a smoother and more reliable experience when working with your BleuIO dongle.
What’s New in v2.7.85
This release focuses on bug fixes and performance improvements:
AT+CANCELCONNECT fix – Resolved an issue where the command would incorrectly return an error.
Improved JSON compatibility – Event message codes in verbose mode now include quotes, ensuring proper JSON format for easier parsing.
Better disconnection handling – Fixed a bug where AT+GAPDISCONNECTALL would sometimes fail to disconnect all connected devices.
Multi-device connection fix – Corrected an error where AT+GAPCONNECT returned “Connection limit exceeded” incorrectly when attempting to connect to the 8th device.
By upgrading to the latest firmware, you ensure your BleuIO dongle works at its best with improved stability and compatibility. If you are using BleuIO for projects that involve multiple device connections, JSON parsing, or handling connections/disconnections dynamically, this update is especially important.
Get the Latest Firmware
We recommend all users download and install the v2.7.85 firmware to take advantage of these improvements. Download the latest firmware here
This guide shows how to create a web-only Flutter application that talks to a BleuIO USB BLE dongle directly from the browser. The app is a minimal console: click Connect, send AT commands like AT+CENTRAL or AT+GAPSCAN=3, and watch responses appear in real time. Treat it as a starting point for richer BLE web apps—dashboards, scanners, or device tools—without native installs.
The focus is Flutter for the web. Instead of a mobile build, you’ll run Flutter in the browser and use the Web Serial API to communicate with BleuIO. The included script acts as an example of how to open the serial port, send AT commands, and stream lines back into a Flutter UI. You can use the same pattern to build any BLE-adjacent web app: scan for devices, filter output, parse manufacturer data, or add visualizations—completely in Flutter Web.
How it works
Flutter Web can call browser APIs through dart:html and dart:js_util. The app asks Chrome/Edge to show the serial-port picker, opens the selected BleuIO port at 115200, and writes commands terminated by \r\n. A small pre-newline and micro delays are used so commands don’t concatenate (avoiding errors like AT+CENTRALA). A read loop collects bytes, splits them into lines, and renders them into a console-style panel. Everything runs locally in the browser; nothing is recorded or sent to a server.
Guide
Create a web-only Flutter app
From Terminal, create a project that targets only the web so you don’t see iOS/Android code-sign prompts:
flutter create --platforms=web bleuio-flutter
cd bleuio-flutter
You’ll run exclusively against Chrome (or Edge). No mobile setup is needed.
Select Chrome as the build target
Use Chrome so the Web Serial API is available:
flutter run -d chrome
If you use an IDE, choose Chrome (web) in the device selector. Safari is not supported for Web Serial.
Add the example script
Open lib/main.dart and replace its contents with the example from the repository. That file defines a tiny Web-Serial service (connect, writeLine, continuous read loop) and a simple UI with a status, quick command buttons, a custom command input, and a full-width terminal output.
Try live commands
Click Connect BleuIO and choose your dongle. Send ATI to verify, then AT+CENTRAL to enter central role, and AT+GAPSCAN=3 to perform a three-second scan. The responses stream into the on-page console immediately. Because it’s just AT over serial, you can experiment with any command that BleuIO supports.
Understanding the example
The script is intentionally small so you can lift it into other projects. The service wraps Web Serial and exposes a line stream you can subscribe to from widgets. The UI is a single page that prints lines to a terminal-style view and keeps the scroll pinned to the bottom.
Extending this into a BLE web app
Once you’re comfortable with the console, you can add features that turn it into a BLE tool. Start by parsing common outputs such as GAP scan lines into structured objects with fields like address, RSSI, and name. Add filters and search to highlight target devices.
Use cases
This web-only approach is ideal for demos, workshops, and quick bring-up labs where you want a zero-install experience. It’s handy for field diagnostics when you need to peek at advertisements, confirm firmware state, or prove connectivity from any machine with Chrome. It also serves as a foundation for privacy-respecting dashboards that only read broadcast data and never require native packaging.
The live page streams output as soon as the device is connected. You can keep the tab open as a lightweight serial console while developing other features.
Flutter Web is a great fit for BLE-adjacent tooling when you want the reach of a URL and the feel of a native UI. Start with the example console today, then grow it into the BLE web application your project needs.
This tutorial shows how to build a small, browser-based monitor that reads only the advertised noise level from a nearby HibouAir sensor using a BleuIO USB BLE dongle. There is no pairing, no audio recording, and no microphone access. The page simply listens for Bluetooth Low Energy (BLE) advertisements, decodes a numeric noise value emitted by the sensor, and renders it as a color bar between 40–80 dBSPL. When the value exceeds a threshold you choose, a plain “shhhh” banner appears as a gentle cue to keep things quiet.
Why a Noise-Only, Privacy-Centric Monitor?
The goal is awareness, not surveillance. Many environments benefit from real-time feedback about loudness—libraries, classrooms, shared offices, and homes—yet microphones introduce privacy concerns and data-handling obligations. This project avoids all of that by reading a single numeric value that the HibouAir computes internally and broadcasts publicly. Because BLE advertisements are brief, connectionless, and contain no personally identifiable information or audio, the solution is both practical and privacy-preserving. It gives occupants a clear indication of ambient noise without storing, transmitting, or analyzing conversations.
What You’ll Build
You’ll create a single HTML file that talks to the BleuIO dongle through the Web Serial API. The page switches BleuIO to a central role, periodically runs a targeted scan for your HibouAir device ID, and parses the manufacturer-specific bytes in each advertisement to extract the noise reading. The value is then mapped to a 40–80 dB display range and presented as a horizontal color bar. If the measured level crosses your threshold, the banner appears. Everything runs locally in your browser; there is no backend server and nothing leaves your machine.
Google Chrome or Microsoft Edge on desktop (Web Serial enabled)
Any text editor to save and edit index.html
How It Works
BLE devices periodically broadcast short advertisement packets. These packets can include a manufacturer-specific data (MSD) field where vendors store compact sensor values. Because advertisements are public and unidirectional, you can read them without pairing or maintaining a connection, which makes them ideal for low-overhead telemetry and privacy-first designs.
What We Read
HibouAir encodes a noise metric inside its MSD block. This project looks only for that metric. The page filters scan results to a specific board ID so you capture advertisements from your own sensor. Each time the dongle reports an advertisement line, the page extracts the longest hex payload, finds the MSD anchor, and reads two bytes that represent the noise value.
The BLE Flow
When you click Connect, the browser opens a serial session to BleuIO. The page sends AT+CENTRAL once to set the dongle into scanning mode. Every few seconds, it issues AT+FINDSCANDATA=<BOARD_ID>=3 to perform a three-second targeted scan and then reads the output until the dongle prints “SCAN COMPLETE.” This cadence repeats continuously so your display stays current without spamming the serial interface.
Save the page as index.html and open it with Chrome or Edge on your desktop. Click Connect BleuIO and select the dongle’s serial port. Verify the Board ID matches your HibouAir unit, then click Start. You should see the serial log print “SCANNING…” followed by advertisement lines and “SCAN COMPLETE.” As new packets arrive, the color bar moves within the 40–80 dB range and the banner appears when the measured level meets or exceeds your threshold. The app continues scanning at a steady cadence without manual intervention.
Output
Use Cases
In a library or reading room, the bar provides a quiet, visual nudge to maintain a calm atmosphere without recording anyone. Classrooms can use it to keep group work from spilling into disruption while reassuring students and parents that no audio is captured. Open offices gain a neutral reference during focus periods, with the banner serving as a gentle reminder rather than an alarm. At home, the display helps keep late-night activities considerate of sleeping children or neighbors. Across all of these contexts, the design sidesteps privacy concerns by never collecting voice or content—only a simple loudness number the sensor already computes.
Accuracy and Limitations
The 40–80 dB window is a display choice that covers common indoor scenarios; this is not a calibrated sound level meter. BLE advertisements arrive periodically, so the value updates in small steps rather than continuously. Placement matters: keep the HibouAir and BleuIO within reasonable proximity to reduce missed packets. If the environment is unusually quiet or loud, you can shift the threshold or adjust the visual window to suit your space.
This project demonstrates how to execute a Python script wirelessly from your mobile phone using a BleuIO dongle. By sending simple text commands over Bluetooth Low Energy (BLE) through the Serial Port Service (SPS), the Python script can trigger actions. In our case, the script will retrieve and display CO2, temperature, and humidity values from a nearby BLE air quality monitoring sensor called HibouAir.
This approach opens up many possibilities for interactive projects, sensor monitoring, and remote control applications — all without the need for internet connectivity.
Begin by plugging your BleuIO dongle into the computer. Open a BLE terminal such as the BleuIO Web Terminal or any serial monitor and enable the Serial Port Service. You can do this by entering:
ATASPS1 AT+ADVSTART
This enables the SPS service, ensures incoming data is displayed as ASCII text, and starts advertising so your phone can connect.
The Python Script
The Python script connects to the BleuIO dongle over a serial port and listens for incoming BLE messages. When it receives one of four possible commands — CO2, TEMP, HUM, or ALL — it triggers a scan using the AT+FINDSCANDATA=220069=3 command. Here 220069 is the boardID of HibouAir sensor which we will use to retrieve air quality data in real time. This scans for nearby BLE devices broadcasting the matching advertising data. From the latest packet received, the script decodes and extracts the relevant sensor values.
Below is the complete script. Update the port variable to match your BleuIO’s serial port location.
import serial
import time
import re
def send_and_wait(ser, at_cmd):
ser.write((at_cmd + '\r\n').encode())
time.sleep(2)
output = []
while ser.in_waiting:
line = ser.readline().decode('utf-8', errors='ignore').strip()
output.append(line)
return output
def extract_last_adv_hex(lines):
adv_lines = [l for l in lines if "Device Data [ADV]:" in l]
if not adv_lines:
return None
last_line = adv_lines[-1]
match = re.search(r'([0-9A-Fa-f]{40,})$', last_line)
if match:
return match.group(1)
return None
def parse_co2_temp_hum(adv):
pos = adv.find("5B0705")
if pos == -1:
return None
def parse_val(offset, reverse=True, scale=1.0, signed=False):
raw = adv[pos + offset : pos + offset + 4]
if reverse:
raw = ''.join(reversed([raw[i:i+2] for i in range(0, 4, 2)]))
val = int(raw, 16)
if signed and val > 32767:
val -= 65536
return val / scale
temp_raw = parse_val(22, scale=1, signed=True)
temp = temp_raw / 10
hum = parse_val(26, scale=10)
co2 = int(adv[pos + 46 : pos + 50], 16)
return {
"temp": round(temp, 1),
"hum": round(hum, 1),
"co2": co2
}
# --- Main Loop ---
port = "/dev/cu.usbmodem4048FDEBA6D01"
baudrate = 115200
try:
with serial.Serial(port, baudrate, timeout=1) as ser:
print("Listening for BLE SPS command...")
while True:
line = ser.readline().decode('utf-8', errors='ignore').strip()
if line:
#print(f" Received: {line}")
cmd = line.replace("[Received]:", "").strip().upper()
if cmd in ["CO2", "TEMP", "HUM", "ALL"]:
print(" Scanning for environmental data...")
results = send_and_wait(ser, "AT+FINDSCANDATA=0504220069=3")
adv = extract_last_adv_hex(results)
if adv:
data = parse_co2_temp_hum(adv)
if data:
if cmd == "CO2":
print(f" CO2: {data['co2']} ppm")
elif cmd == "TEMP":
print(f" Temp: {data['temp']} °C")
elif cmd == "HUM":
print(f" Hum: {data['hum']} %")
elif cmd == "ALL":
print(f" Temp: {data['temp']} °C")
print(f" Hum: {data['hum']} %")
print(f" CO2: {data['co2']} ppm")
else:
print(" Could not decode sensor values.")
else:
print(" No advertising data found.")
except serial.SerialException as e:
print("Serial error:", e)
How It Works
Once the script is running, it keeps the serial connection to the BleuIO open and listens for BLE SPS messages sent from the phone. When a command is received, it is cleaned to remove any extra text added by the dongle, then matched against one of the four recognized keywords. If a match is found, the script asks the dongle to scan for nearby advertising packets from a device matching our filter. The script extracts the CO2, temperature, and humidity values, then displays the requested data based on the command.
For example, sending CO2 from the phone will only display the CO2 value, while sending ALL will show all three measurements.
Testing the Project
Run the script on your computer, then use the nRF Connect app on your phone to connect to the BleuIO dongle. Locate the SPS write characteristic (UUID ending in ...5CBA) and send a command in Text mode. Try sending CO2, TEMP, HUM, and ALL to see the different outputs. You should see the values appear in your terminal almost instantly after each command is sent.
Output
Use Cases and Expanding the Idea
This setup goes beyond simply reading CO2, temperature, and humidity. At its core, it is a BLE command-to-script bridge — meaning you can trigger any Python action from your phone without needing Wi-Fi or internet access.
In real-world use, this could be applied to:
Remote environmental monitoring: Trigger on-demand scans for sensor readings in greenhouses, offices, or laboratories.
IoT control panels: Send commands to control connected devices, such as turning fans or air purifiers on when CO2 levels rise.
Data logging systems: Store sensor readings in a file or database only when requested, helping conserve storage and processing power.
Event-based automation: Pair with external hardware like Raspberry Pi GPIO pins to trigger physical actions when commands are received.
Because the commands are just plain text, the possibilities for customization are endless. You could add more commands to control different hardware, run different scripts, or even communicate with multiple BLE devices. This same approach can also integrate with web dashboards, cloud services, or data visualization tools to make the results more accessible and actionable.
This project shows how simple it is to control Python scripts and interact with BLE sensor data using BleuIO and your phone. By combining the SPS profile with AT commands, you can create flexible, interactive tools that can be extended for various IoT applications — from remote environmental monitoring to interactive control systems.