connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

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

Open JelenaZdr opened this issue 9 months ago • 3 comments

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

JelenaZdr avatar May 13 '24 12:05 JelenaZdr

@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.

xvortep avatar May 27 '24 10:05 xvortep

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?

sharadb-amazon avatar May 30 '24 22:05 sharadb-amazon

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

JelenaZdr avatar May 31 '24 10:05 JelenaZdr

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.

bzbarsky-apple avatar Jun 01 '24 02:06 bzbarsky-apple

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!

xvortep avatar Jun 03 '24 06:06 xvortep

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?

bzbarsky-apple avatar Jun 08 '24 05:06 bzbarsky-apple

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.

xvortep avatar Jun 10 '24 12:06 xvortep

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.

bzbarsky-apple avatar Jun 10 '24 19:06 bzbarsky-apple

In file examples/tv-app/tv-common/include/CHIPProjectAppConfig.h, CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART is set to 1. However, during commissioning (command: pairing code ), the chip tool fails to discovered the platform app. logTV.txt logChipTool.txt

JelenaZdr avatar Jul 24 '24 09:07 JelenaZdr

To be clear - we want to create an android tv device which can be commissioned like every other device, we don't want to use UDC. Linux app can be commissioned like that, but android app can't and we need a way to do so.

Thank you very much

xvortep avatar Jul 24 '24 12:07 xvortep