adafruit / adafruit/Adafruit_nRF52_Arduino
Bluefruit52Lib Library : BLE GamePad or Keyboard connexion bug
- Dominant language
- C
- Stars
- 699
- Forks
- 570
- PR merge metrics
- No merged PRs in 30d
Description
### Operating System
Windows 10
### IDE version
1.8.19
### Board
Feather NRF52840 express
### BSP version
0.21.0
### Sketch
Bluefruit52Lib\examples\Peripheral\blehid_gamepad
### What happened ?
The first time the peripheral is paired, it works. But when I power on/off the Feather NRF52840 again, it fails to keep connected.
It cycles between connected/disconnected (paired).
The Disconnect Reason is "CONN_TERMINATED_DUE_TO_MIC_FAILURE ", but I couldn't figure out what is happening.
You need to suppress the peripheral in windows and pair it again to make it connect permanently again.
Same result with BLE Keyboard or Mouse example. Tested on Windows 8.1 with 3 different BT Dongles (>5.0) and on 2 Windows 10 PCs with integrated Bluetooth.
### How to reproduce ?
1. Upload the blehid_gamepad or ble_keyboard or ble_mouse example on a Feather NRF52840 Express
2. Pair the device on the PC
3. Power Off/On or reset the Feather
4. The device will connect/disconnect forever
### Debug Log
[BLE ] BLE_GAP_EVT_CONNECTED : Conn Handle = 0
[GAP ] MAC = 04:7F:0E:29:53:A1, Type = 0, Resolved = 0
[GAP ] Conn Interval = 10.00 ms, Latency = 23, Supervisor Timeout = 2000 ms
[BLE ] BLE_GAP_EVT_SEC_INFO_REQUEST : Conn Handle = 0
[PAIR ] Address: ID = 0, Type = 0x00, A1:53:29:0E:7F:04
[BOND ] Loaded keys from file /adafruit/bond_prph/A153290E7F04
[BLE ] BLE_GAP_EVT_DISCONNECTED : Conn Handle = 0
[GAP ] Disconnect Reason: CONN_TERMINATED_DUE_TO_MIC_FAILURE
### Screenshots
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reconnect loop with Bluefruit52Lib/examples/Peripheral/blehid_gamepad, then compare it with the ble_keyboard and ble_mouse examples using the supplied Windows and Feather nRF52840 setup. Use the BLE debug log and the CONN_TERMINATED_DUE_TO_MIC_FAILURE reason to investigate; done means the paired device reconnects after a power cycle without removing and pairing it again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100