BleuIO

BleuIO

  • Get Started
  • Buy Now
  • Manual
  • AT Commands
  • Help

›Raspberry PI Pico

Manual

  • How it works
  • How to use
  • Verbose Mode
  • Known Issues
  • Troubleshooting

Firmware Updates

    BleuIO Pro (SSD025)

    • Firmware Updates
    • Release History

    BleuIO (SSD005)

    • Firmware Updates
    • Release History of BleuIO (SSD005)

AT-Commands

  • List of AT Commands

BleuIO Libraries

  • JavaScript Library
  • Python Library

Scripts & Tutorials

  • Python: iBeacon
  • Python: Eddystone Beacon
  • Python: Scan
  • Python: Scan and Store
  • Python: SPS Script
  • Python: File transfer Script
  • Python: Repeater Script
  • Javascript: Google chrome.serial Beacon
  • C# Console App Example
  • C# WFA Example

Script using libraries

    Python library > v1.2.0

    • Custom Services example using Python library
    • Eddystone example using Python library
    • IBeacon example using Python library
    • Scan example using Python library
    • Scan and store example using Python library

    Python library < v1.2.0

    • Eddystone example using Python library
    • IBeacon example using Python library
    • Scan example using Python library
    • Scan and store example using Python library
    • SPS example using Python library
    • Security Example using Python library

    JS library

    • Eddystone example using Javascript library
    • IBeacon example using Javascript library
    • Scan example using Javascript library
    • Security Example using Javascript library
    • Get Device Distance

Projects

    Arduino

    • Arduino Example

    Beaglebone

    • Beaglebone Example

    Raspberry Pi

    • Raspberry PI into Beacon
    • Raspberry PI home automation

    Raspberry PI Pico

    • BleuIO integration (Part1)
    • BleuIO integration (Part2)
    • BleuIO integration (Part3)

    Renesas RA4M2

    • Signal Strength Monitoring
    • Real-Time CO2 monitor
    • Monitoring Air Quality

    STM32 Nucleo-144

    • Nucleo-144 board example
    • Smart Bulb Example

    M5Stack's CoreMP135

    • M5Stack's CoreMP135 board example

Build Your Own Firmware

  • Build Your Own Firmware
  • Advertising Example

More

  • Links
Order Now

BleuIO

$19.99

Buy Now

BleuIO integration (Part3)

Integrating BleuIO with Adafruit Feather RP2040 for Seamless BLE Applications Part 3 (secure connection)

Introduction

Building on the steps in our previous post Integrating BleuIO with Adafruit Feather RP2040 for Seamless BLE Applications Part 2 where we showed how to use the BleuIO to advertise sensor data, we are now going to put the data in a Custom Service. Additionally, we are going to protect the data by making it only available with a secure connection that can only be established by entering a 6-digit passkey.

This example is going to show you how to start protecting your data as well as how to set up and use a custom service.

Requirements

  • Adafruit Feather RP2040 Board
  • BleuIO – Bluetooth Low Energy USB Dongle
  • Arduino IDE
  • A Gas sensor BME680
  • A OPT3002 Light-to-Digital Sensor
  • Our example project [Download from GitHub]

Running the example

Make sure the BleuIO Dongle is connected to the Feather RP2040 Board. Connect the Feather RP2040 Board to your computer using the USB cable.

Make sure the Feather RP2040 Board is selected as well as the correct COM port in the drop-down menu.

(Optional) Change the passkey used for the secure connection and/or the frequency the sensors are read, in the code

/* Requires 6 digits */
#define SECURE_CONN_PASSKEY "232425"

// How often we read the sensors and update the characteristics (in
seconds)
#define READ_UPDATE_FREQUENCY   5

Click the Upload button.

Done! The dongle should now be advertising the sensor values. (If you just plugged in the Feather it may take about 10 seconds before advertising starts as the BleuIO bootloader opens and closes)

(Optional) Open Serial Monitor. You can open the Serial Monitor from the menu:

Tools>Serial Monitor

You should now see the output from the project.

Getting the data

To get the results you can use any BLE scanner app. Here we use nRF Connect:

Find the device that advertise as BleuIO Arduino Example and connect.

You will be prompted to pair.

And then to enter the passkey.
Enter the passkey/pin (default: 232425) and continue.

Go to the service with the UUID: ee6ec068-7447-4045-9fd0-593f3ba3c2ee Notice that you are now bonded.

The service has 5 characteristics, one for each of the sensor values:

1. Lux
2. Pressure
3. Temperature
4. Humidity
5. Gas resistance

Read and/or enable notification for each characteristic to see the data.
The Characteristic User Description Descriptor of each characteristic can be read to show what value it holds.

Like in the previous example, when we parse the hex into decimal values we get:

Lux: 0x0068 = 104 uW/cm2
Pressure: 0x03F8 = 1016 hPa
Temperature: 0x0017 = 23 Celcius
Humidity: 0x0017 = 23 %Rh
Gas Resistance: 0x0041 = 65 KOhms

If not bonded, the values will always show 00-00.

← BleuIO integration (Part2)Signal Strength Monitoring →

Support Request

If you have any queries or technical questions, please don't hesitate to send us a message. We will reply within 24 hours.

Message Sent!

Docs
ManualAT CommandsHelp
Community
YouTubeLinkedInFacebook
More
BleuIOSmart Sensor DevicesGitHub
Sales & Support
support@bleuio.comsales@bleuio.com
Copyright © 2025 BleuIO. A product of Smart Sensor Devices