diff --git a/espotabatch.py b/espotabatch.py index 7e47035..8d72b14 100755 --- a/espotabatch.py +++ b/espotabatch.py @@ -8,11 +8,14 @@ import time esps = [ #mDNS name of ESP #path to ".bin" file ['192.168.128.114', 'macchina-a0'], + ['192.168.128.124', 'm5stickc'], + ['192.168.128.64', 'm5atom-matrix'], + ['192.168.128.84', 'm5atom-matrix'] ] esp_respond_sender_port = '3232' sender_to_esp_port = '3232' -cmd = 'pio run -e m5atom-matrix -e macchina-a0' +cmd = 'pio run -e m5atom-matrix -e macchina-a0 -e m5stickc' p = subprocess.call(cmd, shell=True) for esp in esps: diff --git a/src/main.cpp b/src/main.cpp index 01e9a11..e443d8d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -412,7 +412,7 @@ bool reportDevice(BleFingerprint *f) void scanForDevices(void *parameter) { connectToMqtt(); - BLEDevice::init(Stdprintf("ESPresense-%06" PRIx64, ESP.getEfuseMac() >> 24)); + BLEDevice::init(""); for (esp_ble_power_type_t i = ESP_BLE_PWR_TYPE_CONN_HDL0; i <= ESP_BLE_PWR_TYPE_CONN_HDL8; i = esp_ble_power_type_t((int)i + 1)) NimBLEDevice::setPower(ESP_PWR_LVL_P9, i); NimBLEDevice::setSecurityAuth(false, false, false); @@ -423,7 +423,7 @@ void scanForDevices(void *parameter) pBLEScan->setAdvertisedDeviceCallbacks(&fingerprints, true); if (activeScan) pBLEScan->setActiveScan(true); pBLEScan->setDuplicateFilter(false); - pBLEScan->setMaxResults(0xFF); + pBLEScan->setMaxResults(0); // pBLEScan->setFilterPolicy(BLE_HCI_SCAN_FILT_NO_WL_INITA); if (!pBLEScan->start(0, nullptr, false)) log_e("Error starting continuous ble scan");