MCPcopy Create free account
hub / github.com/cifertech/nRFBox / spooferSetup

Function spooferSetup

VScode Platformio/src/spoofer.cpp:345–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343
344
345void 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
371void spooferLoop(){
372

Callers

nothing calls this directly

Calls 1

updateDisplayFunction · 0.70

Tested by

no test coverage detected