don't let non bonded devices connect to our services

pull/1/head
geeksville 2020-02-08 07:38:29 -08:00
rodzic bf72326d20
commit ef315b2b39
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -206,7 +206,9 @@ BLEServer *initBLE(std::string deviceName, std::string hwVendor, std::string swV
pUpdate->start();
// Start advertising
pServer->getAdvertising()->start();
BLEAdvertising *advert = pServer->getAdvertising();
advert->setScanFilter(false, true); // We let anyone scan for us (FIXME, perhaps only allow that until we are paired with a phone and configured) but only let whitelist phones connect
advert->start();
BLESecurity *pSecurity = new BLESecurity();
pSecurity->setCapability(ESP_IO_CAP_OUT);