Commit graph Project_SylDa/android/app/build.gradle
Author SHA1 Message Date
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
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
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
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
c977dc25a2 Voeg thema-selector toe (DayNight, Radiogroep, teal accent) 2026-07-27 00:22:43 +02:00
eddy
bbf01946ac Convert Thread+Handler to lifecycle-aware coroutines, add GPL-3.0 license 2026-07-26 20:43:37 +02:00
eddy
b5d42d53ba Use EncryptedSharedPreferences for HMAC key storage
Replace plain-text SharedPreferences with AES256-GCM encrypted prefs
via androidx.security:security-crypto. Adds PrefsHelper utility to
centralize encrypted prefs access across MainActivity, SettingsActivity
and UsbKeyReceiver.

Reviewed in codereview.md (recommendation #2).
2026-07-26 16:09:10 +02:00
eddy
81abf2d824 Replace BLE encryption with HMAC-only auth, add buildnr, fix post-flash flow
BLE bonding/encryption removed — HMAC-SHA256 on application level provides
authentication + replay protection. Eliminates bonding state bugs, write
queue issues, and GATT_INSUFFICIENT_AUTHENTICATION complexity.

Firmware:
- Remove BLESecurity, setRespEncryptionKey, ESP_GATT_PERM_WRITE_ENCRYPTED
- Characteristic permission: ESP_GATT_PERM_WRITE (no encryption required)
- Characteristic property: PROPERTY_WRITE_NR (Write Without Response)
  Enables direct ON/OFF sequences without ACK wait time

Android:
- Remove bondReceiver, createBond, bonding state handling
- Remove write queue / pendingRelayState / writeInProgress
- Use WRITE_TYPE_NO_RESPONSE for minimal latency
- Post-flash dialog auto-dismisses on USB detach (currentAction = NONE)
- Separate progressDialog (flash progress) from dialog (post-flash info)
- Detach during active action now calls cleanupAction()

Build number:
- BuildConfig.BUILD_NUMBER in build.gradle as yyyyMMddHHmmss timestamp
- buildFeatures.buildConfig enabled
- Displayed in SettingsActivity bottom (12sp, secondary color)

Gradle:
- Wrapper upgraded 8.5 → 8.14
- minSdk 24 → 26 (Android 8+)

README updated to reflect HMAC-only security model.
2026-07-26 15:46:28 +02:00
eddy
0ff2c59b6d Add esp32-flash-lib dependency to build.gradle (was missing from git) 2026-07-26 14:21:45 +02:00
eddy
c707c21d7f Rewrite USB key reader: raw USB API + retry logic
- Replaced usb-serial-for-android library with raw Android USB API
  (UsbDeviceConnection.bulkTransfer) — the library's testConnection()
  sent a get_status CDC request that the ESP32-S3 USB-JTAG/serial
  controller does not support, causing read failures
- Added CDC control interface setup (line coding + DTR/RTS) to enable
  data flow before sending KEY? command
- Added retry logic: 5 attempts, 1s delay between retries, to handle
  other apps grabbing the USB device first (JTAG/serial debug unit
  triggers multiple system dialogs before our app gets permission)
- Re-lookup ESP device on each retry to handle device path changes
- Removed usb-serial-for-android dependency and JitPack repository
2026-07-26 09:02:41 +02:00
eddy
4518aec34e Add USB auto-read key transfer + UI redesign
USB auto-read:
- ESP responds to 'KEY?\n' over USB serial with 'HMAC_KEY:<hex>'
- Android UsbKeyReceiver (manifest BroadcastReceiver) catches USB_DEVICE_ATTACHED
- Filters on Espressif vendor 0x303a, requests USB permission
- Opens CDC-ACM serial (115200), sends KEY?, parses response, saves to SharedPreferences
- Works even when app not in foreground
- usb-serial-for-android v3.7.3 via JitPack

UI redesign:
- activity_main.xml: FrameLayout with settings icon top-right, relay button center, status bottom-left (14sp)
- Scan & Connect button moved to SettingsActivity
- SettingsActivity: hint text 'Voer de HMAC sleutel in of sluit de relaismodule aan op de telefoon'
- SettingsActivity: scan button saves key + returns RESULT_OK to trigger scanning
- MainActivity: removed scanButton, auto-scan on onResume when key is set
- Back button removed from settings (ActionBar up navigation only)

README updated with USB protocol docs, new UI description, and updated setup guide
2026-07-26 08:39:28 +02:00
eddy
7c9dde172a Initial commit: BLE relay controller for Atom VoiceS3R 2026-07-26 01:17:31 +02:00