All Projects → toy → Blueutil

toy / Blueutil

Licence: other
CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, …

Projects that are alternatives of or similar to Blueutil

Node Bluetooth Serial Port
Serial I/O over bluetooth for NodeJS
Stars: ✭ 444 (-4.31%)
Mutual labels:  bluetooth, osx
Airpodsbattery Monitor For Mac
Simple Widget to display your AirPods battery levels from the Mac Status bar
Stars: ✭ 165 (-64.44%)
Mutual labels:  bluetooth, osx
Extendable
Blocks Based Bluetooth LE Connectivity framework for iOS/watchOS/tvOS/OSX. Quickly configure centrals & peripherals, perform read/write operations, and respond characteristic updates.
Stars: ✭ 88 (-81.03%)
Mutual labels:  bluetooth, osx
Solar
A Swift micro library for generating Sunrise and Sunset times.
Stars: ✭ 409 (-11.85%)
Mutual labels:  osx
Phaser Ce Npm Webpack Typescript Starter Project
Project to get you started with your Phaser-CE (using the npm module) game using Typescript and Webpack for building! No hassle asset management, Google Web Font loader, live server, development vs distribution build pipeline, Electron packaging for desktop builds, and more...
Stars: ✭ 414 (-10.78%)
Mutual labels:  osx
Qt Nice Frameless Window
Qt Frameless Window for both Windows and OS X, support Aero Snap, drop shadow on Windows, and support Native Style such as round corner, drop shadow on OS X. Based on QMainWindow.
Stars: ✭ 430 (-7.33%)
Mutual labels:  osx
Dellxps15 9550 Osx
Tutorial for a full working Mac OS (10.11 up to 11.0) enviroment on the Dell XPS 15 (9550)
Stars: ✭ 428 (-7.76%)
Mutual labels:  osx
Daemonize
daemonize is a library for writing system daemons in Python.
Stars: ✭ 396 (-14.66%)
Mutual labels:  osx
Gort
Command Line Interface (CLI) for RobotOps
Stars: ✭ 425 (-8.41%)
Mutual labels:  bluetooth
Go Bluetooth
Golang bluetooth client based on bluez DBus interfaces
Stars: ✭ 423 (-8.84%)
Mutual labels:  bluetooth
Spaces Renamer
💻 Ability to rename desktop spaces on macOS 10.10+
Stars: ✭ 435 (-6.25%)
Mutual labels:  osx
Mobly
E2E test framework for tests with complex environment requirements.
Stars: ✭ 424 (-8.62%)
Mutual labels:  bluetooth
Xamarin Bluetooth Le
Bluetooth LE plugin for Xamarin
Stars: ✭ 419 (-9.7%)
Mutual labels:  bluetooth
Fastble
Android Bluetooth Low Energy (BLE) Fast Development Framework. It uses simple ways to filter, scan, connect, read ,write, notify, readRssi, setMTU, and multiConnection.
Stars: ✭ 4,409 (+850.22%)
Mutual labels:  bluetooth
Vulkandemos
Some simple vulkan examples.
Stars: ✭ 413 (-10.99%)
Mutual labels:  osx
Super Simple Raspberry Pi Audio Receiver Install
Super Easy installation to make your Raspberry Pi an Audio Receiver
Stars: ✭ 448 (-3.45%)
Mutual labels:  bluetooth
Rxbluetooth
Android reactive bluetooth
Stars: ✭ 405 (-12.72%)
Mutual labels:  bluetooth
Bleak
Bluetooth Low Energy platform Agnostic Klient for Python
Stars: ✭ 415 (-10.56%)
Mutual labels:  bluetooth
Github Matrix Screensaver
The GitHub Matrix Screensaver for Mac OSX
Stars: ✭ 453 (-2.37%)
Mutual labels:  osx
Luascriptcore
一款简单易用的多平台Lua桥接器,目前支持在iOS、Mac OS X、Android以及Unity3D中使用,让原生环境与Lua无障碍沟通。
Stars: ✭ 463 (-0.22%)
Mutual labels:  osx

