Benshi Dash
What is BenshiDash?
BenshiDash is a sophisticated Android application designed to function as a full-featured head unit for specific amateur and GMRS radios that use the proprietary Benshi protocol for Bluetooth communication.
Built with Flutter, it transforms a standard Android tablet into a powerful, touch-friendly interface for controlling the radio, visualizing data, and managing its programming.
The application goes beyond simple remote control by integrating:
- Live mapping for APRS (Automatic Packet Reporting System)
- Web service integration for finding local repeaters
- Advanced scanning tools
Together, these features create a centralized command center for in-vehicle radio operations.
How It Works: Core Architecture
BenshiDash is built around a central controller that manages the state of the connected radio.
The UI is composed of several specialized screens that interact with this controller to display data and send commands.
1. Radio Communication (radio_controller.dart)
This class is the heart of the application, handling all communication and state management.
-
Bluetooth Connection
Uses theflutter_bluetooth_serialpackage to establish and maintain two Bluetooth RFCOMM connections:- Channel 3 → commands
- Channel 4 → audio
-
Protocol Handling
All data exchanged with the radio is wrapped in a GAIA frame.
The controller uses_parseGaiaFrameFromBufferto read the incoming byte stream, identify complete GAIA frames, and extract payloads. -
Message Parsing
Each GAIA frame’s payload is a Benshi protocol message, parsed byMessage.fromBytes.
These are converted into structured Dart objects representing commands, replies, or asynchronous events. -
State Management
Properties likedeviceInfo,status,settings, andgpsreflect the radio’s state.
Events such asHT_STATUS_CHANGEDautomatically trigger UI updates via ChangeNotifier. -
Command Execution
UI commands are routed through_sendCommandExpectReply, which waits for specific replies while handling timeouts and errors.
2. The Benshi Protocol Implementation (benshi/protocol/)
BenshiDash includes a from-scratch implementation of the Benshi protocol to construct and parse the binary messages used by the radio.
-
Data Models (
data_models.dart)
Core classes likeChannel,Settings, andPositionparse binary data into objects (fromBytes) and serialize back (toBytes). -
Bit-Level Manipulation (
utils.dart)
The protocol isn’t byte-aligned, soByteReaderandByteWriterwork at the bit level for precise parsing and serialization. -
Command Structure (
command_bodies.dart,message.dart)
Numeric command IDs are mapped to Dart enums for readability.
Each command has a corresponding “body” class for handling its unique data payload.
3. Key Functionalities
APRS Decoding and Mapping
BenshiDash can function as a TNC (Terminal Node Controller) for APRS without extra hardware.
- Radio receives an APRS packet and sends it as a
DATA_RXDevent. - The
RadioControllerreassembles fragmentedTncDataFragmentpieces. - Once complete, raw AX.25 frame bytes are passed to
AprsPacket.fromAX25Frame. - The packet is decoded into source, destination, path, GPS coordinates, comments, and symbols.
- The
AprsPacketis added to the controller’s list, updating the APRS map (flutter_map) with a new station marker.
RepeaterBook Integration
The app integrates with the RepeaterBook.com API for easy travel programming.
- From the Channels Screen, user triggers GPS Import.
RepeaterBookServicefetches the current location (from the radio or tablet GPS).- Location is reverse-geocoded to determine the current state (e.g., Ohio).
- The RepeaterBook API is queried for repeaters in that state.
- Results are filtered to 2m and 70cm bands, then the closest 32 repeaters are selected.
- Each
Repeaterobject is converted to aChannelobject and written into the radio’s memory.
Like What You See?
I'm available for similar projects. Let's discuss how I can help you achieve your goals.
View My Services