-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Author: Agustin Bassi - 2020
BLE Connection is an open source Bluetooth LE Platform to be used as a part of an IoT system, based on Bluetooth LE technology.
The platform consists in several parts working together as described below:
- Beacons Observer: An HTTP REST API with beacon packages scanning features that can reads different beacon types. By this module the user can configure filters, scan time, turn on/off the beacon scanner, and get different beacon-related information like the nearest beacons, the list of beacon read, and many others.
- HTTP Client: An HTTP Client that communicates with Beacons Observer via HTTP requests. There, the user can configure Beacon filters, scan time, turn on/off the scanner and other ones.
- Beacons Broadcasters: A bunch of utilities for different platforms to generate beacon packages from devices like ESP32, Linux Systems or event any compatible smartphone.
- Content Management System: A CMS to associate each beacon to different content or action.
As described in the project's README, in the figure below there is a description of the platform modules and how they interact each others.
In this section are described all things needed to quick start to the platform.
To get the platform running, the next items are needed.
- A Raspberry Pi 3+ with appropiate power supply and SD card 16GB+.
- A device broadcasting beacon packages (can be a dedicated device, a smartphone, a PC with integrated BLE or embedded device like ESP32).
- PC to communicate with Raspberry Pi (optional, but nice to have).
In order to get the project running some steps must be done.
- Install Raspberry Pi OS into Raspberry Pi. Go to official documentation.
- Install platform dependencies. a. Python 3.x (installation steps in official documentation). b. Docker (installation steps in official documentation). c. Docker-Compose (installation steps in official documentation).
- Install beacon broadcasting app in smartphone, or beacon broadcasting software in Linux. Refer to each specific steps in right side bar (omit this step if you have a dedicated Beacon device).
Once dependencies above are installed, execute the next command to install Bluetooth packages into the system.
sudo apt-get update
sudo apt-get install -y libbluetooth-dev libcap2-bin bluetooth bluez-utils blueman
Reached this point you can proceed running the project.
To run the project, a quick simple steps must be completed.
- Download the platform code with the next command.
git clone https://github.com/agustinBassi/ble-connection.git
cd ble-connection/
- Compile the Beacons-Observer docker image with the command below.
docker-compose build beacons-observer
- Start the Beacons-Observer and the HTTP Client with the next command.
docker-compose up
- Run the HTTP Client opening http://raspberri_pi_ip:5001/ in the web browser.
If the step 4 described above is completed, the unique next step is to send HTTP request from HTTP Client to perform some action in Beacons Observer. In the figure below there is a capture of the HTTP Client running and receiving periodic data from Beacons Observer.
To get more information about the HTTP Client and how to configure it, open its dedicated page in the right side bar.
Just remember to put the correct Beacons Observer' IP address. If not, the HTTP Client won't work.
Here are the next steps of the project. All of this documents are in the right side bar.
- Get detailed information about Beacons Observer, the heart of the system.
- Get detailed information about the HTTP Client, the interface between the user and the Beacons Observer.
- Get detailed steps to configure a Beacons Broadcasters.