Turn an RP2040 or RP2350 Board into a HibouAir Gateway with BleuIO

In this tutorial, we will look at how the BleuIO USB dongle can add Bluetooth Low Energy communication to an RP2040 or RP2350 development board.

The project uses the open-source Pico I/O Bridge firmware. It allows a supported development board to work as a USB host for BleuIO. BleuIO scans nearby HibouAir sensors, and the board displays the latest sensor data through a simple browser interface.

The board also creates a small USB network connection with the computer. This means the dashboard can be opened directly in a web browser without installing a desktop application or connecting the board to Wi-Fi. The firmware is written in Rust and exposes its interfaces through a local .local address.

This project is a useful example of how BleuIO can provide BLE communication to development boards that do not have built-in Bluetooth. The board handles USB hosting and networking, while BleuIO handles Bluetooth scanning.

Requirements

You will need:

What Does This Project Do?

The project creates a simple connection between HibouAir sensors, BleuIO and your computer.

1. HibouAir broadcasts sensor data

HibouAir sensors regularly broadcast their measurements using Bluetooth Low Energy advertising packets.

Depending on the HibouAir model, these broadcasts can contain parameters such as: Temperature, Humidity, Pressure, CO2, VOC, Noise, PM1.0, PM2.5, PM10, Ambient light

Because the project reads BLE advertising data, the HibouAir sensors do not need to be paired with the development board.

2. BleuIO receives the BLE advertisements

BleuIO is connected to the USB-A host port of the development board.

After BleuIO is detected, the firmware manages the scanning process automatically. BleuIO searches for nearby HibouAir advertisements and sends the received data to the board.

This is an important part of the project: the RP2040 or RP2350 board does not need its own Bluetooth radio. BleuIO provides the Bluetooth Low Energy functionality through USB.

3. The board decodes the HibouAir data

The firmware reads the BLE scan results from BleuIO and decodes the HibouAir manufacturer data.

It identifies the HibouAir sensor ID and sensor type before extracting the measurements supported by that particular model.

The firmware keeps the latest readings for up to eight HibouAir sensors in memory. When no sensor filter has been configured, sensors are discovered automatically.

4. The results appear in a web browser

The development board appears on the computer as a small USB Ethernet device. It provides its own local IP network and advertises a unique .local hostname.

The browser dashboard shows: BleuIO connection status, USB transfer status, Number of HibouAir sensors discovered, HibouAir sensor IDs, Sensor types, Latest measurements, Time since the last advertisement, Number of reports received

The dashboard updates automatically while BleuIO continues scanning.

How to Run the Project

The complete project is available on GitHub:

Pico I/O Bridge GitHub repository

There are two ways to run it:

  1. Flash a pre-built firmware file.
  2. Build the firmware from the Rust source code.

Using a pre-built firmware file is the easiest method.

Method 1: Use the Pre-Built Firmware

Step 1: Download the firmware

Open the project’s release page:

Pico I/O Bridge v0.2.0 release

The release contains pre-built UF2 firmware files for the supported board profiles, together with a checksum file.

Download the UF2 file that matches your board.

For this project, select the firmware for either:

Adafruit Feather RP2040 USB Host

or:

Waveshare RP2350 USB-A

Do not flash firmware intended for a different board model.

Step 2: Put the board into bootloader mode

Disconnect the board from the computer.

Put the board into its normal UF2 or BOOTSEL flashing mode. The exact button combination depends on the board, so follow the normal bootloader procedure for your development board.

When the board enters bootloader mode, it should appear on the computer as a removable USB drive.

Step 3: Flash the UF2 file

Copy the downloaded UF2 file to the board’s removable drive.

The board should restart automatically after the file has been copied.

Wait a few seconds for the firmware to start and for the USB network connection to become available.

Step 4: Connect BleuIO

Insert the BleuIO USB dongle into the USB-A host port of the development board.

The physical connection should look like this:

Do not connect BleuIO directly to the computer for this setup. It needs to be connected to the USB host port on the development board.

Step 5: Power the HibouAir sensors

Make sure your HibouAir sensors are powered on and located within Bluetooth range of BleuIO.

No Bluetooth pairing process is required. The sensors simply need to be broadcasting their normal BLE advertisement data.

Step 6: Find the board hostname

Each board creates a unique .local hostname.

For the Adafruit Feather RP2040 USB Host, it will follow this format:

pico-io-usb-host-xxxxxx.local

For the Waveshare RP2350 USB-A, it will follow this format:

pico-io-waveshare-rp2350-xxxxxx.local

Replace xxxxxx with the unique identifier assigned to your board.

