TorstenRobitzki / bluetoe

C++ Framework to build Bluetooth LE Server (GATT)
MIT License
138 stars 29 forks source link

LL: does not exit the connection state on unexpected PDU during encryption start #115

Open TorstenRobitzki opened 1 year ago

TorstenRobitzki commented 1 year ago

According to the Spec:

If, at any time during the encryption start procedure after the Peripheral has received the LL_ENC_REQ PDU or the Central has received the LL_ENC_RSP PDU, the Link Layer of the Central or the Peripheral receives an unexpected Data Physical Channel PDU from the peer Link Layer, it shall immediately exit the Connection state, and shall transition to the Standby state. The Host shall be notified that the link has been disconnected with the error code Connection Terminated Due to MIC Failure (0x3D).
TorstenRobitzki commented 1 year ago

Link layer tests that will fail due to this issue: