Skip to main content

Brownie

Brownie is a minimalistic Bluetooth Low Energy (BLE) chat application supporting both Server (Peripheral) and Client (Central) roles over the standard Nordic UART Service (NUS).

It allows two people on BLE-capable computers or devices to communicate directly over Bluetooth without requiring internet or local Wi-Fi.


Features

  • Server Mode (Peripheral): Host a chat room by advertising the Nordic UART Service (brownie server).
  • Client Mode (Central): Connect to a running server by address or auto-discovery (brownie client).
  • Device Discovery: Scan and list nearby BLE devices (brownie devices).
  • Standard Protocol: Compatible with any device or app implementing Nordic UART Service (NUS), including nRF Connect and Serial Bluetooth Terminal.
  • Rich Terminal UI: Formatted output and interactive prompt powered by rich and typer.

Installation

pip install -e .

To install development dependencies (testing):

pip install -e ".[dev]"

How Two People Can Communicate

1. Person A: Start the Server (Host)

On the first machine, start the server:

brownie server

(Options: --name / -n to change the advertised name, default is Brownie)

The server will display its local Bluetooth MAC address:

╭─ Brownie BLE Chat Server ──────────────────────╮
│ Device Name: Brownie                           │
│ Local Address: 6C:2F:80:C8:1A:94               │
│                                                │
│ Clients can connect using:                     │
│   brownie client 6C:2F:80:C8:1A:94             │
╰────────────────────────────────────────────────╯

2. Person B: Connect as a Client

On the second machine, connect directly to Person A's address:

brownie client 6C:2F:80:C8:1A:94

Or auto-discover the running Brownie server:

brownie client

Or scan for all nearby devices first:

brownie devices

3. Start Chatting

Once connected, both Person A and Person B can type into their terminal prompt > and press Enter. Incoming messages will appear in real time:

Peer: Hello from the server!
> Hi, message received loud and clear!

Press Ctrl+C at any time to disconnect or stop the server cleanly.


CLI Reference

Commands

Command Description
brownie server [--name NAME] Host a BLE chat server
brownie client [ADDRESS] [--name NAME] [--timeout SECONDS] Connect to a BLE chat server
brownie join <ADDRESS> Alias for client
brownie devices [--timeout SECONDS] Scan nearby BLE devices

Flags / Options

You can also use top-level flags:

brownie --server                       # Run server mode
brownie --client <MAC_ADDRESS>         # Run client mode
brownie --devices                      # Scan devices

Testing

Run unit tests with pytest:

pytest

Metadata

Release files for brownie1 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brownie1 2.1.0
File Size Uploaded Provenance Actions
brownie1-2.1.0.tar.gz 7.6 kB Without provenance Details for brownie1-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brownie1 2.1.0
File Interpreter ABI Platform Actions
brownie1-2.1.0-py3-none-any.whl Python 3 none any Details for brownie1-2.1.0-py3-none-any.whl

Total release size: 14.9 kB

Release files / brownie1-2.1.0.tar.gz

Download URL brownie1-2.1.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
baa1e136b12eef2271882a4606fe14c1454bd721b47912c16c0d7fb685945c5c
BLAKE2b-256 checksum
How to use checksums
7de893935b98d2d12becb26f0784ea6fd8cdd60a845afa8080c874061a3739a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / brownie1-2.1.0-py3-none-any.whl

Download URL brownie1-2.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
437f13732833918312a3cb999b3a6a8378b319eecefcec13e278ebb94b5f1e78
BLAKE2b-256 checksum
How to use checksums
b3894cf7964e727e51c72b489c82b9e98324c59487832ab3b524815b7d67a441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for brownie1 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page