On macOS, the board can also be discovered through the built-in dns-sd utility:

dns-sd -B _http._tcp

The project advertises its web interface through mDNS and DNS Service Discovery.

On Windows, the optional mDNS Discovery utility can be used to view available mDNS and DNS-SD services.

Step 7: Open the web interface

Open a browser and enter the board hostname.

For example:

http://pico-io-usb-host-244c29.local/usb-host.html

Use your board’s actual hostname rather than the example above.

The USB-host-enabled profiles expose the USB status page at:

/usb-host.html

The web interface and the USB-host API are included whenever the firmware is built with the pio-usb-host feature.

Step 8: Wait for BleuIO to become ready

After opening the page, check the USB section.

You should see a status similar to:

BleuIO Ready

You should also see:

BleuIO HibouAir scanner ready

Once BleuIO is ready, the managed HibouAir scan begins automatically.

Nearby HibouAir sensors should start appearing as individual cards. The first results may take a few seconds, depending on the sensors’ advertisement intervals.

Expected Output

The page should show each discovered HibouAir sensor with its sensor ID, sensor model and latest measurements.

Method 2: Build the Firmware from Source

Developers can also clone the complete project and build the firmware using Rust.

Clone the repository:

git clone https://github.com/ulso/pico-io-bridge.git
cd pico-io-bridge

Build for the Adafruit Feather RP2040 USB Host

cargo build --locked --release \
  --no-default-features \
  --features board-adafruit-rp2040-usb-host

Build for the Waveshare RP2350 USB-A

cargo build --locked --release \
  --target thumbv8m.main-none-eabihf \
  --no-default-features \
  --features board-waveshare-rp2350-usb-a

The RP2040 and RP2350 profiles use different Rust target configurations, so it is important to use the command intended for your board.

With the board in BOOTSEL mode, the project can also be built and flashed using the appropriate cargo run command. The repository contains the full toolchain and flashing details for developers who want to modify the firmware.

The complete source code, build instructions and examples are available in the Pico I/O Bridge GitHub repository. Additional project screenshots can be found in the Pico I/O Bridge Wiki.

Share this post on :

BleuIO Pro Firmware v1.0.7.0 Released: Improved Stability, Better Scan Handling

We are pleased to announce the release of BleuIO Pro firmware v1.0.7.0. This update focuses on improving stability, increasing BLE scan reliability during high-traffic scenarios, and adding a new command for retrieving RSSI values from active connections.

The latest firmware is now available for download from the BleuIO Pro firmware documentation page. Users can update their device by following the firmware update instructions here:

What’s New in Firmware v1.0.7.0

Improved Stability and Scan Performance

One of the key improvements in this release is the way BleuIO Pro handles BLE scan responses and USB logging. In previous versions, high BLE traffic could occasionally cause scan data to be lost when USB logging was happening at the same time.

To address this, scan result parsing and USB logging have now been moved to a dedicated Scan Processing Task. This separates time-sensitive BLE operations from heavier processing tasks, resulting in better performance and improved reliability.

A new FIFO scan response queue has also been added. This queue passes scan data from the BLE Task to the Scan Processing Task in an organized and efficient way. As a result, BleuIO Pro can now handle high-traffic BLE environments more reliably, especially when many nearby devices are advertising at the same time.

Better Handling of Shared Resources

This firmware also resolves potential race conditions between USB, BLE, and Scan Processing tasks. Mutexes have been added to protect shared resources, helping ensure that different tasks can work together safely without interfering with each other.

These changes make BleuIO Pro more stable and dependable for developers working with continuous scanning, logging, and data-heavy BLE applications.

New AT Command: AT+CONNRSSI

Firmware v1.0.7.0 introduces a new command:

AT+CONNRSSI

This command retrieves the RSSI value from an active BLE connection. It is useful for applications where signal strength monitoring is important, such as proximity detection, connection quality tracking, diagnostics, and BLE performance testing.

With this addition, developers now have a simple way to check the signal strength of a connected BLE device directly through the AT command interface.

Bug Fix: USB Device Serial Number Display

This release also fixes an issue where the USB Device Information Serial Number was truncated and only showed the first three digits.

With firmware v1.0.7.0, the serial number is now displayed correctly, making device identification and debugging more reliable.

How to Update

There are two ways to update your BleuIO Pro firmware.

You can download the latest firmware and follow the update instructions from the official documentation:

https://www.bleuio.com/getting_started/docs/firmware_pro/#latest-firmware

You can also update the firmware using the BleuIO web app:

https://bleuio.com/bleuioapp/#/fw

We recommend all BleuIO Pro users update to the latest firmware to benefit from these improvements.

Share this post on :

Send HibouAir Temperature and Humidity Data to openSenseMap Using BleuIO

In this project, we are going to build a simple air quality data-sharing system using a BleuIO USB dongle, a HibouAir sensor, Python, and openSenseMap.

The goal of this project is to collect temperature and humidity data from a HibouAir sensor over Bluetooth Low Energy and publish the values online using openSenseMap. Once the data is uploaded to openSenseMap, it can be viewed publicly and shared with others.

This is a minimal project designed to show how BleuIO can be used as a BLE gateway for collecting environmental sensor data and sending it to an online platform. The same idea can later be expanded to include other air quality parameters such as CO2, VOC, particulate matter, pressure, or other sensor values.

What is openSenseMap?

openSenseMap is an open data platform for environmental sensor data. It allows users to create a virtual sensor station, called a senseBox, and upload measurements from different sensors.

By using openSenseMap, we can make our air quality data public and easy to access. This is useful for projects related to environmental monitoring, smart cities, classrooms, research, and IoT demonstrations.

In this project, we will create a senseBox on openSenseMap and add two sensors:

  • Temperature
  • Relative humidity

The Python script will read these values from the HibouAir BLE advertisement and upload them to the correct openSenseMap sensor IDs.

Project Requirements

To complete this project, we need the following hardware and software:

No extra microcontroller, BLE pairing, database, or web server is required. BleuIO connects directly to the computer through USB and is controlled using AT commands from the Python script.

Setting Up openSenseMap

First, create an account on openSenseMap. After logging in, create a new senseBox. This senseBox will represent the sensor station where our HibouAir measurements will be uploaded.

Inside the senseBox, create two sensors:

  • Temperature with unit °C
  • Relative humidity with unit %RH

After creating the senseBox and sensors, openSenseMap will provide different IDs. We need to copy and save the following values:

  • senseBox ID
  • Temperature sensor ID
  • Humidity sensor ID

These IDs are important because the Python script uses them to know where to upload each measurement. The senseBox ID identifies the box, while each sensor ID identifies the individual measurement field.

Configuring the Project

The project uses an info.txt file to store the required IDs and configuration values.

If info.txt does not already exist, copy the example file:

cp info.example.txt info.txt

Then add the openSenseMap IDs and the HibouAir board ID:

OPENSENSEMAP_BOX_ID=your_box_id_here
SENSOR_ID_TEMPERATURE=your_temperature_sensor_id_here
SENSOR_ID_HUMIDITY=your_humidity_sensor_id_here
HIBOUAIR_SENSOR_ID=220069

# Optional on macOS:
# BLEUIO_PORT=/dev/cu.usbmodemXXXX

The HIBOUAIR_SENSOR_ID is the board ID printed on the HibouAir sensor. The script uses this ID to filter BLE advertisements and make sure it is reading data from the correct device.

Normally, the script automatically finds the BleuIO serial port on macOS by checking /dev/cu.usbmodem* and /dev/cu.usbserial*. If needed, the port can also be added manually in info.txt.

The info.txt file is excluded from Git using .gitignore, so private box IDs and sensor IDs are not committed to the repository.

Installing Dependencies

Open Terminal, go to the project directory, and run:

python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements.txt

The project uses only two Python packages:

  • pyserial
  • requests

pyserial is used to communicate with the BleuIO dongle over the serial port, and requests is used to upload data to openSenseMap.

How the Project Works

The BleuIO USB dongle is connected directly to the Mac. The Python script opens the BleuIO serial port and sends AT commands to scan for BLE advertisements from the HibouAir sensor.

The script uses the HibouAir board ID to filter the scan result. For example:

AT+FINDSCANDATA=220069=5

This command asks BleuIO to search for advertised data containing the board ID 220069 for five seconds.

When the scan response is received, the script decodes the latest valid HibouAir advertisement. It extracts only two values. Temperature and Relative humidity,

After decoding the values, the script uploads them to the configured openSenseMap senseBox using the temperature and humidity sensor IDs.

The upload process repeats every 60 seconds.

Only temperature and humidity are uploaded. Bluetooth addresses, raw advertising payloads, and other sensor values are not sent to openSenseMap or saved to a file.

Running the Script

Connect BleuIO to the Computer and run:

python3 main.py

Press Ctrl+C to stop the logger.

Example output:

## BleuIO HibouAir openSenseMap Logger

Using port: /dev/cu.usbmodem4048FDE52CF21
Checking BleuIO...
BleuIO responded OK

Scanning for HibouAir sensor ID: 220069
Scan command: AT+FINDSCANDATA=220069=5
Waiting for BleuIO scan response...

