More tweaks

This commit is contained in:
Darrell Turner 2022-03-09 16:00:38 -05:00
parent dd862e8d53
commit 719ab07d17
2 changed files with 6 additions and 3 deletions

View File

@ -8,11 +8,14 @@ import time
esps = [ esps = [
#mDNS name of ESP #path to ".bin" file #mDNS name of ESP #path to ".bin" file
['192.168.128.114', 'macchina-a0'], ['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' esp_respond_sender_port = '3232'
sender_to_esp_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) p = subprocess.call(cmd, shell=True)
for esp in esps: for esp in esps:

View File

@ -412,7 +412,7 @@ bool reportDevice(BleFingerprint *f)
void scanForDevices(void *parameter) void scanForDevices(void *parameter)
{ {
connectToMqtt(); 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)) 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::setPower(ESP_PWR_LVL_P9, i);
NimBLEDevice::setSecurityAuth(false, false, false); NimBLEDevice::setSecurityAuth(false, false, false);
@ -423,7 +423,7 @@ void scanForDevices(void *parameter)
pBLEScan->setAdvertisedDeviceCallbacks(&fingerprints, true); pBLEScan->setAdvertisedDeviceCallbacks(&fingerprints, true);
if (activeScan) pBLEScan->setActiveScan(true); if (activeScan) pBLEScan->setActiveScan(true);
pBLEScan->setDuplicateFilter(false); pBLEScan->setDuplicateFilter(false);
pBLEScan->setMaxResults(0xFF); pBLEScan->setMaxResults(0);
// pBLEScan->setFilterPolicy(BLE_HCI_SCAN_FILT_NO_WL_INITA); // pBLEScan->setFilterPolicy(BLE_HCI_SCAN_FILT_NO_WL_INITA);
if (!pBLEScan->start(0, nullptr, false)) if (!pBLEScan->start(0, nullptr, false))
log_e("Error starting continuous ble scan"); log_e("Error starting continuous ble scan");