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.
45 lines
No EOL
1.1 KiB
Groovy
45 lines
No EOL
1.1 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
}
|
|
|
|
android {
|
|
namespace 'com.eddy.atomrelay'
|
|
compileSdk 34
|
|
|
|
defaultConfig {
|
|
applicationId "com.eddy.atomrelay"
|
|
minSdk 26
|
|
targetSdk 34
|
|
versionCode 1
|
|
versionName "1.0"
|
|
buildConfigField "String", "BUILD_NUMBER", "\"${new java.text.SimpleDateFormat("yyyyMMddHHmmss").format(new Date())}\""
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig true
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'androidx.core:core-ktx:1.12.0'
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
implementation 'io.github.dkaukov:esp32-flash-lib:1.1.17'
|
|
implementation 'com.eclipsesource.minimal-json:minimal-json:0.9.5'
|
|
implementation 'org.slf4j:slf4j-nop:2.0.16'
|
|
} |