Decoded HibouAir data:
Temperature: 24.3 °C
Humidity: 42.8 %RH

Uploading to openSenseMap...
Temperature uploaded successfully
Humidity uploaded successfully

Waiting 60 seconds before next scan...

The script reads the BleuIO response, decodes the temperature and humidity values, uploads them to openSenseMap, and then waits before starting the next scan.

Outputs

Source Code

The full source code for this project is available on GitHub.

Users can download the project, configure their own openSenseMap IDs, add their HibouAir board ID, and run the script on their own system.

GitHub URL:

https://github.com/smart-sensor-devices-ab/bleuio_opensensemap

Expanding the Project

This project currently uploads only temperature and humidity, but it can be expanded easily.

Users can modify the script to decode and upload more environmental parameters, such as: CO2, VOC, Particulate matter, Air pressure, Light level etc.

Additional sensors can also be created in openSenseMap, and their sensor IDs can be added to the configuration file. This makes the project flexible for different air quality monitoring and IoT applications.

With only a BleuIO USB dongle, a HibouAir sensor, and a Python script, we can collect temperature and humidity data and make it publicly available. The project is easy to set up, requires no BLE pairing, and can be extended for more advanced air quality monitoring applications.

Share this post on :

BleuIO Firmware v2.8.0.2 Released: Improved BLE Scan Stability

We are pleased to announce the release of BleuIO firmware v2.8.0.2.

This update focuses on improving BLE scanning reliability, increasing data throughput during high-traffic scenarios, and adding a new AT command for checking the RSSI value of an active connection.

Improved BLE Scan Stability

One of the key improvements in this release is a more stable and efficient BLE scanning architecture.

With firmware v2.8.0.2, scan result parsing and USB logging have been moved to a dedicated Scan Processing Task. This separates scan data handling from the main BLE task, allowing BleuIO to process scan responses more reliably during high-traffic spikes.

New FIFO Scan Queue

To support this improved architecture, we have introduced a new FIFO scan response queue.

This queue passes scan data from the BLE Task to the Scan Processing Task in an orderly way. By separating BLE scanning from USB logging, BleuIO can now handle incoming scan responses more efficiently and reduce the chance of missed data when many BLE devices are advertising nearby.

Increased Data Throughput

The new scan processing flow helps increase overall data throughput.

By preventing USB logging from blocking or slowing down BLE scan handling, BleuIO can maintain better performance in busy BLE environments. This is especially useful for applications that rely on continuous scanning, device discovery, beacon monitoring, or BLE traffic analysis.

Resolved Race Conditions

Firmware v2.8.0.2 also includes improvements to resource handling between different internal tasks.

Mutexes have been added to protect shared resources used by the USB, BLE, and Scan Processing tasks. This helps prevent race conditions and improves overall firmware stability.

New AT Command: AT+CONNRSSI

This release also adds a new AT command:

AT+CONNRSSI

The AT+CONNRSSI command retrieves the RSSI value from an active BLE connection. This makes it easier for developers to monitor signal strength while a connection is active.

Example in Default Mode

AT+CONNRSSI
OK

Connection 0000 rssi: -62

Example in Verbose Mode

AT+CONNRSSI
{"C":26,"cmd":"AT+CONNRSSI"}
{"A":26,"err":0,"errMsg":"ok"}
{"R":26,"conn_idx":"0000","rssi":"-60"}
{"E":26,"nol":4}

This command can be useful in applications where connection quality, distance estimation, or signal monitoring is important.

Why This Update Matters

BleuIO is used in many development and production environments where stable BLE communication is essential. Firmware v2.8.0.2 improves reliability when scanning in crowded BLE environments and provides developers with a simple way to check the RSSI of active connections.

Whether you are building BLE gateways, testing BLE devices, monitoring beacons, or developing connected products, this release provides a more stable and responsive experience.

Update Your BleuIO Firmware

We recommend updating to BleuIO firmware v2.8.0.2 to take advantage of the latest stability improvements and the new AT+CONNRSSI command.

For more information about BleuIO and available AT commands and firmware updates, please visit the BleuIO documentation.

Share this post on :

Build a BLE RSSI Heatmap Visualizer Using BleuIO

Bluetooth Low Energy devices are everywhere, from smart sensors and beacons to IoT devices and proximity-based applications. When working with BLE, developers often need a quick way to scan nearby advertising devices and understand their signal strength.

In this project, we build a simple BLE RSSI Heatmap Visualizer using the BleuIO USB dongle. The application runs directly in the browser and connects to BleuIO through the serial port. It performs a BLE scan, reads nearby advertising devices, extracts their RSSI values, and displays them in a visual heatmap.

