edufolly / flutter_bluetooth_serial

A basic Flutter Bluetooth Serial
MIT License
476 stars 455 forks source link

Can't connect to the other phone (example) #169

Open ClaryGlt opened 2 years ago

ClaryGlt commented 2 years ago

Problem summary

Hello, I am trying to make the example work on two Android(11&10) phones. Once they are paired, I go to the chatroom on both phones, and am indefinitely seeing "Wait until connected..." on the "connecting chat to [name of the phone]" page. I have modified the code to be able to use it on my phones and tried adding more Bluetooth permissions, to no avail.

Steps to reproduce

I am using a Xiaomi Redmi note 10 pro (Android 11) and a HEYOU60 (Android10)

  1. Open the app on both phone, and turned on Bluetooth and location on each of them.
  2. Make one of them discoverable and pair it through "Explore discovered devices" with the other
  3. Go to "Connect to paired device to chat" with both phone and select the other (I have tried making both of them discoverable beforehand too)
  4. Wait indefinitely for the connection to happen.

Environment

Here is the git to my current code: https://github.com/ClaryGlt/flutter_bluetooth_serial/tree/chat_bug

Thank you!