Python Library v1.7.4 Released for BleuIO

We are pleased to announce the release of BleuIO Python library v1.7.4, a stability-focused update that improves logging clarity and, most importantly, significantly enhances how applications recover from unexpected dongle disconnections.

This release is designed to make long-running Python applications more reliable when working with BleuIO dongles in real-world environments.

Compatibility

Python library v1.7.4 is tested and verified with the following firmware versions:

  • BleuIO Standard: v2.7.9.51 or later
  • BleuIO Pro: v1.0.5.6

Note: This library version does not support firmware 2.2.0 or earlier on BleuIO Standard (SSD005).

What’s New in v1.7.4

This release introduces a refinement to the logging system used by the Python library. Previously, many internal messages were logged at the INFO level, which could result in excessive output in production environments. In version 1.7.4, all such messages have been moved to the DEBUG level, except for the firmware version message, which remains at the INFO level. This change provides a cleaner default log output while still allowing developers to access detailed diagnostic information when debug logging is enabled.

Reliable Recovery After Dongle Disconnection

The most significant improvement in Python library v1.7.4 is a fix for an issue related to recovering from lost communication with the BleuIO dongle. In earlier versions, the library could encounter problems if the dongle was unplugged, reset using the ATR command, or disconnected due to a crash or system error. In such cases, applications often required a full restart to regain communication.

This issue has now been resolved. When communication with the dongle is lost, the library raises a clear and consistent exception, BleuIOException: Port to BleuIO is not open. This allows applications to detect the failure immediately and implement recovery logic without terminating the program.

Exception Handling and Reconnection Example

With the improved error handling in this release, developers can catch the exception raised when the port is no longer available and reinitialize the BleuIO object to restore communication. The example below demonstrates how an application can continuously query the dongle, detect a disconnection, and automatically reconnect once the dongle becomes available again.

from bleuio_lib.bleuio_funcs import BleuIO
import time


my_dongle = BleuIO()
dongle_connected = True
while 1:
    try:
        print(my_dongle.ati().Rsp)
        time.sleep(2)
    except Exception as e:
        if "Port to BleuIO is not open!" in str(e):
            print("Error communicating with dongle: ", e)
            dongle_connected = False
            while not dongle_connected:
                try:    
                    my_dongle = BleuIO()
                    dongle_connected = True
                    print("Reconnected to dongle")
                except Exception as e:
                    print("Reconnection failed: ", e)
                    time.sleep(2)
                    pass

Example Output

[{'R': 7, 'dev': 'Smart Sensor Devices', 'hw': 'DA14683 (P25Q80LE)', 'name': 'BleuIO'}, {'R': 7, 'fwVer': '2.7.9.55', 'gap_role': 'dual'}, {'R': 7, 'connected': False, 'advertising': False}]
[{'R': 8, 'dev': 'Smart Sensor Devices', 'hw': 'DA14683 (P25Q80LE)', 'name': 'BleuIO'}, {'R': 8, 'fwVer': '2.7.9.55', 'gap_role': 'dual'}, {'R': 8, 'connected': False, 'advertising': False}]
Error processing serial data: ClearCommError failed (OSError(22, 'The I/O operation has been aborted because of either a thread exit or an application request.', None, 995))   <------------- When I pulled out dongle and plugged it in again
Traceback (most recent call last):
  File "C:\Users\emil\AppData\Roaming\Python\Python38\site-packages\bleuio_lib\bleuio_funcs.py", line 387, in __poll_serial
    self.rx_buffer += get_data()
  File "C:\Users\emil\AppData\Roaming\Python\Python38\site-packages\serial\serialutil.py", line 652, in read_all
    return self.read(self.in_waiting)
  File "C:\Users\emil\AppData\Roaming\Python\Python38\site-packages\serial\serialwin32.py", line 259, in in_waiting
    raise SerialException("ClearCommError failed ({!r})".format(ctypes.WinError()))
serial.serialutil.SerialException: ClearCommError failed (OSError(22, 'The I/O operation has been aborted because of either a thread exit or an application request.', None, 995))
Serial exception in polling thread: ClearCommError failed (OSError(22, 'The I/O operation has been aborted because of either a thread exit or an application request.', None, 995))
Traceback (most recent call last):
  File "C:\Users\emil\AppData\Roaming\Python\Python38\site-packages\bleuio_lib\bleuio_funcs.py", line 387, in __poll_serial
    self.rx_buffer += get_data()
  File "C:\Users\emil\AppData\Roaming\Python\Python38\site-packages\serial\serialutil.py", line 652, in read_all
    return self.read(self.in_waiting)
  File "C:\Users\emil\AppData\Roaming\Python\Python38\site-packages\serial\serialwin32.py", line 259, in in_waiting
    raise SerialException("ClearCommError failed ({!r})".format(ctypes.WinError()))
serial.serialutil.SerialException: ClearCommError failed (OSError(22, 'The I/O operation has been aborted because of either a thread exit or an application request.', None, 995))
Error communicating with dongle:  Port to BleuIO is not open!  <-------------  Here I catch the exception and handle it
No BleuIO dongle COM port available!
Reconnection failed:  No BleuIO dongle COM port available!
No BleuIO dongle COM port available!
Reconnection failed:  No BleuIO dongle COM port available!
No BleuIO dongle COM port available!
Reconnection failed:  No BleuIO dongle COM port available!
Reconnected to dongle  <----------------------- Bootloader exits and the BleuIO COM port is available
[{'R': 2, 'dev': 'Smart Sensor Devices', 'hw': 'DA14683 (P25Q80LE)', 'name': 'BleuIO'}, {'R': 2, 'fwVer': '2.7.9.55', 'gap_role': 'dual'}, {'R': 2, 'connected': False, 'advertising': False}]
[{'R': 3, 'dev': 'Smart Sensor Devices', 'hw': 'DA14683 (P25Q80LE)', 'name': 'BleuIO'}, {'R': 3, 'fwVer': '2.7.9.55', 'gap_role': 'dual'}, {'R': 3, 'connected': False, 'advertising': False}]