blueutil

CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, …

Usage

Usage:
  blueutil [options]

Without options outputs current state

    -p, --power               output power state as 1 or 0
    -p, --power STATE         set power state
    -d, --discoverable        output discoverable state as 1 or 0
    -d, --discoverable STATE  set discoverable state

        --favourites          list favourite devices
        --inquiry [T]         inquiry devices in range, 10 seconds duration by default excluding time for name updates
        --paired              list paired devices
        --recent [N]          list recently used devices, 10 by default, 0 to list all
        --connected           list connected devices

        --info ID             show information about device
        --is-connected ID     connected state of device as 1 or 0
        --connect ID          create a connection to device
        --disconnect ID       close the connection to device
        --pair ID [PIN]       pair with device, optional PIN of up to 16 characters will be used instead of interactive input if requested in specific pair mode
        --add-favourite ID    add to favourites
        --remove-favourite ID remove from favourites

        --format FORMAT       change output format of info and all listing commands

        --wait-connect ID [TIMEOUT]
                              EXPERIMENTAL wait for device to connect
        --wait-disconnect ID [TIMEOUT]
                              EXPERIMENTAL wait for device to disconnect
        --wait-rssi ID OP VALUE [PERIOD [TIMEOUT]]
                              EXPERIMENTAL wait for device RSSI value which is 0 for golden range, -129 if it cannot be read (e.g. device is disconnected)

    -h, --help                this help
    -v, --version             show version

STATE can be one of: 1, on, 0, off, toggle
ID can be either address in form xxxxxxxxxxxx, xx-xx-xx-xx-xx-xx or xx:xx:xx:xx:xx:xx, or name of device to search in used devices
OP can be one of: >, >=, <, <=, =, !=; or equivalents: gt, ge, lt, le, eq, ne
PERIOD is in seconds, defaults to 1
TIMEOUT is in seconds, default value 0 doesn't add timeout
FORMAT can be one of:
  default - human readable text output not intended for consumption by scripts
  new-default - human readable comma separated key-value pairs (EXPERIMENTAL, THE BEHAVIOUR MAY CHANGE)
  json - compact JSON
  json-pretty - pretty printed JSON

Due to possible problems, blueutil will refuse to run as root user (see https://github.com/toy/blueutil/issues/41).
Use environment variable BLUEUTIL_ALLOW_ROOT=1 to override (sudo BLUEUTIL_ALLOW_ROOT=1 blueutil …).

EXPERIMENTAL Exit codes:
   0 Success
   1 General failure
  64 Wrong usage like missing or unexpected arguments, wrong parameters
  69 Bluetooth not available
  70 Internal error
  71 System error like shortage of memory
  75 Timeout error

Install/update/uninstall

Homebrew

Using package manager Homebrew:

# install
brew install blueutil

# update
brew update
brew upgrade blueutil

# uninstall
brew remove blueutil

MacPorts

Using package manager MacPorts:

# install
port install blueutil

# update
port selfupdate
port upgrade blueutil

# uninstall
port uninstall blueutil

You will probably need to prefix all commands with sudo.

From source

git clone https://github.com/toy/blueutil.git
cd blueutil

# build
make

# install/update
git pull
make install

# uninstall
make uninstall

You may need to prefix install/update and uninstall make commands with sudo.

Notes

Uses private API from IOBluetooth framework (i.e. IOBluetoothPreference*()).

Opening Bluetooth preference pane always turns on discoverability if bluetooth power is on or if it is switched on when preference pane is open, this change of state is not reported by the function used by blueutil.

Development

To build and update usage:

make build update_usage

To apply clang-format:

make format

To test:

make test

To release new version:

./release major|minor|patch

Copyright

Originally written by Frederik Seiffert [email protected] http://www.frederikseiffert.de/blueutil/ Copyright (c) 2011-2020 Ivan Kuchin. See LICENSE.txt for details.

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].