Skip to content
This repository was archived by the owner on May 2, 2025. It is now read-only.

Commit 7104a03

Browse files
Pierred/rel5 (#26)
* Release 1.1.0. Sync matterhorn with Matter SDK at commit d47c8f7a3ac84f2cc04e5411f064baeb9fe8c93f. REL5 for EAP partners. * Release 1.1.0. Sync matterhorn with Matter SDK at commit d47c8f7a3ac84f2cc04e5411f064baeb9fe8c93f. REL5 for EAP partners. * Release 1.1.0. Sync matterhorn with Matter SDK at commit d47c8f7a3ac84f2cc04e5411f064baeb9fe8c93f. REL5 for EAP partners. Fix issue #24.
1 parent 727f902 commit 7104a03

15 files changed

+48
-24
lines changed

app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ android {
1717
minSdk 27
1818
targetSdk 31
1919
versionCode 10
20-
versionName "1.0.3"
21-
20+
versionName "1.1.0"
2221
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2322
}
2423

app/src/main/java/com/google/homesampleapp/chip/BaseCompletionListener.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,12 @@ abstract class BaseCompletionListener : ChipDeviceController.CompletionListener
5959
override fun onOpCSRGenerationComplete(csr: ByteArray) {
6060
Timber.d("onOpCSRGenerationComplete(): csr [${csr}]")
6161
}
62+
63+
override fun onReadCommissioningInfo(vendorId: Int, productId: Int, wifiEndpointId: Int, threadEndpointId: Int) {
64+
Timber.d("onReadCommissioningInfo: vendorId [${vendorId}] productId [${productId}] wifiEndpointId [${wifiEndpointId}] threadEndpointId [${threadEndpointId}]")
65+
}
66+
67+
override fun onCommissioningStatusUpdate(nodeId: Long, stage: String?, errorCode: Int) {
68+
Timber.d("onCommissioningStatusUpdate nodeId [${nodeId}] stage [${stage}] errorCode [${errorCode}]")
69+
}
6270
}

app/src/main/java/com/google/homesampleapp/chip/ChipClient.kt

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ package com.google.homesampleapp.chip
1818

1919
import android.content.Context
2020
import chip.devicecontroller.ChipDeviceController
21+
import chip.devicecontroller.ControllerParams
2122
import chip.devicecontroller.GetConnectedDeviceCallbackJni.GetConnectedDeviceCallback
2223
import chip.devicecontroller.NetworkCredentials
2324
import chip.devicecontroller.PaseVerifierParams
2425
import chip.platform.AndroidBleManager
2526
import chip.platform.AndroidChipPlatform
26-
import chip.platform.ChipMdnsCallbackImpl
27-
import chip.platform.DiagnosticDataProviderImpl
28-
import chip.platform.NsdManagerServiceResolver
2927
import chip.platform.PreferencesConfigurationManager
3028
import chip.platform.PreferencesKeyValueStoreManager
29+
import chip.platform.NsdManagerServiceResolver
30+
import chip.platform.NsdManagerServiceBrowser
31+
import chip.platform.ChipMdnsCallbackImpl
32+
import chip.platform.DiagnosticDataProviderImpl
33+
3134
import com.google.homesampleapp.stripLinkLocalInIpAddress
3235
import dagger.hilt.android.qualifiers.ApplicationContext
3336
import javax.inject.Inject
@@ -41,6 +44,9 @@ import timber.log.Timber
4144
@Singleton
4245
class ChipClient @Inject constructor(@ApplicationContext context: Context) {
4346

47+
/* 0xFFF4 is a test vendor ID, replace with your assigned company ID */
48+
private val VENDOR_ID = 0xFFF4
49+
4450
// Lazily instantiate [ChipDeviceController] and hold a reference to it.
4551
private val chipDeviceController: ChipDeviceController by lazy {
4652
ChipDeviceController.loadJni()
@@ -49,9 +55,11 @@ class ChipClient @Inject constructor(@ApplicationContext context: Context) {
4955
PreferencesKeyValueStoreManager(context),
5056
PreferencesConfigurationManager(context),
5157
NsdManagerServiceResolver(context),
58+
NsdManagerServiceBrowser(context),
5259
ChipMdnsCallbackImpl(),
53-
DiagnosticDataProviderImpl(context))
54-
ChipDeviceController()
60+
DiagnosticDataProviderImpl(context)
61+
)
62+
ChipDeviceController(ControllerParams.newBuilder().setUdpListenPort(0).setControllerVendorId(VENDOR_ID).build())
5563
}
5664

