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

[Echo]: Fix OnResponseTimeout is not fired when SendMessage fails #9096

Merged
merged 1 commit into from
Aug 18, 2021
Merged

[Echo]: Fix OnResponseTimeout is not fired when SendMessage fails #9096

merged 1 commit into from
Aug 18, 2021

Conversation

yufengwangca
Copy link
Contributor

@yufengwangca yufengwangca commented Aug 17, 2021

Problem

What is being fixed? Examples:

  • We found OnResponseTimeout was not triggered if SendMessage failed during test, this is regression from previous releases.
    This regression is caused by recent ExchangeContext API change, just setting send flag kExpectResponse is not enough,
    client also needs to explicitly set response timeout value (> 0) to enable response timeout handler.

  • Fixes OnResponseTimeout cannot be fired when SendMessage fails fo send. #9093

Change overview

Set response timeout value during echo SendMessage

Testing

How was this tested? (at least one bullet point required)

  • ./chip-echo-requester 192.168.86.171 and drop response message
  • ./chip-echo-responder and confirm OnResponseTimeout is triggered.
Send echo request message to Node: 12344321
[1629240235.226394][1957785:1957785] CHIP:IN: Secure message was encrypted: Msg ID 1
[1629240235.226399][1957785:1957785] CHIP:IN: Encrypted message 0x562346ec9b18 to 0x0000000000BC5C01 of type 1 and protocolId 1 on exchange 39017.
[1629240235.226406][1957785:1957785] CHIP:IN: Sending msg 0x562346ec9b18 to 0x0000000000BC5C01 at utc time: 1120292203 msec
[1629240235.226410][1957785:1957785] CHIP:IN: Sending secure msg on generic transport
[1629240235.226464][1957785:1957785] CHIP:IN: Secure msg send status ../../src/inet/IPEndPointBasis.cpp:915: Success
[1629240235.226717][1957785:1957785] CHIP:EM: Received message of type 0x10 with vendorId 0x0000 and protocolId 0x0000 on exchange 39017
[1629240235.226731][1957785:1957785] CHIP:EM: Rxd Ack; Removing MsgId:00000001 from Retrans Table
[1629240235.226735][1957785:1957785] CHIP:EM: Removed CHIP MsgId:00000001 from RetransTable
[1629240236.027884][1957785:1957785] CHIP:ECH: Time out! failed to receive echo response from Exchange: 0x562346ec9c20
No response received

@github-actions
Copy link

Size increase report for "esp32-example-build" from 6ef58ba

File Section File VM
chip-shell.elf .flash.text 16 16
chip-temperature-measurement-app.elf .flash.text 56 56
chip-bridge-app.elf .flash.text 48 48
chip-ipv6only-app.elf .flash.text -172 -172
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_line,0,52
.debug_info,0,41
.debug_str,0,24
.flash.text,16,16
.debug_loc,0,7
[Unmapped],0,-16

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize
.flash.text,56,56
[Unmapped],0,-56

Comparing ./master_artifact/chip-bridge-app.elf and ./pull_artifact/chip-bridge-app.elf:

sections,vmsize,filesize
.flash.text,48,48
[Unmapped],0,-48

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-ipv6only-app.elf and ./pull_artifact/chip-ipv6only-app.elf:

sections,vmsize,filesize
[Unmapped],0,172
.flash.text,-172,-172

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 6ef58ba

File Section File VM
chip-shell.elf text 16 16
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,49
.debug_str,0,24
.debug_loc,0,20
.debug_line,0,19
text,16,16

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize


@woody-apple woody-apple merged commit 98e5494 into project-chip:master Aug 18, 2021
@yufengwangca yufengwangca deleted the pr/echo/timeout branch August 18, 2021 20:14
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
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.

OnResponseTimeout cannot be fired when SendMessage fails fo send.
6 participants