# sparkBLEr
`sparkbler` is a small Rust program for controlling lightsticks from the
[Ado Hibana](https://sp.universal-music.co.jp/ado/hibana/) 2025 world tour.
This program allows you to connect to connect to the light stick and set it to any RGB color
just as you would in the official [Ado Voo](https://play.google.com/store/apps/details?id=jp.co.ruifan.adovoo)
application.
Currently this program is minimal and only supports controlling a single lightstick at at time.
I plan to improve this program in the future to support other color spaces and better support
managing multiple connected lightsticks.
Additionally, this repository contains a library by the same name which is used to implement the
`sparkbler` binary. This can be used for writing your own rust programs that interface with these lightsticks.
For information on how this library works,
I've written a [post](https://lp.baric.us/posts/2025/ado_lightstick.html)
on my blog describing my time reverse-engineering enough of the lightstick's protocol to make this possible.
## Installation
If you have cargo available, the `sparkbler` binary can be installed by running:
```sh
cargo install sparkBLEr-bin
```
which should compile and install the `sparkbler` binary to `~/.cargo/bin/sparkbler`
assuming you have the default cargo path.
This location may not be on your path automatically,
so you may need to move the binary or add the location to your path.
To uninstall the program, you can run the normal cargo uninstall
```sh
cargo uninstall sparkBLEr-bin
```
Not that both commands require the `-bin` suffix as the library crate takes the `sparkBLEr` name.
## Usage
`sparkBLEr` has 3 main commands:
```
$ sparkbler help
A command-line utility for controlling lightsticks from the Ado Hibana 2025 world tour via Bluetooth-Low-Energy (BLE). This
utilizes the library crate of the same name to find these lightsticks and set their color while connected to the device.
Note that the lightstick remains connected to the computer running the program after this program exits, meaning any color set
remains until either the program is run with the `disconnect` command or it is disconnected manually via your computer's
bluetooth menus.
Usage: sparkbler <COMMAND>
Commands:
connect Connects to the first lightstick found
disconnect Disconnect from a connected lightstick
set-color Set the color of a connected lightstick
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
```
`sparkbler connect <red> <green> <blue>` will connect to the first lightstick found.
To put the lightstick into pairing mode,
hold the small button on the back of the handle until the lightstick starts flashing blue.
Note that if you have already ran `sparkbler connect` it will block and likely connect
to the lightstick immediately when it becomes discoverable.
`sparkbler set-color` takes in 3 values (for RGB red, green, blue)
and sets a connected lightstick to the passed color.
If you have not connected a lightstick, it will wait for the first lightstick to connect
and set that one's color.
`sparkbler disconnect` turns off the lightstick by disconnecting it from the computer running
the program.
Note that if you have no conneted lightstick the program will try to connect to one just to disconnect it.