Home > Software design >  Is there an alternative for flutter-bluetooth-serial package that can be used on both IOS and Androi
Is there an alternative for flutter-bluetooth-serial package that can be used on both IOS and Androi

Time:07-13

I have been working on a flutter app for few months now. The main feature that my app relying on is Bluetooth serial communication. Basically my app will connect and communicate (receive and send data) to HC-06 Bluetooth module that is connected with a microcontroller. Everything was going great till the moment when I found out that flutter bluetooth serial package doesn’t actually work with Ios devices (have been doing all tests on android device). So I’m wondering if there is a way to make it work on ios devices or if there is any alternative way that I can use to creat the serial communication between ios and Hc-06 device.

CodePudding user response:

iOS does not support SPP (Serial Port Profile), which is the serial protocol you are almost certainly using with Android. You will need to redesign your system to use another protocol.

The HC-06 only supports Bluetooth 2.0 EDR, and I don't believe there is any protocol it can handle that is also supported by iOS (in a way accessible to developers). You would likely need to use a module that supports BLE GATT, which requires Bluetooth 4.

(iOS does support GATT over BR/EDR, but I don't believe that's available on the HC-06.)

CodePudding user response:

taha! I recommend you to try this package flutter_blue. I use it to connect my BLE device and communicate well.

  • Related