Bloop box client written in Rust with Tokio.
For pure game-related badges, any NFC tag supporting Iso14443a with a baud rate of 106 is supported. The client can handle both 4, 7 and 10-byte UIDs.
Config tags need to use either NTAG 213, 215 or 216. Other NTAG formats may work but are not tested.
You can change all configuration at run-time via text records on an NTAG tag. A helpful utility to automatically generate the text records is available here. If you prefer to generate the config tags in another way, the following table describes the text format.
Each record begins with a single letter denoting the command. It is followed by a JSON array with zero or more arguments.
| Command | Description | Arguments |
|---|---|---|
| w | Set WiFi Credentials | SSID, Password |
| c | Set Connection Details | Host, Port, Client ID, Secret |
| v | Set Volume Range | Min (0.0 - 1.0), Max (0.0 - 1.0) |
| u | Add additional config tag | |
| r | Remove all but current config tag | |
| s | Shut down system |
The status RGB LED will display the current status of the Bloop Box. If no user interaction is required, you'll get a static light, otherwise a breathing one.
- Green: Ready to read player tags
- Magenta: Processing tag
- Cyan: Config tag accepted
- Red: Config tag denied (no or malformed data)
- Magenta: Awaiting new config tag
- Yellow: Awaiting connection config
- Blue: Connecting to server
- Cyan: Connected, syncing audio files
- Red: Invalid server credentials
The LED turns off when the system shuts down.
Before you can deploy the Bloop Box client, you need to set up the Raspberry Pi, including audio and NFC. If you are using our reference design for the hardware, the steps to take are documented in the System setup section.
You'll need to have a data package for the bloop box installed. For more information about this, please check the Bloop Box Data Example
If you are testing against a locally hosted server with a self-signed certificate, you have to disable certificate verification to connect to that server. You can do so through the following call:
BLOOP_BOX_ROOT_CERT_SOURCE=dangerous_disabled bloop-boxBe really careful to only use this flag in development. If you use this in production, the client will not know if the server certificate is genuine and be open to man-in-the-middle attacks!
Also, if you need additional debug output, you can update the RUST_LOG env variable to e.g. debug or
error,bloop_box=debug.
Bloop Box contains an emulation feature which allows you to run it on your desktop. You can find pre-built binaries for Windows and Linux (x86-64) in the release section. If need to run the emulator on another platform, you can clone this repository and run:
cargo run --no-default-features --features hardware-emulationYou can find pre-compiled .deb files in the
release section. These will automatically set everything
up for you.
Bloop Box verifies the server certificate against the operating system's certificate store. To use a self-signed certificate, install its CA into the system store:
sudo cp my-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
sudo systemctl restart bloop-box.serviceThe store is read once at startup, so the restart is required.
For testing you can disable certificate verification entirely by setting the environment variable
BLOOP_BOX_ROOT_CERT_SOURCE=dangerous_disabled. Never use this in production.
If you want to set Bloop Box up manually, you can follow these instructions.