5765
/**
@@ -110,6 +118,16 @@ class ChipClient @Inject constructor(@ApplicationContext context: Context) {
110118
super.onError(error)
111119
continuation.resumeWithException(error)
112120
}
121+
122+
override fun onReadCommissioningInfo(vendorId: Int, productId: Int, wifiEndpointId: Int, threadEndpointId: Int) {
123+
super.onReadCommissioningInfo(vendorId, productId, wifiEndpointId, threadEndpointId)
124+
continuation.resume(Unit)
125+
}
126+
127+
override fun onCommissioningStatusUpdate(nodeId: Long, stage: String?, errorCode: Int) {
128+
super.onCommissioningStatusUpdate(nodeId, stage, errorCode)
129+
continuation.resume(Unit)
130+
}
113131
})
114132

115133
// Temporary workaround to remove interface indexes from ipAddress
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:2e4de1a68b54737e0194a9050d3c418baaa66d1a958295190cc494a23c1c9372
3-
size 281830816
2+
oid sha256:c8647c37e39ee246f09822eb833c8c8bdb2b33d34b113039be52fde03a062b98
3+
size 328656712
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:acffded7ba797a653e4ae2179fd6fdde1b2fc14e5a2cce21af60273edd37efb9
3-
size 1522544
2+
oid sha256:11c3a6bb9b4f56138cb50572ff47ffe447e71e44e1fed55229700b1802f417ca
3+
size 2233008
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:4b5faea2d9610ff9554fe09c7f682eae0c0ce14393223b6fc20a3fe051cc1638
3-
size 269551628
2+
oid sha256:469d1118ba2c476ec349639cc6354c847b704cd8e7604bece83808d378526a88
3+
size 315046296
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:28e132c8d199d0c4a65d3e8c1b0f27b1776411a0c24b098448f1015f16c2b923
3-
size 1411224
2+
oid sha256:309a94f15e1047142ee4a8f2d94e0ead7428b749cd1405a47c652fdc2c455ecb
3+
size 2083560
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:4e64e7ee0eff076fa71ac22907cfda767df43f30dad3b7a36da6a8206791e43b
3-
size 271704340
2+
oid sha256:0920aeb876a7ddea3c37c50fe315765f5a1232767a74dccf846a6cc5d6e8066d
3+
size 316012528
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:c01959fcba57b4d5900df7427ff9474deaa9b6c692b45169ef3277a4d4c81fc3
3-
size 1452200
2+
oid sha256:8d4b8f06958cadea8f16154c47cce2e3c37385c7cc71ca73170febed1c938b20
3+
size 2124320
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:770bbf292c19ee7b57e60beb5c8ef8e0d2733e593040ca4444bbe3424cf82663
3-
size 276736552
2+
oid sha256:0b6c3a7f2b6d6df77ab688c1a3673067c5501fd97562736b2c2583f569dca6e0
3+
size 322527336
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:dc7f1b617b2dd27e9d63b2b5ba004e15af427ea1bfa3bd9311bb965b25fb1f71
3-
size 1473832
2+
oid sha256:39464ca402a95ab6db5d317039637e3ac0ea430ee874181415ede03d35dd371d
3+
size 2145568

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ buildscript {
77
dependencies {
88
classpath 'com.android.tools.build:gradle:7.1.2'
99
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
10-
classpath "com.google.dagger:hilt-android-gradle-plugin:2.38.1"
1110
classpath 'com.google.protobuf:protobuf-java:3.4.0'
1211
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.41'
1312
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.4.2")

0 commit comments

Comments
 (0)