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.18k stars 1.9k forks source link

[BUG] Commissioning android tv-app fails: tv-app can't be discovered #33421

Open JelenaZdr opened 1 month ago

JelenaZdr commented 1 month ago

Reproduction steps

The platform app is initiated on the phone, while the chip tool is launched on the computer running Ubuntu 20. However, during commissioning (command: pairing code ), the chip tool fails to discovered the platform app. This issue persists even when utilizing a third-party controller.

Bug prevalence

Whenever i do this

GitHub hash of the SDK that was being used

bcebbc6124620d992ca4a8f7816cafbc42043cf7

Platform

android

Platform Version(s)

No response

Anything else?

bug_no_advertising_tv_app_android.txt

xvortep commented 1 month ago

@bzbarsky-apple @andy31415 @yunhanw-google @tennessee-google Hi, can you please take a look at this? This is a serious blocker for us. Thank you.

sharadb-amazon commented 1 month ago

Is operational discovery (service type: _matter._tcp) failing or something else? Can you attach logs from both the tv-app as well as the chip-tool?

Also, can you use any third-party discovery tool (like "Discovery" app for iOS/MacOS or "Service Browser" for Android to see if the above service type can be discovered using them? Or test using the dns-sd / avahi CLI commands?

JelenaZdr commented 1 month ago

Hello, atteched are the logs from both application.

Also, we tried using a thrid-parthy controller and had the same problem

logChipTool.txt logTV.txt

bzbarsky-apple commented 1 month ago

That last logTV.txt: I don't see it ever trying to advertise anything with CM=1.

Which means it does not have a commissioning window open, so of course commissioning it will not work.

xvortep commented 1 month ago

Do you know what could be a problem here? Do we have to manually open the commissioning window, or are there some errors that prevent the app to do that automatically? If there's a problem with DNS implementation used in this app, we could try changing it to "minimal". Do you think that's a good idea?

Thanks!

bzbarsky-apple commented 1 month ago

Do we have to manually open the commissioning window, or are there some errors that prevent the app to do that automatically?

It depends on the situation. Why do you expect the commissioning window to be open in this case?

xvortep commented 4 weeks ago

Do we have to manually open the commissioning window, or are there some errors that prevent the app to do that automatically?

It depends on the situation. Why do you expect the commissioning window to be open in this case?

Maybe I didn't understand your question, the device should be commissionable right away, right? So the commissioning window should be open on app start, like in the implementation of a linux tv-app.

bzbarsky-apple commented 4 weeks ago

Some devices are immediately commissionable on boot (if not already commissioned), some are not. There are various requirements around this in the spec, and the Matter SDK itself has no way to evaluate those requirements (e.g. some are around the intended use of the device).

What that means is that applications that want to be immediately commissionable on boot need to open a commissioning window somewhere in their code if not already commissioned.

For applications that use Server.cpp, this is handled automatically based on whether CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART is set. I have no idea whether this application uses Server.cpp and whether it sets that config parameter.