Firefly is the Android companion app for your custom AI-assistant PCB — think "your own Alexa" that you talk to over Bluetooth Low Energy (BLE).
This app scans for your Firefly board, connects over BLE, and gives you a simple chat-style interface: type a command, send it to the board, and see whatever it sends back in the live log.
This project was scaffolded before the PCB itself arrived, so it ships with sensible defaults you'll need to confirm/adjust once you can test against the real hardware:
- Transport: BLE (Bluetooth Low Energy)
- GATT profile: Nordic UART Service (NUS) — the most common "send text /
receive text" profile used by ESP32, nRF52, and similar boards.
- Service UUID:
6e400001-b5a3-f393-e0a9-e50e24dcca9e - Write (phone → board) characteristic:
6e400002-b5a3-f393-e0a9-e50e24dcca9e - Notify (board → phone) characteristic:
6e400003-b5a3-f393-e0a9-e50e24dcca9e
- Service UUID:
- Device name filter: the app looks for a device advertising as
Firefly
If your firmware uses different UUIDs or a different device name, update
app/src/main/java/com/healspace/firefly/BleConstants.kt — that's the only
file you should need to touch to match your actual board.
- Clone this repo.
- Open it in Android Studio (Hedgehog or newer recommended).
- Let Gradle sync (it uses Gradle 8.7 / AGP 8.5).
- Plug in an Android phone (min SDK 26 / Android 8.0+) with USB debugging on, or use an emulator with Bluetooth support (real hardware BLE testing needs a physical phone).
- Run the app. Tap Scan for Firefly, grant Bluetooth permissions, and tap your board once it shows up in the list.
- Type a command in the text box and hit Send — replies from the board show up in the log above.
app/src/main/java/com/healspace/firefly/
MainActivity.kt - UI, permission handling, wiring
BleManager.kt - BLE scan/connect/read/write logic
BleConstants.kt - UUIDs + device name — EDIT THIS for your firmware
DeviceAdapter.kt - RecyclerView list of discovered devices
Your PCB firmware needs to:
- Advertise as a BLE peripheral named
Firefly(or update the filter above). - Expose the Nordic UART Service with the UUIDs above (most BLE SDKs/libraries
have this built in, e.g.
ESP32 BLE Arduino'sBLEUARThelper, or Adafruit's Bluefruit libraries). - Send notifications on the TX characteristic whenever it wants to "speak" back to the phone.
- Voice input (speech-to-text) feeding straight into
sendCommand() - Text-to-speech for responses instead of just a text log
- Auto-reconnect if the board goes out of range and comes back
- WiFi fallback transport if BLE range isn't enough
Built with 🔥 for healspace's Firefly PCB project.