This is helpful because raw BLE scan output can be difficult to read, especially when many devices are advertising at the same time. With this visualizer, developers can quickly see which devices have strong, medium, or weak signal strength.

BleuIO makes this project simple because it handles the BLE scanning through easy AT commands. Instead of writing low-level Bluetooth code, we can send commands from JavaScript and focus on building the visualization.

Requirements

To try this project, you need:

How It Works

The application connects to the BleuIO dongle using the browser’s Web Serial API. Once connected, it sends BleuIO AT commands to put the dongle into central scanning mode and start a BLE GAP scan.

The main commands used are:

AT+CENTRAL
AT+SHOWRSSI=1
AT+GAPSCAN=5

AT+CENTRAL prepares BleuIO for scanning. AT+SHOWRSSI=1 enables RSSI values in the scan output. AT+GAPSCAN=5 scans nearby BLE devices for 5 seconds.

The browser app then reads the serial output and looks for device information such as MAC address, RSSI value, and device name if available. Each device is grouped based on RSSI strength.

The signal categories are simple:

Strong signal: RSSI >= -50
Medium signal: RSSI between -51 and -70
Weak signal: RSSI <= -71

The heatmap places BleuIO at the center and displays nearby BLE devices around it. Stronger devices appear closer to the center, while weaker devices appear farther away. The device bubbles are also color-coded, making it easier to understand the BLE environment at a glance.

A table below the heatmap shows the detected devices with MAC address, RSSI, name, signal category, and last seen time.

GitHub Project Code

The full source code is available here:

https://github.com/smart-sensor-devices-ab/ble-rss-heatmap-visualizer

You can download or clone the project and open it in a supported browser.

Live Testing

You can also try the live version here:

https://smart-sensor-devices-ab.github.io/ble-rss-heatmap-visualizer/

To test it:

  1. Plug in the BleuIO USB dongle.
  2. Open the live page in your browser.
  3. Click Connect.
  4. Select the BleuIO serial port.
  5. Click Scan.
  6. View the BLE RSSI heatmap and detected device table.

Output Screenshot

Add output screenshot here.

This is an example project showing how BleuIO can be used with the Web Serial API to build a practical BLE scanning and visualization tool. Developers can use the source code as a starting point and modify it for their own use cases.

For example, the project can be extended to scan for a longer period of time, change the RSSI threshold values, filter specific devices, highlight known BLE sensors, or integrate the scan results into a larger web dashboard.

Because BleuIO works with simple AT commands over serial, it is easy to integrate with different programming languages, platforms, and browser-based tools like this one.

Share this post on :

Using BleuIO with Fortran to Scan and Decode BLE Advertising Data

Bluetooth Low Energy development is often associated with languages like C, Python, JavaScript, or mobile frameworks. But with BleuIO, BLE communication becomes accessible from almost any programming language that can work with a serial port. In this tutorial, we will build a simple Fortran terminal application that connects to a BleuIO USB dongle, sends AT commands, scans for nearby HibouAir BLE advertisements, decodes the advertising data, and prints the sensor values directly in the terminal.

This project is intentionally small and beginner-friendly. The goal is not to build a full production BLE application, but to demonstrate how Fortran can communicate with BLE devices through BleuIO using simple serial communication.

Why Fortran for a BLE Example?

Fortran is one of the oldest programming languages still actively used today, especially in scientific computing, engineering, numerical modelling, and high-performance applications. While Fortran is not normally the first language people think of for BLE development, this example shows an interesting advantage of using BleuIO.

What We Are Building

The application does the following:

It connects to a BleuIO USB dongle using serial terminal. Then it configures the serial port and sends BleuIO AT commands. After that, it starts a filtered BLE scan for HibouAir advertisements using the command:

AT+FINDSCANDATA=FF5B07

The program then reads the incoming scan data, extracts the advertising payload, decodes the HibouAir manufacturer data, and prints values such as sensor ID, light or noise, pressure, temperature, humidity, CO2, and particulate matter values where available. The README also notes that the program automatically searches for a BleuIO dongle using VID 0x2dcf and PID 0x6002.

Project Requirements

Before running the project, install the required packages on macOS using Homebrew:

brew install gcc libserialport pkg-config

You will also need the following hardware:

1. BleuIO USB dongle
2. HibouAir CO2 Sensor

Getting the Project

The full source code is available on GitHub:

https://github.com/smart-sensor-devices-ab/bleuio-fortran

Building the Project

Build the project with:

make

This creates the executable:

./bleuio_fortran_scanner

