Commit graph Project_SylDa/src/client.cpp
Author SHA1 Message Date
eddy
2eccced6fb Remove debug logging from scan callback
Some checks failed
CI / firmware (push) Failing after 1m45s
CI / android (push) Has been skipped
Release / build (push) Failing after 1m23s
2026-08-03 16:39:36 +02:00
eddy
cd2d949f87 Fix BLE scan + touch logic + UUID + version read
Some checks failed
CI / android (push) Has been cancelled
CI / firmware (push) Has been cancelled
- 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
2026-08-03 16:38:26 +02:00
eddy
7bdd50b16e Scan on service UUID instead of device name (issue #10)
All checks were successful
CI / firmware (pull_request) Successful in 1m16s
CI / android (pull_request) Successful in 5s
- 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
2026-08-02 21:27:19 +02:00
eddy
bf6619aa54 Auto-detect upload port via ID? serial query (issue #11)
All checks were successful
CI / firmware (pull_request) Successful in 1m22s
CI / android (pull_request) Successful in 7s
- 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)
2026-08-02 21:18:26 +02:00
eddy
4aa2a750d9 Review fixes: Serial ERROR→ESP_LOGE, heartbeat→ESP_LOGD
All checks were successful
CI / firmware (pull_request) Successful in 1m26s
CI / android (pull_request) Successful in 5s
- 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)
2026-08-02 20:56:37 +02:00
eddy
32489fbabb Replace Serial.* logging with ESP_LOG* macros (issue #8)
All checks were successful
CI / firmware (pull_request) Successful in 1m21s
CI / android (pull_request) Successful in 7s
- 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.)
2026-08-02 20:51:21 +02:00
eddy
95f440eec8 fix: relay buttons always enabled, touch sensor inversion, version bump
All checks were successful
CI / firmware (pull_request) Successful in 1m19s
CI / android (pull_request) Successful in 9s
- 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
2026-08-02 20:12:07 +02:00
eddy
ebaaa8cc4b feat(client): uniform LED signaling — off after 60s stable connection 2026-08-02 18:20:55 +02:00
eddy
109088cf52 Merge branch 'fix/issue-5-hs-s43a-s3r-cleanup' 2026-08-02 00:53:03 +02:00
eddy
516a938c7b fix: OTA wait for 0xFF confirm before reboot, version bump to 15, improved logging 2026-08-02 00:48:28 +02:00
eddy
5bb87ed4a4 fix: remove pullups, invert touch logic for HS-S43A sensors 2026-08-01 22:54:31 +02:00
eddy
a84727abdc fix: relay pins G1/G2, OTA CCCD+retry, single version source
Some checks failed
CI / firmware (push) Failing after 57s
CI / android (push) Has been skipped
- Relay pins: G39→G1, G38→G2
- BUNDLED_FIRMWARE_VERSION → SylDaVersions.SERVER (version.txt)
- OTA: explicit CCCD descriptor write for Android 13+
- OTA: start packet retry (previously no retry, blocked by pending CCCD)
- OTA: firmware path device-mode-aware (server/client subdirs)
- Removed stale root firmware.bin, flashMethodGroup, dialog_overwrite_confirm
- PrefsHelper: serverUUID/clientUUID persistence
2026-08-01 03:11:43 +02:00
eddy
bce5fc4107 fix: client — spec compliance, memory leak, LED order 2026-08-01 00:35:15 +02:00
eddy
97c79b9f4c feat: client firmware — touch/button, BLE scan, HMAC, server UUID verify, USB CDC provisioning 2026-08-01 00:32:23 +02:00