#bluetooth #gatt #l2cap #bluez #rfcomm #command-line #client-server

app bluer-tools

BlueR tools: swiss army knife for GATT services, L2CAP and RFCOMM sockets on Linux

23 releases

0.17.1 Mar 25, 2024
0.17.0-pre1 Nov 17, 2023
0.16.0-pre1 Jun 20, 2023
0.15.4 Dec 14, 2022
0.10.3 Jul 18, 2021

#157 in Hardware support

Download history 34/week @ 2024-01-31 10/week @ 2024-02-14 40/week @ 2024-02-21 10/week @ 2024-02-28 2/week @ 2024-03-06 10/week @ 2024-03-13 140/week @ 2024-03-20 51/week @ 2024-03-27 22/week @ 2024-04-03

224 downloads per month

BSD-2-Clause

545KB
11K SLoC

BlueR tools — swiss army knife for GATT services, L2CAP and RFCOMM sockets on Linux

crates.io page BSD-2-Clause license

This crate provides tools for Bluetooth on Linux building on the functionality of the BlueR crate. A running Bluetooth daemon (BlueZ) is required.

The following command line tools are included:

  • blumon: Scans for and monitors Bluetooth devices similar to top.

  • gattcat: Swiss army knife for Bluetooth LE GATT services.

    • discovers Bluetooth LE devices and their services
    • pairing
    • resolves all well-known UUIDs and manufacturer ids
    • performs all possible operations on GATT services
    • connects (via notify and write) to a remote GATT service
    • serves (via notify and write) a local program over a GATT service
    • implements the Nordic UART service (NUS) as client and server
  • l2cat: netcat-like for Bluetooth classic (BR/EDR) and LE L2CAP sockets.

    • connects to remote L2CAP PSMs
    • listens on local L2CAP PSMs and accepts connections
    • serves a local program on an L2CAP PSM
    • speed tests
  • rfcat: netcat-like for Bluetooth RFCOMM sockets.

    • connects to remote RFCOMM channels
    • listens on local RFCOMM channels
    • serves a local program on an RFCOMM channel
    • resolve and publish SDP records
    • speed tests

Each tool supports the --help option for detailed usage information.

Installation

First, install D-Bus and Bluetooth libraries on your system. On Debian this can be achieved by running

sudo apt install libdbus-1-dev

Then, run the following command to install BlueR tools

cargo install bluer-tools

If you do not have Cargo on your system, you can use rustup for installing it.

Dependencies

~9–23MB
~278K SLoC