Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firmware updates support #231

Merged
merged 120 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
4be6285
fw updates begin: only enable system pkt receiver until ver negotiate…
crc-32 Apr 16, 2023
a9b3aa4
updates to libraries + start cohorts
crc-32 Apr 21, 2023
22d5bdb
fw updates android initial impl
crc-32 Apr 22, 2023
da5f795
bump libpebblecommon
crc-32 Apr 22, 2023
b808865
update agp
crc-32 Apr 23, 2023
da7996f
fix cohorts, use stm32 crc format
crc-32 Apr 23, 2023
16285da
fix bt classic
crc-32 Apr 23, 2023
fa20244
make fw install work
crc-32 Apr 24, 2023
f793a04
val
crc-32 Apr 24, 2023
bbcbc1c
quieten logs a bit
crc-32 Apr 25, 2023
310db46
pop on success bool
crc-32 Apr 25, 2023
ec65297
handle more errors
crc-32 Apr 25, 2023
a2b76dd
fix padding, color for watch icon
crc-32 Apr 25, 2023
78568d5
fix navigation out on update prompt
crc-32 Apr 27, 2023
8ccd964
fix fab
crc-32 Apr 28, 2023
babe3ad
update fw-update additions to match new riverpod
crc-32 May 7, 2024
b166b54
add rpcresult stacktrace
crc-32 May 7, 2024
e868a12
update codegen
crc-32 May 7, 2024
6fc0498
update gradle
crc-32 May 7, 2024
fc618e6
add fvmrc, ignore fvm folder
crc-32 May 7, 2024
0c5ab2c
remove fvm_config (deprecated)
crc-32 May 7, 2024
4fbd6d6
re-add updated pubspec
crc-32 May 7, 2024
c0daacc
make changes on kotlin side to support updated pigeon
crc-32 May 7, 2024
dbafa58
add more navigator helper funcs
crc-32 May 16, 2024
b630f53
pop correct variables, add update from watches list
crc-32 May 16, 2024
8e13f21
refactor update_prompt.dart
crc-32 May 16, 2024
ff286ea
update for latest android target
crc-32 May 17, 2024
f8f3778
refactor bluetooth to its own module
crc-32 May 17, 2024
55ea09f
update deprecated overrides to new versions
crc-32 May 20, 2024
7855e1d
add permissions to bt lib
crc-32 May 20, 2024
c107c1f
add refactored Gatt management types
crc-32 May 20, 2024
0ced754
add le connector to LEDriver
crc-32 May 21, 2024
d5b0b29
beginnings of PPoGATT rewrite
crc-32 May 21, 2024
c197521
PPoGATT connection, session handlers
crc-32 May 21, 2024
281aaf5
update tests, use coroutines better-er
crc-32 May 22, 2024
ff49960
interface for GattServer
crc-32 May 22, 2024
c3d0f4e
use kotlinx test coroutines api
crc-32 May 22, 2024
985937d
add mocking, update coroutines+libpebblecommon
crc-32 May 24, 2024
c2e3223
PPoG testing init and link state timeout
crc-32 May 24, 2024
65aaf19
use StateFlow for PPoGLinkState
crc-32 May 24, 2024
b28ff65
testing catches bugs!
crc-32 May 24, 2024
5e00033
chunk only up to max size
crc-32 May 27, 2024
a1379e3
don't make sharedflow too generic too early
crc-32 May 27, 2024
5c2b91c
dispatcher injection
crc-32 May 27, 2024
e20f9fe
more logging of ble
crc-32 May 27, 2024
a1ad569
fix issues caught by tests
crc-32 May 27, 2024
b88cc23
full PPoG handshake test, packet assembling tests
crc-32 May 27, 2024
5a89bfb
change to use junit assert
crc-32 May 27, 2024
b639cfc
actually set the server
crc-32 May 27, 2024
699d22d
allow combined LE device (snowy)
crc-32 May 28, 2024
9377071
injectable context
crc-32 May 28, 2024
ec29de9
export receivers
crc-32 May 28, 2024
c275e02
minsdk = 23
crc-32 May 28, 2024
6b6d2eb
migrate webview impl to use updated library
crc-32 May 28, 2024
f763462
fix update prompt continue?
crc-32 May 29, 2024
73265b9
PPoG neatening, patches found while working on other things
crc-32 May 29, 2024
6777a59
listen for bond state better, hold connection if not ready
crc-32 May 30, 2024
983241e
attempts to get silk LE working
crc-32 May 30, 2024
bf57d18
Update CI to newer java version and to pass
hellcp May 31, 2024
298a982
Update java version in CI
hellcp May 31, 2024
a3d3150
Update CI to newer java version and to pass
hellcp May 31, 2024
dc939a4
move characteristic read into main server
crc-32 May 31, 2024
706e054
close gatt
crc-32 May 31, 2024
4b71616
switch to nordic ble, get silk talking
crc-32 Jun 1, 2024
dadeb69
remove old code, update tests
crc-32 Jun 1, 2024
2661bd5
update AGP
crc-32 Jun 1, 2024
95ddd2c
opt into unsigned types globally
crc-32 Jun 1, 2024
cda7e0a
change imports
crc-32 Jun 1, 2024
920e351
remove unneeded debugging
crc-32 Jun 1, 2024
d2388b4
timber logback
crc-32 Jun 3, 2024
7ae23c6
add context injection for gatt connection
crc-32 Jun 3, 2024
3f773e6
move where we indicate connection to after sendloop is up
crc-32 Jun 3, 2024
2ef7d46
add serialization to bt module
crc-32 Jun 3, 2024
20cbecb
redo chunker to chunk better
crc-32 Jun 3, 2024
e1f2df8
big complex '''tests''' for BLE throughput/race condition
crc-32 Jun 3, 2024
d3acc52
increase buffer size to much higher than we *should* need
crc-32 Jun 3, 2024
668d50c
log rewind ack
crc-32 Jun 3, 2024
32aeb7c
fix mtu sense check
crc-32 Jun 3, 2024
cdb1c6d
ignore echo events coming from characteristic notify
crc-32 Jun 3, 2024
1644958
enable big mtu
crc-32 Jun 3, 2024
c2ba848
use connectionscope
crc-32 Jun 3, 2024
588ae58
rxWindow can't be 0 even at the start really
crc-32 Jun 3, 2024
614cd6d
separate tx, rx actors, correct ppog/ble overhead value
crc-32 Jun 3, 2024
01ddbce
calls, ble improvements
crc-32 Jun 7, 2024
1d85b34
fix change during rebuild
crc-32 Jun 7, 2024
75371bf
don't explicitly run service
crc-32 Jun 7, 2024
55c17f9
log when bound
crc-32 Jun 7, 2024
2c36e78
add permission
crc-32 Jun 7, 2024
46fbde5
remove unneeded permission
crc-32 Jun 7, 2024
f446840
log service destroy
crc-32 Jun 7, 2024
145b8dc
fix p2 pair
crc-32 Jun 10, 2024
a6767d3
conditional pebblekit provider
crc-32 Jun 10, 2024
c2be935
companion device debug log
crc-32 Jun 10, 2024
e87bd6b
reinit device instead of dropping connection on quick reconnects
crc-32 Jun 10, 2024
9ab3501
Merge pull request #258 from pebble-dev/hellcp/rws-fw-update-ci
crc-32 Jun 10, 2024
fc97c07
fix tests
crc-32 Jun 10, 2024
bd2e612
use device_calendar repo ref for AGP 8 compat
crc-32 Jun 10, 2024
85c89a9
make pebblekit override disabled by default for testers
crc-32 Jun 10, 2024
e252389
override pebblekit authority instead of trying to disable
crc-32 Jun 10, 2024
ac4aecb
update artifacts workflow ver
crc-32 Jun 10, 2024
a52b27a
update AGP
crc-32 Jun 11, 2024
83e4fe7
restart bt on server tests
crc-32 Jun 11, 2024
75f386a
split restartBluetooth to its own file
crc-32 Jun 11, 2024
2741307
typo
crc-32 Jun 12, 2024
33d5ae5
update gatt server test
crc-32 Jun 12, 2024
4b6f552
stop logging throwable always showing
crc-32 Jun 12, 2024
eee9d18
logfile timestamp, add log dump metadata
crc-32 Jun 12, 2024
262db20
add watch details to log dump
crc-32 Jun 13, 2024
a51b396
handle not logged in when dumping logs
crc-32 Jun 13, 2024
af79a7b
use call receiver for calls, set device profile to watch to auto conf…
crc-32 Jun 13, 2024
8323fb8
calls handling fully working, reconnection changes
crc-32 Jun 14, 2024
9ed5988
Update AGP to 8.5.0
crc-32 Jun 14, 2024
a6fe3a6
limit companion device service to 33+
crc-32 Jun 14, 2024
2d5c7f8
kotlin codestyle
crc-32 Jun 14, 2024
1bb8716
reformat app module for new kotlin codestyle
crc-32 Jun 14, 2024
49233bc
reformat bluetooth module for new kotlin codestyle
crc-32 Jun 14, 2024
7161c88
reconnect logic cap timeout and try forever
crc-32 Jun 15, 2024
3122217
ReconnectionSocketServer to allow device to trigger reconnect
crc-32 Jun 15, 2024
e10cf9b
cleanup
crc-32 Jun 15, 2024
cf33274
Merge branch 'rws' into rws-fw-update
crc-32 Jun 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .fvm/fvm_config.json

