Control Google Pixel Buds Pro from the Linux command line.

Overview

pbpctrl

Control Google Pixel Buds Pro from the Linux command line. Might or might not work on other Pixel Buds devices.

Allows reading of battery, hardware, software, and runtime information as well as reading and changing settings (ANC state, equalizer, ...).

Installation

Arch Linux

A pbpctrl package is provided via the AUR. Alternatively, the pbpctrl-git package can be used to directly build from the latest state on the main branch.

Installation via cargo

To build install the binary via cargo, run

cargo install pbpctrl --git https://github.com/qzed/pbpctrl/

Use the --tag option if you want to install a specific tag instead of the latest main branch.

Instructions

Pair and connect your Pixel Buds Pro before use. Run pbpctrl help for more information.

Notes on Battery Information

The Pixel Buds Pro support basic battery information via the AVCPR standard. Support for this is still experimental in BlueZ and needs to be enabled manually by editing /etc/bluetooth/main.conf and setting

[General]
Experimental = true

or by starting BlueZ with the --experimental flag. After this, battery status should be provided via UPower.

Note that this, however, will only provide a single battery meter for both buds combined, and none for the case. For more detailed information, use pbpctrl show battery. This also allows reading of the case battery as long as one bud is placed in the case (note that the case does not have a Bluetooth receiver itself).

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

You might also like...
An EVM low-level language that gives full control over the control flow of the smart contract.

Meplang - An EVM low-level language Meplang is a low-level programming language that produces EVM bytecode. It is designed for developers who need ful

Command-line tool to generate Rust code for Google Cloud Spanner

nene nene is a command-line tool to generate Rust code for Google Cloud Spanner. nene uses database schema to generate code by using Information Schem

Coinbase pro client for Rust

Coinbase pro client for Rust Supports SYNC/ASYNC/Websocket-feed data support Features private and public API sync and async support websocket-feed sup

Coinbase pro client for Rust

Coinbase pro client for Rust Supports SYNC/ASYNC/Websocket-feed data support Features private and public API sync and async support websocket-feed sup

Controls the RGB on the keyboard for the Legion 5 Pro from Lenovo. Mostly used for learning a bit of rust.

L5P Keyboard RGB Control Program A fun little experiment. Probably contains bugs. ⚠️ Use at your own risk, the developer is not responsible for any da

A bot for competing with estimation (cards game) pro players and actually beat them 💪
A bot for competing with estimation (cards game) pro players and actually beat them 💪

Estimation bot 🤖 What's estimation? The card game Estimation is a trick-taking game where you score points by correctly predicting the amount of tric

A simple CLI to build VEXCode V5 Pro projects and download them to the V5 brain.

vexer A simple CLI to build VEXCode V5 Pro projects and download them to the V5 brain. (WIP) This currently is only tested on and only works on window

This program patches the WeMod app to think you're a pro subscriber
This program patches the WeMod app to think you're a pro subscriber

WeMod Pro Unlocker This program patches the WeMod app to think you're a pro subscriber. ⚠️ DISCLAIMER: Eventhough I don't think it is likely, WeMod co

A command line tool to control the power state of Valve Base Stations 2.0.

lighthousectl A command line tool to control the power state of Valve Base Stations 2.0. Usage Scan All Base Stations It scans endlessly. You can stop

A command-line tool for extensible LED matrix control with Raspberry Pi devices.

Matricks "Teach an old matrix new tricks..." Matricks is a WASM-based extensible LED matrix control tool intended for use on Raspberry Pi devices. LED

REC2 (Rusty External Command and Control) is client and server tool allowing auditor to execute command from VirusTotal and Mastodon APIs written in Rust. 🦀
REC2 (Rusty External Command and Control) is client and server tool allowing auditor to execute command from VirusTotal and Mastodon APIs written in Rust. 🦀

Information: REC2 is an old personal project (early 2023) that I didn't continue development on. It's part of a list of projects that helped me to lea

Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

Rust bindings to Linux Control Groups (cgroups)

cgroups-fs Native Rust library for managing Linux Control Groups (cgroups). This crate, curently, only supports the original, V1 hierarchy. You are we

A Rust program to control bias lighting on Linux and Windows.

displaylight_rs This Rust workspace is a rewrite of my DisplayLight project. It colors leds mounted behind the monitor with the colors shown on the di

A GUI Fan control utility for Linux.

