Skip to content

postry/ble-gatt-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

ble-gatt-server

Simple app to simulate sensor sending data over BLE (Nordic UART Service).

  • Windows: WinRT GATT peripheral (ble/nus_winrt.py).
  • Linux: BlueZ via Bless (ble/nus_bless.py). Bluetooth adapter must be available; you may need to run from an account that can use the system D-Bus (often bluetooth group membership on Linux).
  • macOS: Bless with Core Bluetooth (same code path as Linux).

Requirements

  • Python 3.10+
  • Bluetooth enabled on the machine.

Local setup

Create a virtual environment and install dependencies (markers pick WinRT vs Bless).

Linux / macOS — use python3, not py. The py command on many Linux distros is a different utility and does not support py -3 -m venv.

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r ble/requirements.txt

Windows — either of:

python -m venv .venv
.venv\Scripts\activate
pip install --upgrade pip
pip install -r ble\requirements.txt

Or, if the Python launcher for Windows (py.exe) is on your PATH:

py -3 -m venv .venv
.venv\Scripts\activate
pip install --upgrade pip
pip install -r ble\requirements.txt

Run

With the venv activated, from the repository root:

python ble/main.py

On Windows:

python ble\main.py

You need a graphical session (tkinter). Allow Bluetooth access if the OS prompts you.

About

Simple app to simulate sensor sending data over BLE.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages