Skip to content

Commit

Permalink
Fix compilation error due to removal of NimBLESecurity class
Browse files Browse the repository at this point in the history
The fix is to replace the NimBLESecurity class instantiation and authentication method setting in BLEGamepad.cpp:1318-1320 with an equivalent call to
NimBLEDevice::setSecurityAuth(BLE_SM_PAIR_AUTHREQ_BOND);

Thanks @mhaebler
  • Loading branch information
lemmingDev authored Aug 19, 2022
1 parent df2096c commit 372fd73
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions BleGamepad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1315,9 +1315,7 @@ void BleGamepad::taskServer(void *pvParameter)
BleGamepadInstance->hid->pnp(0x01, vid, pid, 0x0110);
BleGamepadInstance->hid->hidInfo(0x00, 0x01);

NimBLESecurity *pSecurity = new NimBLESecurity();

pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND);
NimBLEDevice::setSecurityAuth(BLE_SM_PAIR_AUTHREQ_BOND);

uint8_t *customHidReportDescriptor = new uint8_t[hidReportDescriptorSize];
memcpy(customHidReportDescriptor, tempHidReportDescriptor, hidReportDescriptorSize);
Expand Down

0 comments on commit 372fd73

Please sign in to comment.