0

I have a flutter app that communicates with a BLE device. I use the flutter_blue_plus library. The customer basically asked to have, after the scan, a list of details of the device exposed before pairing, so if I have 3 devices near me I can understand what of the 3 devices I want to connect to.

I didn't find anything regarding reading a characteristic without pairing...Any suggestion? Changing the library is also an option for me: the only requirement is that it must work both on Android and iOS.

Thanks a lot!

Ale TheFe
  • 1,540
  • 15
  • 43

1 Answers1

0

Please note that pairing and connecting is not the same thing. Connecting means establishing a physical connection between devices. In BLE, that means a central and a peripheral continuously exchange (potentially empty) packets using some connection interval. Pairing is the act of establishing security, e.g. by letting the user compare a 6 digit passkey in order to start an encrypted session.

Characteristics cannot be read or written before a connection is established. However, if is important to let the user see some details about the device before connecting, it is common to put such data in the advertising data. Most common is to have a name in the advertisement data but arbitrary bytes can also be embedded, e.g. as part of a manufacturer data field.

Emil
  • 16,784
  • 2
  • 41
  • 52
  • Oooh! I didn't know that advertisement can contain data! I'll try that asap. And thanks for the explanation, I'm a little newbie regarding BLE! – Ale TheFe Aug 06 '23 at 11:53