With this approach, your application can continue operating seamlessly even after unexpected interruptions.

Upgrade Recommended

Updating to Python Library v1.7.4 is quick and straightforward. If you already have a previous version installed, start by upgrading the package through pip. Run the following command in your terminal or development environment:

pip install --upgrade bleuio

This will fetch and install the latest version of the library.

Python library v1.7.4 is a reliability-driven update that delivers cleaner logging and robust recovery from connection loss. These improvements make BleuIO-based Python applications more stable, easier to maintain, and better suited for continuous and production-level use. We strongly recommend this update for all developers working with BleuIO in Python.

Share this post on :

Learn Bluetooth LE with BleuIO and Novel Bits

Bluetooth Low Energy can be challenging to learn and work with, especially when traditional development kits require complex SDKs, toolchains, and embedded firmware before you ever see your first result. BleuIO was created to remove that friction by allowing developers to interact with Bluetooth LE using simple, platform-independent AT commands. Through our collaboration with Novel Bits, learning and working with BleuIO is now even more accessible with practical educational resources, and faster access for U.S. customers, while continuing to support developers worldwide.

Getting Started with BleuIO: A Practical Guide

As part of this collaboration, Novel Bits has published a detailed “Getting Started with BleuIO” guide designed to help developers get up and running in minutes. The guide walks through connecting the dongle, issuing your first AT commands, scanning for nearby Bluetooth LE devices, and understanding advertising data-all without SDKs, embedded C, or complex toolchains.

The focus is on learning how Bluetooth LE actually works, using real hardware and clear, step-by-step explanations.

From First Commands to Advanced BLE Skills

For developers who want to go further, Novel Bits has also introduced a comprehensive hands-on course built around BleuIO hardware: Bluetooth LE Unplugged. The course takes a practical, hardware-first approach to learning BLE, allowing participants to explore both central and peripheral roles using two BleuIO dongles.

Rather than focusing on vendor-specific SDKs, the course emphasizes transferable Bluetooth LE knowledge that applies across platforms and products. Topics range from advertising and GATT fundamentals to security, automation, and packet-level analysis.

BleuIO Now Available with Fast U.S. Shipping Through Novel Bits

BleuIO continues to be available to developers and organizations worldwide through our global distribution channels. To better support customers in the United States, we’re pleased to share that BleuIO can now also be ordered directly from the U.S. via our authorized partner, Novel Bits. For U.S. customers, this means quick delivery, predictable shipping, and a smoother purchasing experience.

Whether you’re prototyping a new idea, testing devices at scale, or building a commercial product, BleuIO combined with Novel Bits’ educational resources gives you a fast and practical path forward.

Share this post on :

The BleuIO Web App: A Faster, Simpler Way to Work with Bluetooth Low Energy

Bluetooth Low Energy development traditionally involves installing serial terminal software, configuring ports, memorizing AT commands, and constantly switching between tools and documentation. While this approach works, it often slows down development and adds unnecessary complexity, especially during early testing and prototyping.

The BleuIO Web App was created to simplify this workflow. It provides a browser-based interface that allows developers to work directly with BleuIO and BleuIO Pro dongles without installing any software. By moving the entire workflow to the web, the app removes friction and makes BLE development more accessible and efficient.

No Installation. No Drivers. No Terminal Software.

One of the key strengths of the BleuIO app is that it runs entirely in the browser. There is no need to install serial terminal tools like Tera Term, Minicom, or Screen, and there is no platform-specific setup required. Developers can simply plug the BleuIO dongle into their computer, open the web app, and start interacting with the device immediately.

This plug-and-play approach makes the app ideal for quick testing, demonstrations, workshops, and development environments where speed and simplicity are important. It also ensures a consistent experience across operating systems, as everything is handled directly through the browser.

Clear Connection Status and Live Terminal Output

As soon as a BleuIO device is connected, the app clearly displays the connection status. This immediate feedback removes uncertainty and ensures developers always know when the dongle is ready to receive commands.

The integrated terminal shows responses in real time, allowing developers to observe scan results, device information, and command feedback as it happens. This direct visibility helps speed up debugging and makes it easier to understand how the device behaves during different operations.

Smart AT Command Input with Built-In Discovery

The BleuIO app removes the need to memorize AT commands by providing intelligent command suggestions. As developers begin typing a keyword, relevant commands appear instantly, making discovery fast and intuitive.

This approach is especially helpful when working with a large command set or when learning the platform for the first time. It allows developers to focus on what they want to achieve rather than recalling exact command names.

Integrated Help for Every Command

Each AT command in the app includes built-in help that explains how the command works, which parameters it accepts, and what type of response to expect. This information is available directly inside the interface, without requiring a separate documentation window.

By keeping command explanations close to where commands are executed, the app encourages experimentation while reducing mistakes. Developers can confidently adjust parameters and immediately see how those changes affect device behavior.

BLE Advertising Builder for Rapid Testing

Constructing BLE advertising payloads manually can be time-consuming and prone to errors. The BLE advertising builder simplifies this process by allowing developers to assemble payloads step by step using a clear interface.

By selecting a manufacturer ID and entering hex data, the app generates a valid advertising payload that can be copied and sent directly to the dongle. This is particularly useful for prototyping custom devices, testing advertising formats, or validating payload structures during development.

