Skip to content
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

[TE1]: Provide test interface in chip-shell to test CRMP. #5228

Merged
merged 3 commits into from
Mar 11, 2021
Merged

[TE1]: Provide test interface in chip-shell to test CRMP. #5228

merged 3 commits into from
Mar 11, 2021

Conversation

yufengwangca
Copy link
Contributor

@yufengwangca yufengwangca commented Mar 8, 2021

Problem

This is requested by up-coming TE 1, after discussing with TSG, we decided use chip-shell/chip-echo-responder as the first setup to test CRMP protocol. But chip-shell does not have command to test CRMP right now.

Summary of Changes

Add ping command to chip-shell for secure channel tests

Usage:
yufengw@yufengw-intel:~/Workarea/connectedhomeip/out/debug$ ./chip-shell
Init CHIP Stack
Init Thread stack
CHIP:IN: TransportMgr initialized
CHIP:IN: TransportMgr initialized

ping -h
Usage: ping [options]

Options:
-h print help information
-u use UDP (default)
-t use TCP
-i ping interval time in seconds
-c stop after replies
-r <1|0> enalbe/disable CRMP
Done

Fixes #5120

@todo
Copy link

todo bot commented Mar 8, 2021

temprary create a SecureSessionHandle from node id to unblock end-to-end test. Complete solution is tracked in PR:4451

// TODO: temprary create a SecureSessionHandle from node id to unblock end-to-end test. Complete solution is tracked in PR:4451
err = gEchoClient.Init(&gExchangeManager, { kTestDeviceNodeId, 0, gAdminId });
SuccessOrExit(err);
// Arrange to get a callback whenever an Echo Response is received.
gEchoClient.SetEchoResponseReceived(HandleEchoResponseReceived);
// Connection has been established. Now send the EchoRequests.
for (unsigned int i = 0; i < gMaxEchoCount; i++)
{
err = SendEchoRequest(stream);


This comment was generated by todo based on a TODO comment in f006d05 in #5228. cc @yufengwangca.

@yufengwangca yufengwangca requested a review from cjandhyala March 8, 2021 19:26
@yufengwangca yufengwangca changed the title [TE1]: Provide test interface to test CRMP using chip-shell. [TE1]: Provide test interface in chip-shell to test CRMP. Mar 9, 2021
@andy31415
Copy link
Contributor

Do we have a separation of what each utility is intended to do?

We have: chip-tool, mobile apps (iOS and Android), chip-shell and python (chip-device-ctrl and chip-repl).

My understanding is that python is intended to superseed the C++ chip-tool (so that it is scriptable). What is the intent with chip-shell? Can we standardise on python instead?

examples/shell/shell_common/cmd_ping.cpp Outdated Show resolved Hide resolved
examples/shell/shell_common/cmd_ping.cpp Outdated Show resolved Hide resolved
examples/shell/shell_common/cmd_ping.cpp Outdated Show resolved Hide resolved
examples/shell/shell_common/cmd_ping.cpp Outdated Show resolved Hide resolved
examples/shell/shell_common/cmd_ping.cpp Outdated Show resolved Hide resolved
@yufengwangca
Copy link
Contributor Author

Do we have a separation of what each utility is intended to do?

We have: chip-tool, mobile apps (iOS and Android), chip-shell and python (chip-device-ctrl and chip-repl).

My understanding is that python is intended to superseed the C++ chip-tool (so that it is scriptable). What is the intent with chip-shell? Can we standardise on python instead?

I have a lot of discussion with TSG regarding the test setup for TE1.

On the client side, we have chip-tool, chip-shell, python-controller, chip-tool is designed only for testing cluster commands, we need to adjust its architecture a lot for CRMP test, and we also have decided to phase it out with python controller, so this tool is not an option.

python-controller is our target, but this tools is not stable right now and it is also not integrated with messaging layer because of #4451. So TSG decided to use python-controller in TE2 after we solve all the remaining issues.

On the server side, we decided to use lighting-app as the accessory for CRMP test. #5236. TSG could use chip-echo-responder temporarily before lighting-app echo support is ready.

@pullapprove pullapprove bot requested review from Damian-Nordic and LuDuda March 10, 2021 20:29
@msandstedt msandstedt merged commit d8a2d1f into project-chip:master Mar 11, 2021
@yufengwangca yufengwangca deleted the pr/linux/shell branch March 11, 2021 16:23
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this pull request Mar 11, 2021
project-chip#5228 is using
errno but not including the header.
mspang pushed a commit that referenced this pull request Mar 11, 2021
#5228 is using
errno but not including the header.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide test interface to test CRMP using chip-shell
4 participants