Reconnect with bluetooth mgmt linux API

104 views Asked by At

i am currently working on a bluetooth project on linux. I use the mgmt socket to manage the connection as well as the l2cap socket to manage the gatt layer. the situation is as follows: I advertise with x data and y parameters (therefore I am in peripheral mode) while waiting for the central to find me. after the connection is established with the central, I save the LTK, SRK and LK keys to resume the connection in case of disconnection. My problem is with reconnect steps. I load the keys first, then I run the add device command with the following parameters: the address and the type of the central, option 0x01 (allow incoming connection). then I launch advertising with the same data and parameters during the first connection). the problem is that a new connection is created with new keys. my question is how i resume the connection with the central if there are steps to follow at the mgmt level.

0

There are 0 answers