TuxTempMaster For now I'm gonna use this README to write the status of the project Important note This program is not gonna do any black magic. If you

A commmand line tool for uploading homework coded on the dcloud server onto specific google drive course folders.

A commmand line tool for uploading homework coded on the dcloud server onto specific google drive course folders.

👾 Modern and minimalist pixel editor

██ ████ ██ ██ ███ ██ ███ ██ ██ ██ ██ ██ ██ `rx` is a modern and minimalist pixel editor. Designed with g

Extensible open world rogue like game with pixel art. Players can explore the wilderness and ruins.
Extensible open world rogue like game with pixel art. Players can explore the wilderness and ruins.

Rusted Ruins Extensible open world rogue like game with pixel art. Players can explore the wilderness and ruins. This game is written in Rust. Screens

Artsy pixel image to vector graphics converter
Artsy pixel image to vector graphics converter

inkdrop inkdrop is an artsy bitmap to vector converter. Command line interface The CLI binary is called inkdrop-cli and reads almost any image bitmap

Comments
  • Thank you!

    Thank you!

    I just wanted to thank you for this project, I just tried it and it worked out of the box. Also the tip with enabling the experimental flag added the battery info to my bluetooth KDE widget which is nice!

    Perhaps you might want to talk to the GadgetBridge people (https://codeberg.org/Freeyourgadget/Gadgetbridge/) they already have implemented some other buds and the Pixel Buds Pro would be a nice addition.

    Regards, Sebastian

    opened by sebastianha 3
  • MacOS support

    MacOS support

    I tried to compile pbpctrl for MacOS. To solve dependency issues, I installed the missing packages: brew install dbus protobuf. Then I ran cargo build --release --target aarch64-apple-darwin, but as expected, no success.

    Compile output
    $ cargo build --release --target aarch64-apple-darwin
       Compiling bluer v0.15.4
    error[E0432]: unresolved imports `libc::Ioctl`, `libc::SOCK_CLOEXEC`, `libc::SOCK_NONBLOCK`
     --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bluer-0.15.4/src/sock.rs:3:40
      |
    3 | use libc::{c_int, sockaddr, socklen_t, Ioctl, SOCK_CLOEXEC, SOCK_NONBLOCK};
      |                                        ^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^^^^ no `SOCK_NONBLOCK` in the root
      |                                        |      |
      |                                        |      no `SOCK_CLOEXEC` in the root
      |                                        no `Ioctl` in the root
      |
    help: a similar name exists in the module
      |
    3 | use libc::{c_int, sockaddr, socklen_t, ioctl, SOCK_CLOEXEC, SOCK_NONBLOCK};
      |                                        ~~~~~
    help: a similar name exists in the module
      |
    3 | use libc::{c_int, sockaddr, socklen_t, Ioctl, O_CLOEXEC, SOCK_NONBLOCK};
      |                                               ~~~~~~~~~
    help: a similar name exists in the module
      |
    3 | use libc::{c_int, sockaddr, socklen_t, Ioctl, SOCK_CLOEXEC, O_NONBLOCK};
      |                                                             ~~~~~~~~~~
    
    error[E0432]: unresolved imports `libc::SOCK_CLOEXEC`, `libc::SOCK_NONBLOCK`
     --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bluer-0.15.4/src/gatt/mod.rs:5:22
      |
    5 | use libc::{AF_LOCAL, SOCK_CLOEXEC, SOCK_NONBLOCK, SOCK_SEQPACKET};
      |                      ^^^^^^^^^^^^  ^^^^^^^^^^^^^ no `SOCK_NONBLOCK` in the root
      |                      |
      |                      no `SOCK_CLOEXEC` in the root
      |
    help: a similar name exists in the module
      |
    5 | use libc::{AF_LOCAL, O_CLOEXEC, SOCK_NONBLOCK, SOCK_SEQPACKET};
      |                      ~~~~~~~~~
    help: a similar name exists in the module
      |
    5 | use libc::{AF_LOCAL, SOCK_CLOEXEC, O_NONBLOCK, SOCK_SEQPACKET};
      |                                    ~~~~~~~~~~
    
    error[E0432]: unresolved imports `libc::AF_BLUETOOTH`, `libc::SOL_BLUETOOTH`, `libc::TIOCINQ`
      --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bluer-0.15.4/src/rfcomm/mod.rs:16:12
       |
    16 |     c_int, AF_BLUETOOTH, EAGAIN, EINPROGRESS, MSG_PEEK, SHUT_RD, SHUT_RDWR, SHUT_WR, SOCK_RAW, SOCK_STREAM,
       |            ^^^^^^^^^^^^ no `AF_BLUETOOTH` in the root
    17 |     SOL_BLUETOOTH, SOL_SOCKET, SO_ERROR, SO_RCVBUF, TIOCINQ, TIOCOUTQ,
       |     ^^^^^^^^^^^^^ no `SOL_BLUETOOTH` in the root    ^^^^^^^ no `TIOCINQ` in the root
    
    error[E0425]: cannot find function `accept4` in crate `libc`
       --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bluer-0.15.4/src/sock.rs:147:15
        |
    147 |         libc::accept4(socket.as_raw_fd(), saddr.as_mut_ptr() as *mut _, &mut length, SOCK_CLOEXEC | SOCK_NONBLOCK)
        |               ^^^^^^^ help: a function with a similar name exists: `accept`
        |
       ::: ~/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.139/src/unix/mod.rs:641:5
        |
    641 |     pub fn accept(socket: ::c_int, address: *mut sockaddr, address_len: *mut socklen_t) -> ::c_int;
        |     ---------------------------------------------------------------------------------------------- similarly named function `accept` defined here
    
    Some errors have detailed explanations: E0425, E0432.
    For more information about an error, try `rustc --explain E0425`.
    error: could not compile `bluer` due to 4 previous errors
    warning: build failed, waiting for other jobs to finish...
    error: could not compile `bluer` due to 4 previous errors
    

    Is it possible to use something crossplatform for bluetooth bindings?

    opened by mikekosulin 1
Releases(v0.1.1)
  • v0.1.1(Jan 3, 2023)

    Changes:

    • Add support for more settings:
      • Allow reading and changing the auto-OTA update flag
      • Allow reading and changing the on-head-detection (OHD) flag
      • Allow reading and changing the out-of-box experience mode flag
      • Allow reading and changing the out-of-box experience is-finished flag
    • Misc. command help text improvements
    • Internal/code improvements
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Jan 1, 2023)

    Features:

    • Show basic information (battery, runtime information, hardware- and software-information)
    • Read and change settings (current ANC state, 5-band equalizer, ...)
    Source code(tar.gz)
    Source code(zip)
Owner
Maximilian Luz
Research Assistant at the Computer Vision Group, University of Stuttgart.
Maximilian Luz
Artsy pixel image to vector graphics converter

inkdrop inkdrop is an artsy bitmap to vector converter. Command line interface The CLI binary is called inkdrop-cli and reads almost any image bitmap

Matthias Vogelgesang 62 Dec 26, 2022
PixelWorldProxy - Simple Pixel World Proxy made in Rust.

PixelWorldProxy Simple Pixel World Proxy made in Rust. Feature Safe and fast Support subserver switching Usage Clone the repository: git clone https:/

null 3 Jan 5, 2022
A support tool for creating shaders that display pixel arts.

dot2shader --> PRE-BUILD PAGE IS HERE <-- A tool for generating shaders displaying pixel art textures in Shadertoy and twigl. Quick start Go to pre-bu

理論屋 2 Feb 17, 2022
Signed distance field font and image command line tool based on OpenCL.

SDFTool Signed distance field font and image command line tool based on OpenCL. Build Windows Run cargo build --release in Visual Studio developer x64

弦语蝶梦 7 Oct 16, 2022
Brings all relevant command-line tesseract functionality to Rust

rusty-tesseract A Rust wrapper for Google Tesseract Description Brings all relevant command-line tesseract functionality to Rust Based on the Python w

null 28 Dec 8, 2022
Screen-capturer: A cross-platform screenshots library for MacOS、Windows、Linux(X11).

Screen-capturer: A cross-platform screenshots library for MacOS、Windows、Linux(X11).

nashaofu 49 Dec 12, 2022
Converts images into textual line art.

img2utf Transform images to textual line art! Images require pre-processing to come out nice. It's expected that users will do the following: Apply ga

Lee 149 Dec 10, 2022
A cross platform reloading image viewer combined with a command executor

Watchout A cross platform reloading image viewer combined with a command executor. Watchout will do any of the following: Run a command when any file

Benedikt Terhechte 6 Oct 7, 2022
A simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art version constructed with emoji

EmojiPix This is a simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art vers

Michael Milton 22 Dec 6, 2022