1

I'm having a hard time understanding why a Bluetooth connection is able to be made without either pairing or trusting a device. I'm using bluetoothctl and and can connect two devices without pairing them first by using "Scan on" on the central side and "Advertise on" on the peripheral side.

could someone explain why this is happening?

ascode
  • 13
  • 3
  • There are four levels of security within BLE: Level 1: No Security (No authentication and no encryption) Level 2: Unauthenticated pairing with encryption Level 3: Authenticated pairing with encryption Level 4: Authenticated LE Secure Connections pairing with encryption You need to look at your peripheral to see what it has set. – ukBaz Oct 18 '22 at 19:41
  • @ukBaz When you say "look at your peripheral to see what it has set", are you saying the type of advertisement it is sending? or are you referencing something else? – ascode Oct 18 '22 at 20:32
  • When you are connected to the peripheral device with `bluetoothctl` get the `attribute-info` for a GATT characteristic. e.g. `gatt.attribute-info 00002a05-0000-1000-8000-00805f9b34fb ` and it will have a value for `Flags` to one of the values specified at: https://github.com/bluez/bluez/blob/07fd4b948251f0613df230ca365b8440808c5a5c/doc/gatt-api.txt#L267-L291 . You can also use a generic Bluetooth Low Energy scanning and exploration tool like [nRF Connect](https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-mobile) to find the same information. – ukBaz Oct 19 '22 at 05:56
  • @ukBaz Thank you for the insight. I've tried this method and can't find any information of the security mode of the device. I'm trying to make the board connectable only for devices that are paired to it. Do you know of any tutorial that can guide me in this task? – ascode Oct 19 '22 at 17:34
  • I think you will need to update your question with more information about what "board" you have and what you have tried already. Maybe the output from nRF Connect or bluetoothctl. Take a look at https://stackoverflow.com/help/how-to-ask – ukBaz Oct 19 '22 at 21:23

0 Answers0