Commit graph Project_SylDa/android/app
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
6a07505d02 ci: add version consistency check and fully automate release pipeline
Some checks failed
CI / firmware (push) Successful in 1m13s
CI / android (push) Failing after 13s
- New tools/check_versions.sh: verifies version.txt, version.h, SylDaVersions.kt match
- release.yml: 'Verify version consistency' step after build, aborts release if mismatch
- ci.yml: same check after debug APK build
- scripts/release.sh: now runs full pipeline (pio run -> copy firmware -> gradle -> check)
  and refuses dirty working tree
- Untrack version.h, SylDaVersions.kt, release/ — always regenerated fresh from version.txt

Prevents the v1.1 bug where stale generated files caused version mismatch
and infinite re-flash loop.
2026-08-03 15:28:00 +02:00
eddy
07a2d22f76 fix: sync firmware version.h (16->17) and SylDaVersions.kt (18->17) with version.txt
Some checks failed
CI / firmware (push) Has been cancelled
CI / android (push) Has been cancelled
Release / build (push) Has been cancelled
Root cause: version.h and SylDaVersions.kt were stale, causing
app to expect BUILD_NR:18 while firmware reports BUILD_NR:16.
This triggered infinite re-flash loop on every 'Module bijwerken'.

Rebuilt firmware and APK so all versions agree on server=17/client=3.
Replace v1.1 release with corrected builds.
2026-08-03 15:19:12 +02:00
eddy
8b2dfcbfd0 Add app icon from icon.png (all densities)
All checks were successful
CI / firmware (push) Successful in 1m16s
CI / android (push) Successful in 5s
2026-08-02 21:37:05 +02:00
eddy
d0cf506fbe Release v1.1: server=17 client=3
Some checks failed
CI / firmware (push) Successful in 1m23s
CI / android (push) Successful in 5s
Release / build (push) Failing after 1s
2026-08-02 21:31:25 +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
516a938c7b fix: OTA wait for 0xFF confirm before reboot, version bump to 15, improved logging 2026-08-02 00:48:28 +02:00
eddy
f74a4a5420 fix: Android send 0xFF reboot confirmation after OTA COMPLETE (closes #1)
Some checks failed
CI / firmware (pull_request) Failing after 1m13s
CI / android (pull_request) Has been skipped
2026-08-01 23:14:29 +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
92c79ac93f feat: MainActivity device mode — disable relay controls for client mode 2026-08-01 00:38:32 +02:00
eddy
ccfd7cb693 feat: EspFlasher split assets server/client based on deviceMode 2026-08-01 00:38:19 +02:00
eddy
793c8f190c feat: Android — device/transport radio buttons, PrefsHelper keys 2026-08-01 00:37:52 +02:00
eddy
820d09ab63 chore: rebuild release with fixed firmware, gitignore release/ 2026-07-30 23:41:24 +02:00
eddy
84503f3a24 fix: revert SDK 36 bump, fix NimBLE setMTU crash, add --no-stub for OPI flash 2026-07-30 23:38:32 +02:00
eddy
799c4dfae8 chore: bump compileSdk/targetSdk to 36, fix layout fitsSystemWindows 2026-07-30 22:17:00 +02:00
eddy
9d2d3e6e91 feat: add release signing config via signing.properties 2026-07-30 19:50:57 +02:00
eddy
20bb151d09 Make settings gear icon clickable in MainActivity 2026-07-30 19:27:42 +02:00
eddy
97a1eff6fa chore: update bundled firmware.bin with SHA256 verification 2026-07-30 19:17:20 +02:00
eddy
69c4ee040d chore: remove unused otaStatusText widget 2026-07-30 19:16:56 +02:00
eddy
44297d30ad fix: check writeCharacteristic return value in sendOtaData 2026-07-30 19:16:28 +02:00
eddy
fcbf1e9b5f feat: ESP MTU 512 + dynamic Android chunk size based on negotiated MTU 2026-07-30 19:15:55 +02:00
eddy
475c029512 feat: OTA notification handling with ACK/NAK retry logic 2026-07-30 19:14:23 +02:00
eddy
0513e7777d fix: USB/OTA update flow - version check, chunk size, UX improvements
- MainActivity: suppress toast when activity not resumed, auto-navigate to
  Settings on new firmware
- SettingsActivity: unified BLE/USB radio buttons + single update button,
  version check before OTA, show dialog before loadFirmware, spinner timeout
- BleRelayManager: expose getEspVersion()
- OtaManager: reduce chunk size 500→248 to fit BLE MTU 255
- ESP: WRITE→WRITE_NR on OTA characteristic (was silently dropping data)
- Layout/strings: remove intro text, add method radio buttons
- Bump all firmware versions to v5
2026-07-30 18:59:08 +02:00
eddy
e05d57a32c fix: detecteer ontbrekende OTA characteristic en toon USB-flash melding 2026-07-30 17:37:05 +02:00
eddy
7e45cb4c56 feat: toon 'Firmware is up-to-date' toast bij gelijke versies 2026-07-30 17:29:09 +02:00
eddy
57ef68fcab fix: toast tekst ingekort, settings balk volledig klikbaar, version-check fallback voor oude ESP firmware 2026-07-30 17:25:57 +02:00
eddy
1499d840ce fix: handle missing VERSION characteristic gracefully on old ESP firmware 2026-07-30 17:20:38 +02:00
eddy
7607361019 feat: add OTA UI strings 2026-07-30 17:14:29 +02:00
eddy
1988ae3898 feat: add BLE OTA update button to SettingsActivity 2026-07-30 17:14:28 +02:00
eddy
675504cbf5 feat: add OtaManager for BLE firmware update 2026-07-30 17:14:27 +02:00
eddy
2ab1c83655 feat: show toast when firmware update available via BLE 2026-07-30 17:14:26 +02:00
eddy
5235057b83 feat: add version read, OTA characteristic, BLE MTU 512 in BleRelayManager 2026-07-30 17:14:25 +02:00
eddy
6042eceeea feat: add onFirmwareVersion callback to BleCallbacks 2026-07-30 17:14:24 +02:00
eddy
3e880c9635 feat: bump firmware to v2, update bundled firmware asset 2026-07-30 17:09:09 +02:00
eddy
0833327cea fix: code review fixes — SharedPreferences docs, Log.e, dead notify code 2026-07-29 23:51:16 +02:00
eddy
df5154732c Remove intro text from settings, fix button text color in dark mode
- Removed 'Sluit de ESP aan op USB en kies een actie.' from settings screen
- Button text now black on light gray background (readable in dark mode)
2026-07-29 23:16:53 +02:00
eddy
4c022b8259 Rename package com.eddy.atomrelay -> nl.eddydevink.sylda, Dutch translations, UI cleanup
- Package renamed to nl.eddydevink.sylda (matches eddydevink.nl domain + Sylda app name)
- All status texts translated to Dutch (Niet verbonden, Verbonden, Zoeken, etc.)
- Removed exchange key button, build number, and success toasts
- Button text: Firmware bijwerken, instruction text shortened
- App title changed to Sylda, 'instellingen' label next to settings gear
- ON/HOLD changed to AAN/VAST
2026-07-29 23:09:43 +02:00
eddy
d6d6f6674a Combined flash + key exchange flow with version check and USB permission persistence
- Firmware: add VERSION? command returning BUILD_NR for version check
- Android: flash button checks firmware version first, skips flash if current
- After flash: auto key exchange via reboot detection (expectingReboot flag)
- device_filter.xml + intent-filter: USB permission 'always allow' checkbox
- singleTop + onNewIntent prevents unwanted SettingsActivity launch on USB connect
- platformio.ini: upload_port updated to /dev/ttyACM1
2026-07-29 22:56:40 +02:00
eddy
96162a16be Fix BLE scan: add neverForLocation to BLUETOOTH_SCAN (results suppressed without it on API 31+) 2026-07-29 22:26:43 +02:00
eddy
3ce2610bc8 Fix hasPermissions: remove ACCESS_FINE_LOCATION from API>=S check (maxSdkVersion=30 excludes it) 2026-07-29 22:10:15 +02:00
eddy
a025e66b61 Simplify permission flow: standard ActivityCompat pattern with one-shot guard 2026-07-29 22:04:46 +02:00
eddy
ecdd693ffa Reset permissionsRequested flag after deny and on return from settings 2026-07-29 22:01:07 +02:00
eddy
ac2767c2b6 Fix permission dialog flash loop in onResume 2026-07-29 21:58:44 +02:00
eddy
d005fef3f6 Remove manual download-mode instructions, library auto-resets ESP 2026-07-29 21:55:06 +02:00
eddy
106bd25e41 Replace magic numbers with named constants, move remaining hardcoded strings to strings.xml 2026-07-29 20:56:00 +02:00
eddy
c46db32cc7 Move all user-facing strings to strings.xml, add user-facing-text.md reference 2026-07-29 20:48:20 +02:00
eddy
5fb67fdcf0 Button color: gray default, green pressed via setBackgroundColor 2026-07-29 20:42:03 +02:00
eddy
5a1f1da329 Button color: GradientDrawable swap (teal/green), no tint magic 2026-07-29 20:34:58 +02:00
eddy
817f9a0602 Fix button background restore: save/restore original Drawable instead of tint list null -> gray -> teal → grijs blijft grijs na loslaten 2026-07-29 20:29:30 +02:00