The README confirms that the project is built using make and creates the bleuio_fortran_scanner binary.

Running the Project

Run the scanner from the terminal:

./bleuio_fortran_scanner

Once started, the program searches for the connected BleuIO dongle, opens the serial port, prepares the dongle, and starts scanning for HibouAir BLE advertisements.

You can stop the program at any time using:

Ctrl-C

How It Works

The project is split into small Fortran source files to keep the example easy to understand.

The libserialport_bindings.f90 file contains the small ISO_C_BINDING interface required to call libserialport. The serial_utils.f90 file handles finding, opening, configuring, reading from, writing to, and closing the serial port. The bleuio_commands.f90 file contains helper procedures for sending BleuIO AT commands. The simple_json.f90 file extracts the predictable fields needed from the BleuIO scan response. The hibouair_decoder.f90 file decodes HibouAir manufacturer data and prints the sensor values. Finally, main.f90 contains the main scanner flow.

The main idea is simple. BleuIO receives BLE advertising data and returns it through the serial port. The Fortran application reads each line, checks whether it contains valid scan data, extracts the advertisement payload, and decodes the bytes according to the HibouAir data format.

Because BleuIO handles the BLE communication, the Fortran code does not need to manage Bluetooth scanning directly. It only sends AT commands and reads the response.

Example Output

When a HibouAir CO₂ sensor is found, the terminal output looks like this:

BleuIO Fortran HibouAir Scanner
--------------------------------
Searching for BleuIO dongle...
Connected: /dev/tty.usbmodemXXXX

Sensor ID: 123ABC
Light: 52 Lux
Pressure: 1012.4 hPA
Temperature: 23.6 C
Humidity: 45.1 %rh
CO2: 612 ppm

For a PM sensor board, the output includes particulate matter values:

  Sensor ID: 456DEF
Light: 38 Lux
Pressure: 1011.8 hPA
Temperature: 22.9 C
Humidity: 47.2 %rh
PM 1.0: 2.1 ug/m3
PM 2.5: 4.8 ug/m3
PM 10: 7.3 ug/m3
CO2: 0 ppm

These sample outputs are also included in the project README.

Output Screenshot

Add a screenshot here showing the terminal running the Fortran application and printing decoded HibouAir sensor values.

Further Development

This project is a simple example showing how BleuIO can be used with Fortran when building BLE applications. It demonstrates the basic workflow: connect to BleuIO through a serial port, send AT commands, scan for BLE advertisements, read the response, and decode the data.

Developers can use this example as a starting point and expand it for their own projects. For example, the script could be extended to save sensor readings to a file, export data as CSV, monitor multiple HibouAir devices, trigger alerts when CO₂ or PM values are high, or integrate the data with scientific and engineering workflows where Fortran is already used.

Share this post on :

Building a BLE Application with Zig and BleuIO: Reading Sensor Data from HibouAir

In this tutorial, we will build a lightweight command-line application that interacts with Bluetooth Low Energy (BLE) devices using Zig and a BleuIO USB dongle. The application will scan for nearby BLE advertisements and decode sensor data broadcast by a HibouAir device. While HibouAir is used here as a test case, the main goal is to demonstrate how BleuIO simplifies BLE application development and how Zig can be used to build efficient, low-level tools for working with wireless data. By the end of this guide, you will have a working example of a BLE-powered CLI tool that reads, processes, and displays real-time data directly in your terminal.

About ZipLang (Zig)

Zig is a modern systems programming language designed with a focus on simplicity, performance, and control over hardware resources. It is particularly well-suited for applications that require direct interaction with devices, such as serial communication and embedded systems. In this project, Zig is used to communicate with the BleuIO dongle over a serial interface, process incoming BLE scan data, and decode raw payloads into meaningful values. Its minimal runtime and explicit design make it a strong choice for building reliable BLE tools without unnecessary abstraction.

Project Requirements

Hardware

Software

  • Zig installed
  • libserialport
  • pkg-config

How It Works

The application uses BleuIO as a bridge between the computer and BLE devices. When the program starts, it automatically detects the connected BleuIO dongle by matching its vendor and product ID, then opens a serial connection configured for communication. Once the connection is established, the program sends AT commands to initialize the dongle and begin scanning for BLE advertisement data that matches a specific identifier used by HibouAir devices.

As BLE data is received, the Zig application continuously reads the serial output, interprets the incoming JSON responses, and extracts the relevant payload. This payload is then decoded into human-readable sensor values such as temperature, humidity, pressure, particulate matter, and CO2 levels. The decoded information is printed directly in the terminal, allowing real-time monitoring without requiring any additional tools or manual decoding steps. When the program is stopped, it gracefully sends commands to halt scanning and reset the dongle before closing the connection.

