chipweinberger / flutter_blue_plus

Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android, iOS, macOS
Other
768 stars 465 forks source link

[Help]: Bluetooth Device Discovery (device connects from settings) #978

Closed ryanpager closed 2 months ago

ryanpager commented 2 months ago

Requirements

Have you checked this problem on the example app?

Yes

FlutterBluePlus Version

1.32.8

Flutter Version

3.22.2

What OS?

Android, iOS

OS Version

17.5.1

Bluetooth Module

Not Sure

What is your problem?

So I am trying to detect when an rfid device connects from the system settings. The reason for this is that they are older bluetooth devices (12-24 months old). I don't believe them to be Bluetooth Classic, but they possibly could be (which I know this library doesnt support).

Whats interesting is that there are a few applications out there that are able to detect when it connects through the system menu, and then goes ahead and allows for connection in the application. Some examples of this are,

Gallagher Performance App https://apps.apple.com/nz/app/gallagher-animal-performance/id1495729013

Tru-Test App https://apps.apple.com/us/app/tru-test-data-link/id893033296

Their process for connecting through the app is the following,

  1. Go to Apple System Settings (Bluetooth)
  2. Pair the reader like normal through the available devices
  3. Once paired a prompt pops up that says "would you like X app to manage this device"
  4. On yea, the device then shows up in the app and you can connect to it

Im stumped on how they are doing this -- I know its obviously possible to connect to them, but I am just trying to figure out what needs to be done in order to get this to work. Any help would be so appreciated.

Logs

N/A
chipweinberger commented 2 months ago

use FlutterBluePlus.systemDevices

ryanpager commented 2 months ago

use FlutterBluePlus.systemDevices

@chipweinberger , I did try that. For BLE devices, it shows up (my newer readers show up), but for these specific devices they dont seem to show up in system devices at any point (even when connected through the system settings).

chipweinberger commented 2 months ago

usually that means that are Classic

ryanpager commented 2 months ago

usually that means that are Classic

@chipweinberger In your opinion, does that mean I should write some native bridge code with swift to access the bluetooth classic manager? Just trying to figure out the best way to go about this.

chipweinberger commented 2 months ago

ya first determine if that if that is problem by checking in other ble scanner apps

then write a bluetooth classic flutter plugin

ryanpager commented 2 months ago

@chipweinberger Awesome -- yea I tried the nRF app and others and its not showing up, so it likely is bluetooth classic. I will go ahead and just write some swift code to handle it -- if I can do a fork or PR ill make sure to contribute back. Appreciate you.

chipweinberger commented 2 months ago

no need to contribute

classic is a non-goal

burekas7 commented 2 months ago

@ryanpager @chipweinberger Hi, I have a similar issue. I have a barcode scanner reader (Bur3076).

I paired the device through the iOS Bluetooth settings, but when checking the FlutterBluePlus.systemDevices I'm getting an empty list. (Also in Android by the way, but there I do see the device when using FlutterBluePlus.bondedDevices)

So how can I actually see this device and using it?

chipweinberger commented 2 months ago

earphones are classic

burekas7 commented 2 months ago

@chipweinberger If a device is a "Classic", it won't be found in the scan results or it did found but the name will be an empty strings?

What are the solution for Classic device today in Flutter?

How can I verify if my Barcode Scanner device (Bur3076) is a classic type?