Hi all,
we have a project - receiver and keyfob based on CC2541 controller and BLE stack v. 1.3.1. Keyfob uses SimpleBleCentral application as a framework while receiver uses SimpleBlePeripheral application. Keyfob implements GAP Central profile and receiver implements GAP Peripheral profile.
Keyfob is used to send commands to the receiver (writes characteristic value) and receives status (characteristic notifications ) from the receiver. Keyfob and receiver are bonded; keyfob uses white list when scanning for advertising receiver.
We do a simple test that fails most of the times:
- Receiver is advertising and keyfob is successfully connected to it by pressing the button.
- We increase the distance between the keyfob and the receiver and we are still able to send commands to the receiver and also receive notifications from the receiver without any problems.
- After supervision time runs out, receiver is put back to advertising mode. We initiate the connection once again by pressing the key fob button. Most of the times we get disconnection event few seconds later on the keyfob side with error codes 0x3D (CONNECTION TERMINATED DUE TO MIC FAILURE) and sometimes 0x3E (CONNECTION FAILED TO BE ESTABLISHED). In rare cases, connection is successfully established.
- If we put the key fob closer to the receiver, there are no problems with connection initiation. Let me stress once again that operation is just OK at greater distances when key fob and receiver are already connected!
What are the reasons that cause those HCI errors? I've searched the forum but didn't find anything about 0x3D HCI error code. How could we avoid those errors when initiating the connection?
Best,
Primoz