- setConnectTimeout(5000ms) instead of 10ms (NimBLE-Arduino v2 uses ms)
- Fix NVS stored address: use ble_addr_t struct constructor to avoid
double byte-reversal, and correct type BLE_ADDR_PUBLIC
- Use onScanEnd callback to defer connect until scan fully terminated
- Separate foundAddr to avoid race between scan callback and loop
ESP32 server: include 4-byte device UUID prefix as manufacturer data
(company 0xFFFF) in BLE scan response, allowing pre-connection filtering.
Android: check manufacturer data in ScanCallback.onScanResult before
connecting. Skips devices with non-matching UUID prefix, preventing
wasted connections to wrong SylDa devices. Backward compatible with
old firmware (proceeds if no manufacturer data present).
- Client: change passive BLE scan to active scan (setActiveScan(true))
Server puts name/UUID in scan response; passive scan never
received them, so isAdvertisingService() and getName() failed.
- Server: add INPUT_PULLUP on touch pins to prevent floating
triggers when sensors disconnected
- Server: update BLE UUID characteristic in SET_ID handler
(pUuidChar->setValue) so reconnecting clients see correct UUID
- Server: touch logic changed from t1Active/t2Active to
!t1Active/!t2Active (door closed = relay ON)
- Android: flushReadBuffer before VERSION? to discard stale
boot log output; use Regex for BUILD_NR parsing
- copy_firmware.sh: copy to firmware/server/ and firmware/client/
subdirectories to match EspFlasher.assetPath()
- version.txt: server=20 client=5
- Replace name-based scan filter (getName() == 'SylDa_Server') with
isAdvertisingService(SERVICE_UUID) to prevent BLE name spoofing
- Post-connect UUID verification via UUID_CHAR_UUID was already in place
- Update log messages to reflect service-UUID-based scanning
- Add ID? command to firmware: server responds 'SylDa_Server', client 'SylDa_Client'
- Add tools/pio_upload_port.py POST-script that queries connected ESP32s
- Remove hardcoded upload_port from platformio.ini
- Script logic: 1 ESP32 → use directly, 2+ → ID? query, no match → prompt user
- Requires pyserial for serial queries (graceful fallback if missing)
- Replace remaining Serial.println("ERROR:...") with ESP_LOGE in client.cpp
- Add Serial.println("ERROR") for protocol response where needed
- Downgrade heartbeat from ESP_LOGI to ESP_LOGD (not needed in production)
- Convert all Serial.println/printf debug logging to ESP_LOGE/W/I/D
- Add TAG-based log identification (server/client)
- Lower CORE_DEBUG_LEVEL from 5 to 3 for production
- Keep Serial.printf for USB serial protocol commands (KEY?, VERSION?, etc.)
- MainActivity: remove isServer check — relay buttons always enabled when
connected, regardless of device mode (fixes silently broken buttons when
device mode accidentally set to 'client')
- client.cpp: invert HS-S43A touch sensor readings (!tActive) — sensors
are active LOW
- build.gradle: bump versionCode 2, versionName 1.1
- platformio.ini: use stable by-id port for server ESP32
- firmware/*.bin: rebuilt with LED signaling and touch fixes