All Projects → balena-io-playground → rpi3-bluetooth

balena-io-playground / rpi3-bluetooth

Licence: Apache-2.0 License
Raspberry Pi 3 on-board Bluetooth example

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to rpi3-bluetooth

deskbluez
Connects to a low energy actuator system via bluetooth and allows remote control via command line or internal managed interface.
Stars: ✭ 56 (+229.41%)
Mutual labels:  bluetooth, bluetooth-low-energy
python-sonicare
Python library to communicate with a Phillips Sonicare toothbrush via Bluetooth Low Energy
Stars: ✭ 46 (+170.59%)
Mutual labels:  bluetooth, bluetooth-low-energy
awesome-bluetooth-security
List of Bluetooth BR/EDR/LE security resources
Stars: ✭ 220 (+1194.12%)
Mutual labels:  bluetooth, bluetooth-low-energy
Bluetooth-ble-beamer-and-scanner-for-tracing-corona-virus-infected-individual
Bluetooth ble beacon beamer and scanner for tracing corona virus infected person similar to Trace Together app
Stars: ✭ 26 (+52.94%)
Mutual labels:  bluetooth, bluetooth-low-energy
pybluez-examples
Example Bluetooth tasks using the Python PyBluez module
Stars: ✭ 59 (+247.06%)
Mutual labels:  bluetooth, bluetooth-low-energy
pyrinas-ble-client
nRF52 SDK(v16) based OS for use with Particle Xenon and other nRF52840 boards.
Stars: ✭ 15 (-11.76%)
Mutual labels:  bluetooth, bluetooth-low-energy
cordova-posprinter-sample
Cordova/Inoic sample for Epson ESC/POS printer
Stars: ✭ 24 (+41.18%)
Mutual labels:  bluetooth, bluetooth-low-energy
BLELib
This library contains many of the features you need to interact with BLE peripherals
Stars: ✭ 21 (+23.53%)
Mutual labels:  bluetooth, bluetooth-low-energy
ruuvitag-demo
Demo of reading Bluetooth Low Energy sensor measurements of RuuviTag environmental sensors and feeding them to MQTT, a database and dashboards
Stars: ✭ 14 (-17.65%)
Mutual labels:  bluetooth, bluetooth-low-energy
ble-heart-rate-demo
Web bluetooth heart rate monitor
Stars: ✭ 24 (+41.18%)
Mutual labels:  bluetooth, bluetooth-low-energy
pycalima
Python interface for Pax Calima Fan via Bluetooth LE
Stars: ✭ 34 (+100%)
Mutual labels:  bluetooth, bluetooth-low-energy
BleLab
Bluetooth LE Lab - UWP application for interaction with BLE GATT devices
Stars: ✭ 68 (+300%)
Mutual labels:  bluetooth, bluetooth-low-energy
H.E.L.P.
Home Environment Locating People 🍍
Stars: ✭ 19 (+11.76%)
Mutual labels:  bluetooth, bluetooth-low-energy
mijia-homie
A Homie MQTT bridge for the Xiaomi Mijia 2 hygrometer-thermometer. This repo also serves as the monorepo for a handful of helper crates related to Homie and Bluetooth.
Stars: ✭ 40 (+135.29%)
Mutual labels:  bluetooth, bluetooth-low-energy
ios
CoThings's iOS application. CoThings is a realtime counter for shared things.
Stars: ✭ 13 (-23.53%)
Mutual labels:  bluetooth, bluetooth-low-energy
GATT
Bluetooth Generic Attribute Profile (GATT) for Swift (Supports Linux)
Stars: ✭ 48 (+182.35%)
Mutual labels:  bluetooth, bluetooth-low-energy
PiBeacon
Low-cost iBeacon using Raspberry Pi
Stars: ✭ 41 (+141.18%)
Mutual labels:  bluetooth, bluetooth-low-energy
bluetooth-iot-service-python
This application connects two devices over Bluetooth and allows one to send messages to the other using json. Raspberry Pi Bluetooth interfacing with Linux via RFCOMM BT network
Stars: ✭ 23 (+35.29%)
Mutual labels:  bluetooth, raspberry-pi-3
bluetooth-manager
Java Bluetooth Manager. A library/framework for managing bluetooth adapters, bluetooth devices, GATT services and characteristics
Stars: ✭ 75 (+341.18%)
Mutual labels:  bluetooth, bluetooth-low-energy
android-ble-made-easy
An Android Library for handling Bluetooth Low Energy on Android Easy
Stars: ✭ 34 (+100%)
Mutual labels:  bluetooth, bluetooth-low-energy

rpi3-bluetooth

⚠️ This project is not necessary. Starting from balenaOS 2.9.3+rev1, bluetooth devices are controlled by the host operating system and available for all user containers. Just install the software tools that you require to talk to the bluetooth devices, and start using it. ⚠️

The below notes are kept for reference.

Raspberry Pi 3 on-board Bluetooth example

This project enables bluetooth and demonstrates some simple commands to interact with a bluetooth device.

To get this project up and running, you will need to signup for a balena account here and set up a Raspberry Pi 3, have a look at our Getting Started Tutorial if you haven't already. Once you are set up with balena, you will need to clone this repo locally:

$ git clone https://github.com/balena-projects/rpi3-bluetooth.git

Then add your balena application's remote repository to your local repository:

$ git remote add balena [email protected]:username/myapp.git

and push the code to the newly added remote:

$ git push balena master

It should take a few minutes for the code to push. Once the code has pushed the scan.sh script will enable the on-board Bluetooth, you should see this in your logs:

Alt text

To test everything works you will need to run some simple commands to scan for devices, connect to a device, discover characteristics and write to a characteristic.

Scan for devices:

$ hcitool lescan
LE Scan ...
18:B4:30:51:4C:E5 (unknown)
66:53:B2:89:24:D3 (unknown)
66:53:B2:89:24:D3 (unknown)
EE:50:F0:F8:3C:FF balena
EE:50:F0:F8:3C:FF (unknown)
18:B4:30:51:4C:E5 Nest Cam

the output shows 6 devices found, we are going to connect to the EE:50:F0:F8:3C:FF balena device:

$ gatttool -b EE:50:F0:F8:3C:FF -t random -I
[EE:50:F0:F8:3C:FF][LE]>

at the prompt enter connect to connect to the device:

[EE:50:F0:F8:3C:FF][LE]>connect
Attempting to connect to EE:50:F0:F8:3C:FF
Connection successful
[EE:50:F0:F8:3C:FF][LE]>

at the prompt enter char-desc to discover characteristics advertised by the device:

[EE:50:F0:F8:3C:FF][LE]> char-desc
handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb

the output shows 4 characteristics found, we are going to write to the characteristic at handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb. At the prompt enter char-write-req 04 01 to write a 1 to the characteristic:

[EE:50:F0:F8:3C:FF][LE]> char-write-req 04 01
Characteristic value was written successfully

finally we need to close the connection, enter disconnect at the prompt:

[EE:50:F0:F8:3C:FF][LE]> disconnect
[EE:50:F0:F8:3C:FF][LE]>

followed by Ctrl + D to exit gatttool.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].