Sep 16, 2020
bluetoothadapter: Bluetooth Based Client-Server Apps
Facilitating Bluetooth server sockets for Flutter apps using bluetoothadapter plugin.
Author


Book a call
The Problem
We came across a scenario where we were to communicate with a Raspberry Pi using Bluetooth. For this, we needed to implement a full-duplex type connection with the RPI.
We looked for some quick solutions over the internet, but unfortunately, we found none. There were very few Bluetooth based libraries that were well written and almost none/very few had an implementation for creating Bluetooth server sockets.
That's when we decided to come up with a simple and elegant approach to our problem.
The Solution
bluetoothadapter is a package which enables a Flutter application to communicate with other devices/programs through Bluetooth. It does so using Bluetooth based server sockets, which allows the Flutter app to establish a full-duplex connection with the other Bluetooth based devices which act as its counterpart.
Features provided by bluetoothadapter
- Setting up a UUID from the user end.
- Checking Bluetooth connection status and giving alerts if it is off or not right.
- Getting a list of paired devices.
- Get a particular paired device info.
- Start Bluetooth server.
- Start Bluetooth client.
- Send a message to a connected device.
- Stream for listening to received messages.
- Stream for listening to connection status (CONNECTED, CONNECTING, CONNECTION FAILED, LISTENING, DISCONNECTED).
Check out the code on Github - https://github.com/GeekyAnts/flutter-bluetooth-adapter
Visualization of the process

How to use ?
We start by adding the following dependency to our pubspec.yaml file:
dependencies:
bluetoothadapter: <latest version>
There are mainly 4 main steps involved in the process:
- Initiate the Bluetooth adapter
- Implement listeners for observing connection status.
- Implement listeners for receiving messages.
- Implement methods for sending back the messages to the application counterpart.
Here's a code sample for the same:
For a full example please check out this link : https://github.com/GeekyAnts/flutter-bluetooth-adapter/tree/master/example
I hope that this solution is what you require to enable your apps to communicate through bluetooth for critical functions and this implementation will help you understand how to use bluetoothadapter.
Thanks for reading!
Related Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

Apr 23, 2026
From Manual Testing to AI-Assisted Automation with Playwright Agents
This blog discusses the value of Playwright Agents in automating workflows. It provides a detailed description of setting up the system, as well as a breakdown of the Playwright Agent’s automation process.

Apr 14, 2026
The Keyboard Bounce of Death: Handling Inputs on Complex React Native Screens
Fix the React Native ‘Keyboard Bounce of Death.’ Learn why inputs jump and how to build smooth, production-ready forms with modern architecture.

Apr 9, 2026
From RFPs to Revenue: How We Built an AI Agent Team That Writes Technical Proposals in 60 Seconds
GeekyAnts built DealRoom.ai — four AI agents that turn RFPs into accurate technical proposals in 60 seconds, with real-time cost breakdowns and scope maps.

Apr 6, 2026
How We Built an AI System That Automates Senior Solution Architect Workflows
Discover how we built a 4-agent AI co-pilot that converts complex RFPs into draft technical proposals in 15 minutes — with built-in conflict detection, assumption surfacing, and confidence scoring.

Apr 6, 2026
AI Code Healer for Fixing Broken CI/CD Builds Fast
A deep dive into how GeekyAnts built an AI-powered Code Healer that analyzes CI/CD failures, summarizes logs, and generates code-level fixes to keep development moving.

Apr 2, 2026
A Real-Time AI Fraud Decision Engine Under 50ms
A deep dive into how GeekyAnts built a real-time AI fraud detection system that evaluates transactions in milliseconds using a hybrid multi-agent approach.