Hello
I would like to protect some Bluetooth characteristics in order to protect them from eavesdropping.
In fact, here is my problem: I would like to make an application (on a smartphone) which allows to quickly connect in Bluetooth to the devices with range in order to just retrieve the value of a characteristic which is in "SEC_OPEN" and then to disconnect . On the other hand, I would also like to have characteristics which will be in "SEC_JUST_WORKS" in order to protect the communication which is done on these characteristics (these are the commands which will have to be executed by the device).
Here are my questions:
- Is it possible to connect to a device without having to do pairing in order to read a characteristic in "SEC_OPEN"? (while the "LE Secure Connection" is activated on the smartphone and the target device). The objective being that it is invisible for the user and that he does not have the need to pair.
- Is it normal that I see the same message twice on my smartphone when I connect to my device asking me if I want to pair the device?
I am using the following configuration on my device:
// Security parameters to be used for all security procedures. sec_param.bond = false; sec_param.mitm = false; sec_param.lesc = 1; sec_param.keypress = 0; sec_param.io_caps = BLE_GAP_IO_CAPS_NONE; sec_param.oob = false; sec_param.min_key_size = 7; sec_param.max_key_size = 16; sec_param.kdist_own.enc = 0; sec_param.kdist_own.id = 0; sec_param.kdist_peer.enc = 0; sec_param.kdist_peer.id = 0;
Thank you