Powerful Search Across All AT Commands

The built-in search feature allows developers to explore the full set of AT commands by keyword. Instead of scrolling through documentation, developers can quickly find relevant commands related to topics such as security, pairing, or scanning and view their details immediately.

This turns the app into both a control interface and a reference tool, making it easier to learn the platform while actively working with the hardware.

Simple and Safe Firmware Updates

Firmware management is fully integrated into the BleuIO app, allowing developers to check installed firmware versions and update or downgrade firmware directly from the browser. The process is guided and designed to minimize the risk of errors.

For BleuIO Pro, firmware updates are straightforward and fast. For the standard BleuIO dongle, the app clearly guides the user through the additional step required during the update process. Once the update is complete, reconnecting and verifying the firmware version takes only a few moments.

Designed for Developers, Not Just Demos

The BleuIO app is more than a demonstration tool. It is built for daily development work, helping developers move faster by reducing setup time and keeping everything in one place. Tasks such as sending AT commands, scanning BLE devices, building advertising payloads, exploring command documentation, and managing firmware can all be handled from a single browser window.

If you prefer a visual walkthrough, there is also a detailed video that explains all the features of the BleuIO app and shows how to use them step by step. The video demonstrates real-time usage, including connecting a device, sending AT commands, scanning for BLE devices, building advertising payloads, and updating firmware. You can watch the video below to see the app in action.

By combining control, visibility, and guidance into one interface, the app supports both experienced developers and those who are new to BLE development.

Share this post on :

Building an IoT BLE Gateway to the Cloud Using BleuIO and Thinger.io

Bluetooth Low Energy (BLE) sensors are excellent at collecting environmental data close to where it matters. Many air-quality devices broadcast their readings using BLE advertisements, which keeps power consumption low and avoids the overhead of maintaining a connection. The challenge appears when you want to access that data remotely, share it with a team, or visualize trends over time.

In this tutorial project, we demonstrate a simple and transparent way to bridge that gap. A BleuIO USB dongle scans BLE advertisements from a HibouAir sensor, a lightweight Python script decodes the values, and the data is sent to Thinger.io for storage and visualization. The goal is not to build a product-specific solution, but to show how easily BLE advertisement data can be integrated into a modern cloud platform using readily available tools.

From local BLE data to remote access

BLE advertisement data is, by design, local: a sensor broadcasts data into the surrounding area, and only nearby devices can receive it. This works perfectly for local dashboards, logging, or automation running on a PC or embedded computer. However, as soon as you want to view data remotely, share readings with others, analyze trends over longer periods, or build dashboards that are accessible from anywhere, a cloud layer becomes necessary. A gateway approach solves this neatly by listening to BLE advertisements, decoding them, and forwarding the results to the cloud without requiring changes to the sensor firmware or the addition of complex SDKs. This keeps the BLE side simple while allowing the cloud to handle storage, visualization, and access control.

About Thinger.io

Thinger.io offers a generous free tier that is well suited for prototyping, demos, and proof-of-concept projects. It allows you to create devices that accept data over HTTP, store incoming measurements in data buckets, and build dashboards with charts and widgets in just a few steps.

For this project, Thinger.io acts as a remote endpoint that receives decoded air-quality data and makes it immediately visible through its web dashboard. This makes it easy to demonstrate end-to-end data flow—from BLE advertisements in the air to charts in a browser—without maintaining your own backend.

Project requirements

Hardware

Software

  • Python 3.9 or later
  • pyserial Python library
  • requests Python library
  • Thinger.io account (free tier)

No embedded firmware development and no BLE SDKs are required.

How the project works

The HibouAir device periodically broadcasts its sensor readings inside BLE advertisement packets. BleuIO, connected to computer via USB, continuously scans for nearby BLE advertisements and filters packets that match the HibouAir identifier.

A Python gateway script reads the scan output from BleuIO, extracts the raw advertisement payload, and decodes the air-quality values such as CO2, temperature, and humidity. These decoded values are then packaged into a simple JSON object and sent to Thinger.io using an authenticated HTTP request.

Thinger.io receives the data, stores it in a bucket, and makes it available for visualization on dashboards. This entire process runs continuously, creating a real-time BLE-to-cloud data pipeline without establishing a persistent BLE connection to the sensor.

Source code

The complete source code for this project is available on GitHub. It includes the Python gateway script, configuration examples, and setup notes.

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

Setting up the Thinger.io dashboard

On the Thinger.io side, the setup is straightforward. You create an HTTP device that acts as the data entry point, generate an access token for authentication, and configure a data bucket to store incoming measurements. Once the bucket is in place, dashboards can be built by adding widgets such as numeric values, gauges, or time-series charts.

Step 1: Create an HTTP Device

Go to Dashboard → Devices and create a new device.

  1. Click Add Device / New Device
  2. Choose HTTP Device
  3. Set a clear Device ID (example: hibouair_bleuio_gateway)
  4. Save

Step 2: Get the Callback URL (endpoint)

Open the device you just created and locate the callback endpoint that will receive your JSON payload.

  1. Click your device (example: hibouair_bleuio_gateway)
  2. Go to Callback
  3. Copy the Callback URL / Endpoint URL

This is the URL your Python gateway will send data to using an HTTP POST.

Step 3: Create a Data Bucket (storage)

Buckets store your incoming time-series data and make charts/dashboard widgets easy.

  1. Go to Data Buckets
  2. Click Create Bucket
  3. Name it something like: hibouair_air_quality
  4. Save

Step 4: Link the Device Callback to the Bucket

