Overview
In this guide, we will learn How to make Simple Bluetooth Low Energy Repeater using multi-connection feature. Bluetooth low energy technology offers a suitable way of connecting smart devices.
However, despite the convenience, you can bear witness that the range offered can be a little limiting. Sometimes the connection tends to drop or lag when you move a little further away from the device. Fortunately, it’s easy to overcome this range limitation with the Bluetooth repeater.
This article will explain how to create a BLE Repeater using a BLE USB dongle called BleuIO and python.
The BleuIO is Bluetooth low energy solution that can be used to create new BLE 5.0 applications in the fastest and easiest way. Using this dongle’s multi-connection feature, we will make a simple repeater where one dongle scans nearby devices’ data and sends it to the repeater. At the same time, the repeater passes the data to the receiver dongle. And that’s how a repeater will help us overcome the range limitation.
For this project, the sender dongle will scan for air quality data from the HibouAir device and pass the advertised data along with the timestamp to the repeater. The repeater dongle will be connected to a Raspberry pi which will forward data to the receiver dongle. We have already created a sample script in python, which will help us to do the task.
Requirements
To Create a Bluetooth Low Energy repeater using multi-connection feature, we need the following tools.
- 3 pcs BleuIO Dongle.
- HibouAir or any BLE device
- Python 2.7 or Python 3.4 and newer
- pyserial 3.5
Steps to make Simple Bluetooth Low Energy Repeater
Step 1:
Let’s start by cloning the repository from Blueio Repeater Example. Once you cloned the script, you will find three different python script called
|
1 2 3 |
• repeater_example_reciever_dongle.py • repeater_example_repeter_dongle.py • repeater_example_sender_dongle.py |
Step 2:
Connect two dongles on your PC. You can do the process on three different PC or Raspberry Pi.
For this project, I have connected both the sender and receiver dongles to one PC. After connecting the dongles, open the device manager (windows) to find the ports of each dongle.
On my PC, I have two dongles connected on ports 5 and 6. Let’s make COM 5 as the sender & COM 6 as a receiver. Now open the scripts and set the ports number accordingly.
We also need to know repeater dongles ID. To do that, we can simply advertise the dongle on Raspberry pi using the AT+ADVSTART command. Then do a gapscan using AT+GAPSCAN from the sender dongle and look for a dongle called BleuIO.
Once we have repeater dongles id, we can put it on our scripts.
Step 3:
Now lets run the script.
First, move to the script directory on Raspberry pi, and using command prompt type sudo python3 repeater_example_repeter_dongle.py to run repeater script.
Similarly, run receiver and sender scripts accordingly on PC.
As the name suggests, the repeater will repeat its content. On the terminal, we will see the message sent to the repeater from the sender, and the repeater forwards the data to the receiver dongle.