This file was deleted.

4 changes: 4 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"flutter": "3.7.12",
"flavors": {}
}
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: dart-lang/[email protected]
- uses: actions/setup-java@v1
with:
java-version: '12.x'
java-version: '17'
- run: dart pub global activate fvm
- run: fvm install
- run: fvm flutter pub get
Expand All @@ -32,7 +32,7 @@ jobs:
- run: fvm flutter build apk --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: debug-apk
path: build/app/outputs/apk/debug/app-debug.apk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
java-version: '17'
- uses: dart-lang/[email protected]
- run: dart pub global activate fvm
- run: fvm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
java-version: '17'
- uses: dart-lang/[email protected]
- run: dart pub global activate fvm
- run: echo $KEY_JKS | base64 -d > android/key.jks
Expand All @@ -33,7 +33,7 @@ jobs:
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: release-apk
path: build/app/outputs/apk/release/app-release.apk
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ app.*.map.json

test/**/failures/

# Flutter sdk from Flutter Version Manager
/.fvm/flutter_sdk
# Flutter Version Manager
/.fvm
42 changes: 23 additions & 19 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ android {
if (System.getenv("ANDROID_NDK_HOME") != null) {
ndkPath "$System.env.ANDROID_NDK_HOME"
}
compileSdkVersion 33
compileSdk 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}

lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}

defaultConfig {
applicationId "io.rebble.cobble"
minSdkVersion 21
targetSdkVersion 30
minSdkVersion 29
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
android.defaultConfig.vectorDrawables.useSupportLibrary = true
manifestPlaceholders = [
//pebbleKitProviderAuthority: 'com.getpebble.android.provider.basalt' // This makes the app incompatible with the official Pebble app
pebbleKitProviderAuthority: 'io.rebble.cobble.provider'
]
}
signingConfigs {
release {
Expand All @@ -74,42 +74,45 @@ android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true
}
// For Kotlin projects
kotlinOptions {
jvmTarget = "1.8"
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-Xopt-in=kotlin.ExperimentalUnsignedTypes"
namespace 'io.rebble.cobble'
lint {
checkReleaseBuilds false
disable 'InvalidPackage'
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-opt-in=kotlin.ExperimentalUnsignedTypes"
freeCompilerArgs += "-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
}
}

flutter {
source '../..'
}

def libpebblecommon_version = '0.1.4'
def coroutinesVersion = "1.6.0"
def lifecycleVersion = "2.2.0"
def libpebblecommon_version = '0.1.17'
def coroutinesVersion = "1.7.3"
def lifecycleVersion = "2.8.0"
def timberVersion = "5.0.1"
def androidxCoreVersion = '1.3.2'
def androidxCoreVersion = '1.13.1'
def daggerVersion = '2.51.1'
def workManagerVersion = '2.4.0'
def workManagerVersion = '2.9.0'
def okioVersion = '3.9.0'
def serializationJsonVersion = '1.6.3'

def junitVersion = '4.13.2'
def androidxTestVersion = "1.4.0"
def androidxTestVersion = "1.5.0"

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationJsonVersion"
implementation "io.rebble.libpebblecommon:libpebblecommon-android:$libpebblecommon_version"
Expand All @@ -123,6 +126,7 @@ dependencies {
implementation "com.squareup.okio:okio:$okioVersion"

implementation "com.google.dagger:dagger:$daggerVersion"
implementation project(':pebble_bt_transport')
kapt "com.google.dagger:dagger-compiler:$daggerVersion"

testImplementation "junit:junit:$junitVersion"
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.rebble.cobble">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
Loading
Loading