Now tell Thinger.io to store incoming device payloads into your bucket.

  1. Go back to your device: Devices → hibouair_ble_gateway
  2. Open Callback settings
  3. Enable storing/forwarding incoming data to a bucket
  4. Select bucket: hibouair_air_quality
  5. Save

Step 5: Create a Dashboard

This is where the live visualization happens.

  1. Go to Dashboards
  2. Click New Dashboard
  3. Name it: HibouAir Live (BleuIO)
  4. Save

Step 6: Add widgets to visualize your data

Use the bucket as the data source for widgets.

Suggested widgets (example mapping):

  • Numeric / Value widgetco2_ppm
  • Gauge widgettemperature_c
  • Time-series charthumidity_rh (and optionally CO2 too)

Steps:

  1. Click Add Widget
  2. Choose widget type (Value, Gauge, Chart)
  3. Select bucket: hibouair_air_quality
  4. Choose the field (co2_ppm / temperature_c / humidity_rh)
  5. Save widget
  6. Arrange widgets on the dashboard

Running the gateway

After configuring the Thinger.io credentials and ensuring BleuIO is connected to the correct serial port, the project is started with a single command:

python3 gateway_thinger.py

Once running, the script scans for BLE advertisements, decodes the sensor data, and pushes updates to Thinger.io at regular intervals. Terminal output confirms successful scans and uploads, while the dashboard updates in near real time.


This project is meant to showcase an integration pattern, not to define a fixed solution. By combining BLE advertisement scanning with a simple Python gateway and a cloud platform like Thinger.io, it becomes clear how flexible this approach can be. Engineers can take this example, replace the sensor, adjust the decoder, or switch the cloud endpoint to suit their own needs.

Share this post on :

Using BleuIO as a BLE Gateway for Edge Computing Applications

Bluetooth Low Energy has become one of the most widely used wireless technologies for sensors, beacons, and low-power devices. From environmental monitoring and asset tracking to smart buildings and industrial systems, BLE devices are now everywhere. At the same time, edge computing has emerged as a practical response to the limitations of cloud-only architectures.

The problem with cloud-only BLE architectures

Many BLE projects start with a simple idea: scan for BLE devices, collect data, and send everything directly to the cloud. While this works for small experiments, it often breaks down in real deployments.

One common issue is latency. BLE sensors often transmit small data packets at short intervals. When every packet is sent to the cloud, even small network delays can prevent timely reactions. This becomes critical in use cases such as environmental monitoring, industrial safety, or building automation, where immediate response matters.

Another challenge is network dependency. Cloud-centric designs assume constant internet connectivity. In factories, basements, temporary installations, or remote locations, connectivity may be unreliable or unavailable. When the connection drops, data collection and decision-making stop entirely.

There is also the issue of data overload and cost. Streaming raw BLE data continuously consumes bandwidth, increases cloud storage requirements, and complicates analytics. Much of this data is often repetitive or irrelevant until a threshold or anomaly appears.

These problems highlight the need for a smarter approach—one that processes BLE data closer to where it is generated.

How edge computing changes the equation

Edge computing moves data processing from the cloud to a local system, such as an industrial PC, a small server, or a single-board computer. Instead of acting as a simple relay, the edge system analyzes data in real time, applies rules, and decides what should happen next.

For BLE applications, this means:

  • Immediate reaction to sensor changes without waiting for cloud responses
  • Continued operation even when internet access is lost
  • Reduced data volume sent to cloud platforms
  • Better control over system behavior and reliability

Edge computing does not replace the cloud. Instead, it complements it by ensuring that only meaningful, processed information is forwarded for long-term storage, visualization, or reporting.

BleuIO as a BLE gateway at the edge

BleuIO plays a key role in this architecture by acting as the BLE interface between physical devices and edge intelligence. Connected via USB, BleuIO handles scanning, connecting, and communicating with BLE devices using a simple and predictable AT-command interface.

From the perspective of the edge application, BleuIO behaves like a stable BLE modem. The application does not need to interact with complex operating-system-level BLE stacks or vendor-specific SDKs. Instead, it can focus on logic, data processing, and integration.

This design is especially useful for long-running edge services, where reliability and consistency are critical. BleuIO’s behavior remains the same across platforms, making it suitable for deployments on macOS, Linux, and Windows systems.

Typical BLE edge gateway architecture

A typical edge gateway built with BleuIO follows a clear and modular structure.

BLE sensors or devices broadcast advertisement data or expose characteristics. BleuIO scans for these devices, filters relevant data, and passes it to the host system. The edge application decodes and processes the data locally, applying thresholds, aggregation rules, or control logic. Only selected events, summaries, or alerts are then forwarded to cloud services, dashboards, or databases.

This architecture keeps the BLE layer simple and reliable while allowing the edge layer to evolve independently as system requirements grow.

Use case

Smart building and indoor monitoring

In smart building environments, BLE sensors are often used to monitor indoor conditions such as air quality, occupancy, or equipment status. A cloud-only approach can delay responses to poor conditions, especially during network congestion or outages.

Using BleuIO as an edge gateway allows the system to react immediately. The edge application can continuously monitor BLE sensor data, detect when conditions deviate from acceptable ranges, and trigger local actions. Ventilation systems, alerts, or building management integrations can respond instantly, while summarized data is still sent to cloud dashboards for long-term analysis.

This approach improves occupant comfort, reduces response time, and lowers unnecessary cloud traffic.

Industrial monitoring and local automation

Industrial environments often present challenging conditions for wireless communication and cloud connectivity. BLE sensors may be used to track machine states, environmental parameters, or asset presence.

