adafruit / Adafruit_nRF52_Arduino

Adafruit code for the Nordic nRF52 BLE SoC on Arduino
Other
601 stars 489 forks source link

Bluefruit52Lib Library : BLE GamePad or Keyboard connexion bug #752

Open EtienneGameSeed opened 1 year ago

EtienneGameSeed commented 1 year ago

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