Source Code

You can find the complete source code for this project on GitHub:

https://github.com/smart-sensor-devices-ab/bleuio-ziglang

Install and Run the Project

Follow the readme file inside the project to install and run. Once dependencies are installed, follow these steps:

Build the project

zig build

Run the application

zig build run

Make sure your BleuIO dongle is connected before running the program.

Example Output

When the application is running, it prints decoded BLE sensor data directly to the terminal. Each detected broadcast from a matching device is processed and displayed in a readable format, making it easy to observe environmental data in real time.

About BleuIO

BleuIO plays a central role in this project by abstracting the complexity of BLE communication. Instead of implementing a full Bluetooth stack within the application, developers can interact with BLE devices using simple AT commands over a serial interface. This approach allows BLE functionality to be integrated into applications written in virtually any programming language and run on any major operating system. By handling scanning, filtering, and communication at the hardware level, BleuIO enables developers to focus on application logic, making BLE development faster and more accessible.

This tutorial demonstrates how Zig and BleuIO can be combined to build a practical BLE application with minimal overhead. While HibouAir is used here as a sample device for testing, the same approach can be applied to a wide range of BLE-enabled sensors and devices. The combination of a lightweight programming language and a simple BLE interface creates a powerful development workflow that is both efficient and easy to extend for real-world use cases.

Share this post on :

BleuIO Pro Firmware v1.0.6.4 Released

BleuIO has released a new firmware update for BleuIO Pro, version 1.0.6.4. This update focuses on improving connection reliability, refining command behavior, and addressing several inconsistencies that affected usability. The goal of this release is to make development smoother while ensuring better alignment with Bluetooth standards.

Improved Connection Stability

This version introduces enhancements to connection stability, making interactions between devices more reliable. Users working with BLE applications may notice fewer unexpected disconnections and more consistent behavior when establishing connections. These improvements are particularly valuable in environments where signal interference or frequent reconnections are common, helping ensure that BleuIO Pro performs more predictably in both development and production scenarios.

Updated MTU Command Behavior

A key change in this release involves the AT+MTU command. The minimum MTU value has been adjusted from 67 to 65 to comply with Bluetooth Secure Connection requirements defined by the Bluetooth SIG. This update ensures that developers can configure their devices according to official specifications without needing workarounds. By aligning with the required minimum MTU of 65, the firmware better supports secure BLE communication and improves compatibility with other Bluetooth-enabled devices.

Improved Advertising Command Handling and Interval Reporting

The behavior of the AT+ADVSTART command has been refined to address multiple inconsistencies and improve overall reliability. In earlier versions, the command could return misleading responses when advertising was already active, particularly in non-verbose mode, and it did not restart advertising or apply updated intervals when executed again. Additionally, it sometimes failed to report the correct advertising interval, which created uncertainty when configuring BLE behavior. With this update, the command now correctly returns an error if advertising is already running, ensuring consistent behavior across both verbose and non-verbose modes. It also reliably reports the configured advertising interval, giving developers clearer visibility and more precise control over advertising settings.

Consistent ASCII Formatting

This release also standardizes the formatting of the term “ASCII” across the firmware. In earlier versions, the term appeared in inconsistent forms such as lowercase or partially capitalized variations. It is now consistently presented in uppercase as “ASCII,” improving clarity and maintaining a uniform standard throughout command outputs and documentation.

How to Update Your Firmware

Updating to the latest firmware is straightforward. You can download the latest release and follow the step-by-step instructions available in our official documentation at https://www.bleuio.com/getting_started/docs/firmware_pro/ Alternatively, you can use the BleuIO web application to perform the update directly from your browser by visiting https://bleuio.com/bleuioapp/#/fw.

Both methods are designed to make the upgrade process quick and seamless.

Share this post on :

Building a BLE Sensor Scanner with Nim and BleuIO

Working with Bluetooth Low Energy devices often means dealing with multiple layers—hardware, protocols, and data decoding. In this tutorial, we are going to simplify that process by building a small command-line application using Nim and a BleuIO USB Dongle.

The goal is simple: scan nearby BLE devices, detect HibouAir sensors, decode their broadcast data, and display readable environmental values directly in the terminal.

By the end, you will have a working local tool that reads real-time air quality data without needing cloud connectivity.

What We Are Building

In this project, we build a lightweight desktop utility that connects to a BleuIO dongle and continuously scans for BLE advertisement data. When a compatible HibouAir device is detected, the application decodes the raw hex payload and prints meaningful values such as temperature, humidity, pressure, CO2, and particulate matter levels.