With BleuIO at the edge, BLE data can be filtered and analyzed locally. The edge system can identify abnormal patterns, trigger maintenance alerts, or activate control systems without relying on external connectivity. This is particularly valuable for safety-critical or time-sensitive operations.

By processing data locally, industrial systems gain resilience and predictability, even in harsh or isolated environments.

Temporary and offline deployments

Not all BLE projects are permanent installations. Temporary monitoring setups, field testing, and mobile deployments often lack stable internet access.

In these scenarios, BleuIO enables fully autonomous BLE gateways. The edge system can store data locally, apply logic, and operate independently for extended periods. When connectivity becomes available, data can be synchronized with cloud platforms or exported for analysis.

This flexibility makes BleuIO suitable for research projects, pilot deployments, and remote monitoring applications.

Solving common BLE gateway challenges

Many developers struggle with BLE gateways because of unstable OS-level BLE stacks, complex APIs, and inconsistent behavior across platforms. These issues become more pronounced in long-running edge applications.

BleuIO addresses these challenges by abstracting BLE complexity behind a simple command interface. This reduces development time, improves system stability, and makes automation easier. Developers can build gateways using familiar tools and languages while maintaining full control over BLE behavior.

How this approach scales well

Using BleuIO as a BLE gateway supports incremental system growth. Projects can start with local data processing and later add cloud integration, analytics platforms, or automation layers without redesigning the BLE foundation.

Because the edge application controls what data leaves the system, it is easier to comply with bandwidth limits, privacy requirements, and operational constraints. This makes the architecture suitable for both small deployments and large, distributed systems.

BleuIO as a foundation for modern BLE edge systems

Edge computing has become essential for reliable, responsive BLE applications. By combining local processing with selective cloud integration, systems gain speed, resilience, and scalability.

BleuIO fits naturally into this model. Acting as a stable BLE gateway, it bridges the gap between low-power wireless devices and edge intelligence. Whether the goal is smart buildings, industrial monitoring, or temporary deployments, using BleuIO at the edge enables practical, future-proof BLE solutions.

Share this post on :

Building a BLE Device Detection Web App with Phoenix and BleuIO

In this tutorial, we build a simple but practical web application that demonstrates how BleuIO can be integrated with a modern web framework to interact with Bluetooth Low Energy (BLE) devices in real time. The goal of this project is not to create a full-featured product, but to provide a clear example that developers can learn from and extend for their own use cases.

The application connects to a BleuIO USB dongle via a serial port, enables verbose mode, performs a BLE scan, and detects whether a specific nearby BLE device is present. If the target device is found, the application displays its MAC address. This approach is particularly useful for scenarios such as proximity detection, presence monitoring, or gateway-style BLE integrations.

The complete source code for this project is provided separately so developers can easily clone, modify, and build upon it.

Why Phoenix Framework?

Phoenix is a web framework written in Elixir and built on top of the Erlang/OTP ecosystem. It is designed for applications that require high concurrency, real-time updates, and long-running background processes. These characteristics make Phoenix particularly suitable for hardware-integrated applications where continuous communication with external devices is required.

In this project, Phoenix allows the BleuIO serial connection to remain open while BLE scan results are streamed to the web interface. The framework handles process supervision, message passing, and real-time UI updates in a clean and reliable way, without the need for complex front-end JavaScript logic.

How This Differs from a JavaScript-Based Web App

This project does not use the Web Serial API. Web Serial allows browser-based JavaScript applications to access serial devices, but it is primarily intended for interactive, user-driven scenarios. It requires explicit user permission, depends on browser support, and is not suitable for unattended or always-on systems.

By contrast, this Phoenix-based approach keeps all BLE logic on the backend. The web interface simply reflects the current state of the system and allows the user to trigger actions such as connecting or rescanning. This separation makes the application easier to extend, easier to deploy, and more suitable for real-world integrations where reliability and continuous operation are important.

Requirements

To follow this tutorial, you will need:

How the Application Works

The application follows a straightforward process. The user enters the serial port name where the BleuIO dongle is connected and initiates the connection from the web interface. Once connected, the application sends an AT command to enable verbose mode, making the responses easier to read and parse.

After verbose mode is enabled, the application starts a timed BLE scan. As scan results arrive from BleuIO, they are analyzed in real time. If a BLE device advertising the configured target name is detected, the application extracts its MAC address and updates the interface accordingly. The user can repeat the scan at any time using the rescan option.

All serial communication and BLE processing run in the background, while the web interface updates automatically based on events generated by the backend.

Running the Application

Installing Phoenix

Phoenix can be installed on macOS using standard tooling for Elixir. Once Elixir is installed, Phoenix can be added using the official project generator. Detailed installation steps are included in the project documentation.

Running the App

Download the source code from https://github.com/smart-sensor-devices-ab/bleuio-phoenix-erlang

After downloading the source code:

  1. Install dependencies
  2. Start the Phoenix server
  3. Open the application in a browser
  4. Enter the BleuIO serial port
  5. Click Connect
  6. View scan results and detected devices

Follow README.md for more details

The application runs locally and does not require any cloud services.

Configuring the Serial Port and Target Device

Two key parameters are intentionally easy to modify:

Serial Port

The serial port used by BleuIO can be updated either through the web interface or in the configuration file (config>runtime.exs). This allows the project to run on different machines without code changes.

The serial port name depends on the operating system being used. On macOS, BleuIO typically appears as a device starting with /dev/cu.usbmodem. On Linux systems, the dongle is commonly available as /dev/ttyUSB0 or /dev/ttyACM0, depending on the system configuration. On Windows, BleuIO appears as a COM port, such as COM3 or COM5.

Target BLE Device

