project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.38k stars 1.98k forks source link

[Quest] Android how to check matter device support Thread? #34409

Open freemanspace opened 2 months ago

freemanspace commented 2 months ago

Test issue(s)

when i create NetworkCredentials can use network:NetworkCredentials? = NetworkCredentials.forWiFi(NetworkCredentials.WiFiCredentials(wifi.ssid, wifi.password)) or network:NetworkCredentials? = NetworkCredentials.forThread(NetworkCredentials.ThreadCredentials(thread.operationalDataset))

but how to check matter device is support thread Network?

please help thx

Platform

android

Anything else?

No response

joonhaengHeo commented 2 months ago

@freemanspace After receiving this callback method, You can check if device is supported Thread or not. (Wi-Fi). https://github.com/project-chip/connectedhomeip/blob/13fe13ae3b61a5b9adb3b1ab8248fa3db11dddf2/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java#L1815

Afterwards, you can update your Credentials using the method below. https://github.com/project-chip/connectedhomeip/blob/13fe13ae3b61a5b9adb3b1ab8248fa3db11dddf2/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java#L566

freemanspace commented 2 months ago

thx a lot ~~~