This is not a heavy application or a full dashboard. It is intentionally simple. The idea is to give developers a clean starting point to understand how BLE data flows from a device to a readable format.

Why Nim with BleuIO?

Nim is a compiled programming language that feels lightweight but powerful. It combines the simplicity of scripting languages with the performance of C. For developers who want fast execution, low memory usage, and clean syntax, Nim is a very practical choice.

Using Nim with BleuIO makes the development process even smoother. The BleuIO dongle abstracts away complex BLE stack handling and exposes everything through simple AT commands over a serial interface. Instead of dealing with platform-specific BLE APIs, you can send commands and receive structured data in return.

This combination allows you to focus more on logic and less on low-level Bluetooth complexity.

Requirements

Before running the project, make sure you have the following:

How the Project Works

When the application starts, it first looks for the connected BleuIO dongle by checking the USB device identifiers. Once the dongle is found, the program opens the serial port and prepares the device for communication.

The setup phase uses a short sequence of AT commands:

ATV0
ATE0
ATV1

These commands are used to configure how the dongle responds over serial so that the application can read and process the output more reliably.

After setup, the application starts scanning for BLE advertisement data using this command:

AT+FINDSCANDATA=FF5B07

This tells BleuIO to scan and report advertisement packets that match the data pattern used by HibouAir devices.

As scan results come in, the program reads the serial output line by line. It looks for valid scan data entries and then extracts the raw advertisement payload. Once a matching payload is found, the Nim code decodes the hex data into readable sensor values such as temperature, humidity, pressure, CO2, and particulate matter values depending on the device type.

When you stop the program with Ctrl + C, it also sends a final reset command to close things down cleanly:

ATR

Example Output

Below is an example of how the data appears in the terminal when a device is detected and decoded.

You will see values like temperature, humidity, pressure, and CO2 being printed in real time as the device broadcasts data.

Source Code

You can access the full project source code here:

[GitHub Repository ]

The code is intentionally kept small and readable so it is easy to follow and modify.

Running the Project

Once the project is downloaded and the BleuIO dongle is plugged into your Mac, you can build and run it directly from Terminal.

First, move into the project folder:

cd ~/Downloads/bleuio-nim

If you have not already installed the required tools, install them with Homebrew:

brew install nim libserialport pkg-config

After that, build the project:

nimble build

Once the build is complete, run it with:

nimble run

If everything is set up correctly, the application will detect the connected BleuIO dongle, initialize it, and begin scanning for HibouAir advertisement data. Within a few seconds, you should start seeing decoded sensor readings appear in the terminal.

When you want to stop the scanner, press:

Ctrl + C

The application will then stop scanning, send its cleanup command, and close the serial connection.

This project is best seen as a foundation rather than a finished product. It shows how to connect to a BLE device, scan for advertisement data, and decode it into something useful.
From here, you can take it in many directions. You might want to store the data locally, send it to a cloud service, build a graphical dashboard, or integrate it into a larger system. Since the core BLE communication is already handled through BleuIO, extending the project becomes much easier.

Share this post on :

Introducing BleuIO Firmware v2.7.9.78: Improved Stability & Data Reliability

We’re pleased to announce the release of BleuIO Firmware v2.7.9.78, bringing important fixes and enhancements that improve both data handling and communication reliability. This update reflects our continued focus on delivering a stable and developer-friendly BLE experience.

Improved Handling of Large GATT Data

This release resolves an issue where GATT data transfers exceeding 475 bytes could become truncated. In certain cases, this truncation resulted in invalid JSON formatting, which could lead to parsing errors in applications relying on structured data. With this fix in place, BleuIO now handles larger payloads reliably, ensuring data integrity and consistency across your BLE workflows.

More Reliable USB Communication

We have also strengthened the reliability of USB CDC read and write operations. The firmware now performs stricter checks to confirm that the dongle is properly configured and not in a suspended state before initiating communication. This improvement reduces the likelihood of unexpected failures and ensures more predictable behavior in various operating conditions.

How to Update Your Firmware

Updating to the latest firmware is straightforward. You can download the latest release and follow the step-by-step instructions available in our official documentation at https://www.bleuio.com/getting_started/docs/firmware/. Alternatively, you can use the BleuIO web application to perform the update directly from your browser by visiting https://bleuio.com/bleuioapp/#/fw.

Both methods are designed to make the upgrade process quick and seamless.

We recommend upgrading to BleuIO Firmware v2.7.9.78 to take advantage of these improvements. Updating ensures your projects benefit from the latest fixes and performance enhancements.

Share this post on :