The application looks for a specific BLE device name during scanning. This name is defined as a constant in the backend code on lib>bleuio_phx>bleuio_worker.ex and is matched case-insensitively.

Proximity Detection and CloseBeacon Use Case

In the example implementation, the application detects a device advertising the name closebeacon.com. This makes the project suitable for proximity detection use cases, such as presence awareness, zone monitoring, or asset tracking.

BLE beacons like CloseBeacon are commonly used in proximity-based systems, and this project demonstrates how BleuIO can serve as a reliable BLE scanning interface for such applications. More information about CloseBeacon can be found at https://www.closebeacon.com/.

How This Project Helps Developers

This tutorial is intended as an example project rather than a finished solution. It shows how BleuIO can be integrated with a backend web framework to handle BLE scanning in a clean and scalable way. Developers can use this project as a reference to understand the overall architecture and then build their own custom logic on top of it.

The complete source code is provided so that anyone interested can explore the implementation details, experiment with different configurations, and adapt the project for their own BLE-enabled applications.

By combining BleuIO with Phoenix, developers can build BLE-enabled web applications that are not limited by browser APIs or client-side constraints. This example demonstrates a backend-first approach to BLE scanning that is well suited for gateways, monitoring tools, and proximity detection systems.

Share this post on :

BleuIO Pro Firmware Update v1.0.5.6 Released

We are happy to announce a new firmware update for BleuIO Pro, version v1.0.5.6. This release introduces improved control over connection behavior, expanded command functionality, and important stability enhancements to ensure a more reliable development experience.

Below is an overview of what’s new and improved in this firmware update.

New Auto Reconnect Control

One of the key improvements in this release is the ability to enable or disable the auto reconnect feature.

Previously, auto reconnect was always enabled. This meant the dongle would automatically attempt to reconnect to a target device if a disconnect event occurred immediately after connection, specifically with disconnect reason 0x3E (Connection failed to be established).

With firmware v1.0.5.6, users now have full control over this behavior.

New Commands:

  • ATAR1 – Enable auto reconnect (default)
  • ATAR0 – Disable auto reconnect

By default, auto reconnect remains enabled to preserve existing behavior, but developers can now turn it off when more precise connection handling is required.

Read-Back Support Added to Multiple Commands

This update adds read functionality to several AT commands that previously allowed configuration changes but did not provide a way to read back their current state.

This enhancement improves transparency and makes it easier to verify configuration during runtime or debugging.

Commands with New Read Support:

  • ATA
  • ATAR
  • ATASPS
  • ATASSN
  • ATASSM
  • ATDS
  • ATE
  • ATES
  • ATEW
  • ATSIV
  • ATSRA
  • ATSAT
  • AT+FRSSI
  • AT+SHOWRSSI

With these additions, developers can now query the current settings directly from the dongle, resulting in better control and easier diagnostics.

Stability Improvements

Firmware v1.0.5.6 also includes several internal improvements aimed at making BleuIO Pro more robust and reliable.

Key Enhancements:

  • Fixed multiple issues that could cause unexpected dongle reboots
  • Improved internal connection state handling
  • Enhanced overall firmware stability during connection and disconnection events

These changes help ensure smoother operation, especially in applications with frequent BLE connections.

Firmware v1.0.5.6 for BleuIO Pro introduces several important improvements that enhance both usability and reliability. This release gives developers direct control over the auto reconnect functionality, allowing it to be enabled or disabled based on application needs. It also adds read-back support to many commonly used AT commands, making it easier to verify current settings and improve debugging workflows. In addition, overall stability has been improved through better internal connection state handling and fixes for issues that could previously cause unexpected dongle reboots.

We recommend updating to this latest version to take advantage of the new features and reliability improvements.

For download instructions and update guides, please visit the BleuIO Pro firmware update section on our support page.

Share this post on :

Sending BLE Air Quality Data to Arduino Cloud Using BleuIO

Bluetooth Low Energy (BLE) devices are widely used for environmental monitoring, but getting their data into the cloud often requires complex SDKs, gateways, or proprietary platforms. In this tutorial, we demonstrate a simple and flexible alternative: sending BLE advertisement data directly to Arduino Cloud using BleuIO as a USB BLE gateway.

In this project, we build a lightweight data pipeline where a HibouAir air quality sensor broadcasts environmental data over BLE advertisements, BleuIO scans and captures that data, a Python script decodes the values, and the results are sent straight to Arduino Cloud for storage and visualization — all using free tools.

This project is designed as a showcase example to illustrate how BLE development and cloud integration can be done quickly and transparently, without BLE SDKs or embedded firmware development.

Why Arduino Cloud?

Arduino Cloud offers a convenient and reliable platform for storing and visualizing IoT data without the need to build and maintain a custom backend. Although it is often associated with Arduino hardware, the platform supports Manual Devices, which makes it suitable for gateway-based solutions where data originates from external devices such as BLE sensors. In this project, Arduino Cloud serves as a secure endpoint where decoded air quality data can be published using standard MQTT communication. Its integrated dashboards allow developers to quickly visualize sensor data, making it especially useful for prototyping, demonstrations, and proof-of-concept projects that require minimal setup.

Hardware and Software Requirements

Hardware

Software

  • Python 3.9 or later
  • pyserial Python library
  • arduino-iot-cloud Python library
  • Arduino Cloud

No embedded programming or BLE SDKs are required.

How the System Works

The HibouAir device periodically broadcasts air quality data within its BLE advertisement payload. BleuIO continuously scans for nearby BLE advertisements and filters packets that match a specific device identifier. When a matching advertisement is detected, the Python gateway script extracts the raw data and applies decoding logic to convert the hexadecimal values into human-readable measurements. These decoded values are then published to Arduino Cloud using authenticated MQTT communication. The entire process runs continuously, enabling real-time data updates without establishing a persistent BLE connection to the sensor.

