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
a3142ea85b
Add user-defined button labels with color change on press
...
- PrefsHelper: PREF_LABEL1, PREF_LABEL2 constants
- SettingsActivity: EditText fields with Done-keyboard action to save labels
- MainActivity: buttons show user label, colorAccent on press, textAllCaps disabled
- activity_main.xml: textAllCaps=false for case-sensitive labels
2026-07-29 20:25:27 +02:00
eddy
348c55d830
feat: add device UUID pairing — unique identity per ESP-phone pair
...
- Firmware: auto-generate 16-byte UUID on first boot (NVS), new READ characteristic
- BLE name: AtomS3R-Relay → SylDa_Server
- KEY? now returns DEVICE_ID + HMAC_KEY, SET_ID command for UUID provisioning
- App: UUID+HMAC loaded from prefs, scan by service UUID, verify UUID after connect
- UUID mismatch → disconnect + skip address + rescan
- Key conflict dialog: keep ESP keys, overwrite ESP (with checkbox confirm), or cancel
- NO_KEY with existing app keys: send existing pair instead of generating new
- Added design spec doc
2026-07-29 18:12:13 +02:00
eddy
c977dc25a2
Voeg thema-selector toe (DayNight, Radiogroep, teal accent)
2026-07-27 00:22:43 +02:00
eddy
7c054a7021
Add scan retry button on timeout
2026-07-26 23:37:02 +02:00
eddy
05036a5060
Move user-facing strings to strings.xml
2026-07-26 23:21:25 +02:00
eddy
7f68e9ad70
Add BLE security: Just Works pairing + HMAC-SHA256 authentication
...
Two-layer security for the BLE relay:
1. BLE Just Works pairing (link-layer encryption)
- ESP32 requires bonding before accepting writes
- Characteristic permissions set to ESP_GATT_PERM_WRITE_ENCRYPTED
- IO capability NO_INPUT_NO_OUTPUT (no passkey needed)
- LE Secure Connections with bonding (ESP_LE_AUTH_REQ_SC_BOND)
2. HMAC-SHA256 authentication (application-level)
- 32-byte shared secret in src/hmac_key.h (generated, gitignored)
- Each command signed: HMAC-SHA256(key, command || sequence)
- 37-byte packet format: [cmd:1][seq:4][hmac:32]
- Sequence counter prevents replay (strictly increasing, starts at 1)
- mbedtls on ESP, javax.crypto.Mac on Android
Key management:
- tools/generate_hmac_key.py generates random key + writes src/hmac_key.h
- ESP prints hex key to serial 5 seconds after boot
- Android app: SettingsActivity with eye-toggle password field
- Key stored in SharedPreferences, supports multiple ESP modules
Other changes:
- Android app: bonding flow (createBond -> BOND_BONDED -> discover)
- Android app: MTU negotiation (request 256)
- Android app: settings button (gear icon) in main screen
- Fix: sequence counter starts at 1 to prevent first-packet rejection
- Updated README with full security documentation
2026-07-26 08:18:52 +02:00
eddy
7c9dde172a
Initial commit: BLE relay controller for Atom VoiceS3R
2026-07-26 01:17:31 +02:00