| 343 | |
| 344 | |
| 345 | void spooferSetup(){ |
| 346 | |
| 347 | Serial.begin(115200); |
| 348 | Serial.println("Starting ESP32 BLE"); |
| 349 | |
| 350 | esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT, ESP_PWR_LVL_P9); //This should increase transmitting power to 9dBm |
| 351 | esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV, ESP_PWR_LVL_P9); //Not sure if this works with NimBLE |
| 352 | esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_SCAN ,ESP_PWR_LVL_P9); |
| 353 | |
| 354 | u8g2.begin(); |
| 355 | updateDisplay(); |
| 356 | |
| 357 | BLEDevice::init(""); |
| 358 | |
| 359 | BLEServer *pServer = BLEDevice::createServer(); |
| 360 | |
| 361 | pAdvertising = pServer->getAdvertising(); |
| 362 | BLEAdvertisementData oAdvertisementData = BLEAdvertisementData(); |
| 363 | |
| 364 | pinMode(deviceTypeNextPin, INPUT_PULLUP); |
| 365 | pinMode(deviceTypePrevPin, INPUT_PULLUP); |
| 366 | pinMode(advTypeNextPin, INPUT_PULLUP); |
| 367 | //pinMode(advTypePrevPin, INPUT_PULLUP); |
| 368 | pinMode(advControlPin, INPUT_PULLUP); |
| 369 | } |
| 370 | |
| 371 | void spooferLoop(){ |
| 372 |
nothing calls this directly
no test coverage detected