Arduino Cloud Setup (Step by Step)

Step 1: Create or Log In to Arduino Cloud

Go to:
https://app.arduino.cc/dashboards

Create a free account or log in to your existing one. After login Arduino Cloud will generate

  • Device ID
  • Secret Key

Save these securely — they will be used in the Python script.

Step 2: Create a Device

Navigate to:
https://app.arduino.cc/devices

  • Click Add Device from left menu
  • Choose Manual Device
  • Name the device HibouAir

Step 3: Create a Thing

When prompted after creating device, create a new Thing and name it HibouAir Thing.

Step 4: Add Cloud Variables

Add the following variables to the Thing:

Variable NameTypeDescription
co2_ppmintCO₂ concentration (ppm)
temperature_cfloatTemperature in °C
humidity_rhfloatRelative humidity (%)

Step 5: Create a Dashboard

Go back to Dashboards and create a new dashboard.

Add widgets such as:

  • Value widget for CO2
  • Gauge widget for temperature
  • Chart widget for humidity over time

Your cloud setup is now complete.

Project Source Code

Clone or download the project from GitHub:

https://github.com/smart-sensor-devices-ab/bleuio-to-arduino-cloud

Configure secrets.py

Update the following values:

DEVICE_ID = "YOUR_DEVICE_ID"
SECRET_KEY = "YOUR_SECRET_KEY"
SERIAL_PORT = "/dev/tty.usbmodemXXXX"

Make sure the serial port matches where BleuIO is connected.

Configure gateway.py

In gateway.py, update the scan command:

SCAN_CMD = "AT+FINDSCANDATA=220069=3"

In this example, 220069 is the HibouAir board ID used in the BLE advertisement.
If your HibouAir device uses a different ID, update this value accordingly.

Running the Project

Once the Arduino Cloud configuration and local script setup are complete, running the project requires only a single command.

python3 gateway.py

When the gateway script is executed, BleuIO is placed into dual-role mode and begins scanning for BLE advertisements that match the specified HibouAir board identifier. As advertisement packets are received, the script decodes the sensor values and immediately publishes them to Arduino Cloud. Within moments, the dashboard begins displaying live air quality data. This continuous loop allows the system to operate as a real-time BLE-to-cloud gateway with minimal overhead.

Customizing the Dashboard

Arduino Cloud dashboards can be customized to present air quality data in a way that best fits the user’s needs. Live values can be displayed using numeric widgets, gauges can be used to visualize ranges such as CO2 concentration or temperature, and chart widgets can be added to show trends over time. By arranging and configuring these widgets, users can create a clear and informative interface for monitoring indoor air quality. This flexibility makes the dashboard suitable not only for development and testing, but also for presentations and live demonstrations.

This project demonstrates how BLE advertisement data can be efficiently captured and delivered to the cloud using a minimal and transparent approach. By combining HibouAir sensors, BleuIO, a simple Python gateway, and Arduino Cloud, it is possible to create a complete end-to-end monitoring solution without relying on complex SDKs or embedded firmware development. While this tutorial focuses on air quality data, the same method can be extended to other BLE-based sensors and cloud platforms. As a showcase example, it highlights the flexibility of BleuIO as a BLE development tool and provides a solid foundation for developers who want to build and expand their own BLE-enabled cloud solutions.

Share this post on :

BleuIO (SSD005) Firmware v2.7.9.51 Releases — A More Stable and Reliable Experience

We are pleased to announce the release of firmware v2.7.9.51 for the BleuIO SSD005. This update focuses heavily on improving overall stability and strengthening the firmware’s ability to handle complex Bluetooth Low Energy operations. The result is a smoother, more reliable experience for developers and users working with demanding BLE environments.

Stability Improvements

This version delivers significant enhancements to the firmware’s internal handling of data-intensive operations. As BLE devices continue to grow in complexity, the dongle must process larger amounts of information quickly and without interruption. The new update refines these processes, reducing the risk of unexpected behavior and ensuring that the dongle performs more consistently during everyday use.

Improved Handling of Large Service and Characteristic Discoveries

A key focus of this release was resolving an issue that could cause the dongle to reboot when discovering a large number of services and characteristics. Devices with extensive GATT profiles place additional strain on the system, and the previous firmware could occasionally become overwhelmed. Version 2.7.9.51 addresses this problem by improving how these discoveries are managed, resulting in a far more reliable interaction with complex peripherals.

Strengthened Internal Checks for Scan Results and Notifications

The update also refines several internal validation mechanisms. Earlier versions, under specific conditions, could trigger a sudden reboot while viewing scan results or handling incoming notifications. These checks have now been reinforced, allowing the dongle to operate more securely even when managing rapid or high-volume BLE traffic.

Fixes for Write Operations and Notification Configuration

Two commonly used AT commands received important stability fixes in this release. The AT+GATTCWRITEWRB command, used for write operations, previously encountered rare cases where insufficient validation could lead to an unexpected reboot. Similarly, the command for setting notifications, AT+SETNOTI, has been improved to ensure stable behavior when enabling or adjusting notification settings. These corrections help ensure dependable communication between the dongle and connected devices, particularly in applications that rely heavily on write requests and real-time notifications.

A More Resilient Platform for Developers

Firmware v2.7.9.51 marks another meaningful step toward making the SSD005 dongle a highly dependable tool for BLE development. By addressing edge-case stability issues and strengthening how the dongle handles large or rapidly changing data sets, this update offers a more resilient foundation for both prototyping and production-level applications.

How to Update

