Code Monkey home page Code Monkey logo

Comments (4)

werediver avatar werediver commented on May 29, 2024
  1. After starting running it, give location permission (which is a different issue).

Please note, that this is not an issue with this library, but a detail of Android privacy control mechanism. Permission to use Location Services on Android is required to perform BLE scanning, because BLE scanning can (indirectly) reveal information about your location.

Now, did you have Location Services enabled when trying to perform scanning? It is currently required to have Location Services enabled to perform scanning, though this is indeed an issue (#23), which is going to be fixed in v2.0.0.

from flutter_reactive_ble.

posipunk avatar posipunk commented on May 29, 2024
  1. After starting running it, give location permission (which is a different issue).

Please note, that this is not an issue with this library, but a detail of Android privacy control mechanism. Permission to use Location Services on Android is required to perform BLE scanning, because BLE scanning can (indirectly) reveal information about your location.

Now, did you have Location Services enabled when trying to perform scanning? It is currently required to have Location Services enabled to perform scanning, though this is indeed an issue (#23), which is going to be fixed in v2.0.0.

Regarding the location services - the example app starts up displaying "Authorize the FlutterReactiveBle example app to use Bluetooth and location" and then you need to leave the app and in app settings toggle the permission to get to the scanning screen. Not the ideal interface for an example app.

I did enable location services while scanning. Scanning returned nothing.

from flutter_reactive_ble.

werediver avatar werediver commented on May 29, 2024

@posipunk I'm afraid, there is no issues with the library. There is a big difference for a BLE service to be implemented by a peripheral (to be present in its GATT database) and to be advertised (to be included in a BLE advertisement packet). There is, for instance, "Device Information" primary service (see GATT services) with a short ID 0x180A, which one would expect to be implemented on every device, and yet they would need a great deal of luck to find a device that advertises it.

Please, take a generic BLE scanner app like nRF Connect and look for BLE peripherals in your vicinity that advertise at least some services, then use the IDs of those services in the example app.

Things will become less confusing for newcomers, when #12 will be implemented, because then it will be possible to scan for devices specifying no services at all (coming in v2.0.0).

from flutter_reactive_ble.

posipunk avatar posipunk commented on May 29, 2024

@posipunk I'm afraid, there is no issues with the library. There is a big difference for a BLE service to be implemented by a peripheral (to be present in its GATT database) and to be advertised (to be included in a BLE advertisement packet). There is, for instance, "Device Information" primary service (see GATT services) with a short ID 0x180A, which one would expect to be implemented on every device, and yet they would need a great deal of luck to find a device that advertises it.

Please, take a generic BLE scanner app like nRF Connect and look for BLE peripherals in your vicinity that advertise at least some services, then use the IDs of those services in the example app.

Things will become less confusing for newcomers, when #12 will be implemented, because then it will be possible to scan for devices specifying no services at all (coming in v2.0.0).

Thank you for your comment - think I've solved the mystery.
I've been using nRF Connect for most of my debugging but realized it also tells which services are in the advertisement packet.
Appears the scan only looks for advertised services - it will not find devices based on services that have to be found via discovery.
Interestingly my device happens to advertise 0x180A and I was able to find it when I scanned for that one.
Would be good to clarify this in the documentation.

from flutter_reactive_ble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.