Steve C
Steve C

Reputation: 11

Multiple BLE Connections using Flutter

I am working on a cross-platform mobile app that will connect to 5 or more BLE devices simultaneously and send/receive data. These BLE devices are trackers that monitor objects movement and transmit data intermittently.

I have a few questions regarding this and I couldn't find any clear answers online:

  1. Is flutter a good choice for this application considering BLE communication is the primary concern?

  2. How many stable simultaneous connections are possible using flutter for both iOS and Android?

  3. Sending/Receiving data from multiple BLE devices simultaneously (can be asynchronous) is achievable? Are there any existing issues in this?

  4. Does flutter library automatically handle multiple connections and simultaneously send/receive data?

  5. Any recommended libraries for this application?

  6. Any example of cross-platform app that has multiple BLE connections and communication. (preferably flutter)

Thanks.

Upvotes: 1

Views: 1039

Answers (1)

Emil
Emil

Reputation: 18452

Both iOS and Android support multiple BLE connections. It all depends on the Bluetooth controller's maximum number of connections and if the phone manufacturer has added additional restrictions. 5 should definitely be supported on most phones.

All BLE stacks and libraries I've seen support send/receive for multiple devices out-of-the-box since you will get one object/handle per device or connection.

So to all your Bluetooth-specific questions I would answer "yes". Just note that once you reach the maximum number of connections, you might get different various errors or that it simply never connects to the next device, since this is not handled in a unified way, at least not on Android.

Now, Flutter itself is just a UI toolkit and has not really so much to do with the Bluetooth stack's stability and features. Since Flutter uses Dart as programming language you however have to write a bridge between native bluetooth code and Dart (or use an existing plugin someone else has already written). If this is a "good choice" is out of scope for Stack overflow since that is an opinion-based question. But there are a lot of people using Flutter for BLE apps...

Library recommendations are also out of scope for Stack Overflow.

Upvotes: 2

Related Questions