The new firmware is available for download on the BleuIO support website. We encourage all users to upgrade to this version to take advantage of the improved stability and robustness it provides.

Share this post on :

Integrating BleuIO with Adafruit Feather RP2040 for Seamless BLE Applications – Part 5 (Two-Way Communication)

In the earlier parts of this series, we combined the Adafruit Feather RP2040 with the BleuIO USB dongle to build different BLE applications: setting up the RP2040 as a USB host, reading sensor data, advertising measurements and handling secure connections.

In this Part 5, we take the next step and create a simple two-way communication setup. Instead of only broadcasting data, we let a Python script running on your computer talk to the BleuIO dongle connected to the Feather RP2040 and control its LED in real time. At the same time, the Feather responds over the Serial Port Service (SPS), echoing messages back so you can see exactly what was sent on both sides.

This project is a good starting point if you want to remotely control devices, test custom BLE command protocols or build interactive demos using BleuIO and RP2040.

What This Project Does

Arduino project on Adafruit Feather RP2040

On the hardware side, the Adafruit Feather RP2040 is configured as a USB host for the BleuIO dongle, using the same TinyUSB and Pico PIO USB approach as in Part 1 of the series. When the board starts, it initializes the USB host stack, detects the BleuIO dongle and sends a short sequence of AT commands. These commands disable echo, ask the dongle for its own MAC address, set a friendly advertising name (BleuIO Arduino Example) and start BLE advertising. After that, the sketch simply listens for BLE connection events and SPS messages. Depending on what text message it receives over SPS, it either echoes the message back or sends a command to change the LED behaviour on the dongle.

Python script on the computer

On the computer, a Python script acts as the BLE central. It uses the MAC address printed by the Feather’s serial output to connect to the advertising BleuIO dongle. Once connected, it sends text commands over SPS such as ALERT, NORMAL or OFF, and reads back whatever the Feather sends in response. When the Python script sends one of these special words, the Feather generates BLEU AT commands to control the dongle’s LED; for any other text, it just echoes the message. This creates a complete round-trip: you type in Python, the message travels over BLE to the RP2040 and BleuIO, and a response comes back the same way.

Requirements

Hardware

Software

If you already followed Part 1, your RP2040 USB host environment and board configuration should be ready to use.

Source Code on GitHub

You can find the complete source code for this project — both the Arduino sketch and the Python script — in our public GitHub repository: bleuio_arduino_message_transfer_example. Visit the repository at:

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

Feel free to clone or download the repo to get started quickly. All necessary files — including the .ino, helper headers, and the Python script — are included, so you can replicate the example or adapt it for your own project.

Recap: Preparing the Feather RP2040 as a USB Host

To quickly recap the setup from the earlier article: you install the Raspberry Pi RP2040 board package in the Arduino IDE, select the Feather RP2040 board, and install the Adafruit TinyUSB and Pico PIO USB libraries. You then make sure the CPU speed is set to 120 MHz or 240 MHz, since Pico PIO USB requires a clock that is a multiple of 120 MHz.

Uploading the Arduino Sketch

  1. Open the bleuio_arduino_connect_example.ino and usbh_helper.h in the same Arduino sketch folder.
  2. Select Adafruit Feather RP2040 (or your RP2040 board) under Tools → Board.
  1. Choose the correct COM port for the Feather.
  2. Click Upload.

After upload:

  1. Open Serial Monitor at 9600 baud.
  2. You should see something like:
Connect test v1.0
Core1 setup to run TinyUSB host with pio-usb
SerialHost is connected to a new CDC device. Idx: 0

BleuIO response:
{"own_mac_addr":"xx:xx:xx:xx:xx:xx"}
----
  1. Every 10 seconds (based on ALIVE_TIME) you’ll see an update:
H:M:S - 0:0:10
own_mac_addr: xx:xx:xx:xx:xx:xx
Not connected!

Initially it will say Not connected! because no BLE central is connected yet.

The Python Script (BLE Central)

The Python script acts as a BLE central that connects to the advertising BleuIO dongle and uses the Serial Port Service (SPS).

A typical flow in the Python script is:

  1. Read the MAC address printed by the Arduino Serial Monitor (own_mac_addr).
  2. Use the BleuIO Python library (or BLE stack) to connect to that address.
  3. Once connected, send plain text messages over SPS:
    • "ALERT"
    • "NORMAL"
    • "OFF"
    • Or any other text.

On the Python side you’ll see:

  • Connection success message.
  • Any SPS response sent from the RP2040 (e.g. [RP2040] Alert command Received: [...] or [RP2040] Echo: ...).

On the Arduino Serial Monitor you’ll see:

Connected!
SPS Received!
BleuIO response:
{"type":"SPS","evt":{"len":5,"ascii":"ALERT"}}
----
Sending command: AT+SPSSEND=[RP2040] Alert command Received: [ALERT]

And the LED on the BleuIO dongle will react according to the command:

  • ALERT → Blink pattern (AT+LED=T=100=100).
  • NORMAL → Toggle LED (AT+LED=T).
  • OFF → Turn LED off (AT+LED=0).
  • Any other message → Just an echo, no LED change.

Where to Go Next

This example completes the journey from simple advertising to full two-way communication between a computer application and a BleuIO dongle hosted by an Adafruit Feather RP2040. With this pattern in place, you can replace the LED commands with your own device protocol, combine it with the sensor examples from Part 2 and Part 4, or feed the exchanged messages into larger systems for logging, dashboards or control logic. Because the communication relies on the standard Serial Port Service and BleuIO AT commands, the same structure can be reused for many other projects where a PC, an embedded board and a BLE device need to work together.

Share this post on :