-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
tv-casting-app cancel connection upon CancelPasscode CDC message from TV #35331
tv-casting-app cancel connection upon CancelPasscode CDC message from TV #35331
Conversation
Review changes with SemanticDiff. |
PR #35331: Size comparison from 3d69583 to ecc5f9e Full report (77 builds for bl602, bl702, bl702l, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the connection attempt is canceled, are you able to navigate back to the discovery page and go through connection successfully, WITHOUT killing the Android and iOS mobile tv-casting-app? Can you add that details in the testing done section of the PR?
examples/tv-casting-app/tv-casting-common/core/CommissionerDeclarationHandler.cpp
Outdated
Show resolved
Hide resolved
examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp
Outdated
Show resolved
Hide resolved
examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp
Outdated
Show resolved
Hide resolved
examples/tv-casting-app/tv-casting-common/core/CommissionerDeclarationHandler.cpp
Outdated
Show resolved
Hide resolved
examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp
Outdated
Show resolved
Hide resolved
for (unsigned long i = 0; i < mNewEndpointsToLoad; i++) | ||
{ | ||
EndpointAttributes endpointAttributes = mEndpointAttributesList[i]; | ||
std::shared_ptr<Endpoint> endpoint = | ||
std::make_shared<Endpoint>(CastingPlayer::GetTargetCastingPlayer(), endpointAttributes); | ||
ChipLogProgress(AppServer, "EndpointListLoader::Complete() mEndpointServerLists[i].size: %lu ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format of size differs between 32-bit and 64-bit.
Updated the common tv-casting-app Linux implementation to cancel connection attempt upon receiving CancelPasscode CDC message from CastingPlayer/Commissioner TV. This change corresponds to the following examples/tv-app change by @lazarkov: #34507
Change summary
Testing
Verified and tested locally with the Linux, Android and iOS tv-casting-app example mobile apps, and the Linux tv-app (CastingPlayer). Able to build and commission with the example apps using both the commissionee and commissioner generated passcode flows. Cancelling the connection attempt on the TV-app using “controller ux cancel” sends a CommissionerDeclaration with CancelPasscode. The tv-casting-app reads the CommissionerDeclaration with CancelPasscode and cancels the ongoing connection without replying to the TV-app.
Linux Test steps:
./out/tv-app/chip-tv-app
./out/tv-casting-app/chip-tv-casting-app
app uninstall 65521 32769
cast request 0
orcast request 0 commissioner-generated-passcode
controller ux ok
controller ux cancel
cast request 0 commissioner-generated-passcode
controller ux ok
cast setcommissionerpasscode 12345678
iOS Test steps:
./out/tv-app/chip-tv-app
app uninstall 65521 32769
controller ux ok
controller ux cancel
"
[0;32m[1725386754.362] [66107:12625175] [SVR] CastingPlayer::StopConnecting() shouldSendIdentificationDeclarationMessage: 0, User Directed Commissioning aborted by the CastingPlayer/Commissioner user.�[0m
CastingPlayer::resetState()
"
controller ux ok
Android Test steps:
./out/tv-app/chip-tv-app
app uninstall 65521 32769
controller ux ok
controller ux cancel
"
2024-09-04 12:05:30.573 28756-28788 SVR com.chip.casting I CastingPlayer::StopConnecting() shouldSendIdentificationDeclarationMessage: 0, User Directed Commissioning aborted by the CastingPlayer/Commissioner user.
2024-09-04 12:05:30.573 28756-28788 SVR com.chip.casting E MatterCastingPlayer-JNI::verifyOrEstablishConnection() ConnectCallback() Connection error: examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp:263: CHIP Error 0x00000002: Connection aborted
"
controller ux ok