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

Added TXT record describing CRMP intervals to operational advertising. #5841

Merged

Conversation

kkasperczyk-no
Copy link
Contributor

Problem

CRMP allows setting some intervals, which assumes that data transmission does not take place in zero time and prevents
from unnecessary retransmissions. In particular sleepy end devices may need more time on answering and controller should be awareof that.

Summary of Changes

  • Modified configs for RMP intervals defining their default values, according to spec.
  • Added TXT record containing default CRMP intervals information to operational advertising message.
  • For Thread sleepy end devices added additional time extension by its sleeping period (in fact poll period).
  • Fixed bug with passing local variable to otSrpSetHostName method instead of static one.

Fixes #5832

@todo
Copy link

todo bot commented Apr 7, 2021

That value should be defined in the ReliableMessageProtocolConfig.h,

// TODO: That value should be defined in the ReliableMessageProtocolConfig.h,
// but for now it is not possible to access it from src/lib/mdns. It should be
// refactored after creating common DNS-SD layer.
constexpr uint32_t kMaxCRMPRetryInterval = 3600000;
TextEntry crmpRetryIntervalEntries[2];
size_t textEntrySize = 0;
char crmpRetryIntervalIdleBuf[8];
char crmpRetryIntervalActiveBuf[8];
uint32_t crmpRetryIntervalIdle, crmpRetryIntervalActive;
params.GetCRMPRetryIntervals(crmpRetryIntervalIdle, crmpRetryIntervalActive);


This comment was generated by todo based on a TODO comment in 4bdcfaa in #5841. cc @kkasperczyk-no.

@todo
Copy link

todo bot commented Apr 7, 2021

Issue #5833 - CRMP retry intervals should be updated on the poll period value

// TODO: Issue #5833 - CRMP retry intervals should be updated on the poll period value
// change or device type change.
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
if (chip::DeviceLayer::ConnectivityMgr().GetThreadDeviceType() ==
chip::DeviceLayer::ConnectivityManager::kThreadDeviceType_SleepyEndDevice)
{
uint32_t sedPollPeriod;
ReturnErrorOnFailure(chip::DeviceLayer::ThreadStackMgr().GetPollPeriod(sedPollPeriod));
// Increment default CRMP retry intervals by SED poll period to be on the safe side
// and avoid unnecessary retransmissions.
crmpRetryIntervalIdle += sedPollPeriod;


This comment was generated by todo based on a TODO comment in 4bdcfaa in #5841. cc @kkasperczyk-no.

@pullapprove pullapprove bot requested a review from vivien-apple April 7, 2021 13:40
@kkasperczyk-no kkasperczyk-no force-pushed the sed_idle_time_txt_record_pr branch from 4bdcfaa to 2d9852c Compare April 7, 2021 16:44
CRMP allows setting some intervals, which assumes that data
transmission does not take place in zero time and prevents
from unnecessary retransmissions. In particular sleepy end devices
may need more time on answering and controller should be aware
of that.

* Modified configs for RMP intervals defining their default
values, according to spec.
* Added TXT record containing default CRMP intervals information to
operational advertising message.
* For Thread sleepy end devices added additional time extension
by its sleeping period (in fact poll period).
* Fixed bug with passing local variable to otSrpSetHostName method
instead of static one.
@kkasperczyk-no kkasperczyk-no force-pushed the sed_idle_time_txt_record_pr branch from 2d9852c to 60a2557 Compare April 7, 2021 16:52
@github-actions
Copy link

github-actions bot commented Apr 7, 2021

Size increase report for "nrfconnect-example-build" from 1898cc4

File Section File VM
chip-lighting.elf text 276 276
chip-lighting.elf rodata 184 184
chip-lighting.elf device_handles 12 12
chip-lock.elf text 276 276
chip-lock.elf rodata 184 180
chip-lock.elf bss 0 19
chip-lock.elf device_handles 12 12
chip-lock.elf [LOAD #3 [RW]] 0 -19
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.debug_info,0,22325
.debug_line,0,1056
.debug_str,0,793
.debug_loc,0,591
.debug_abbrev,0,355
text,276,276
.strtab,0,251
.debug_ranges,0,248
rodata,184,184
.symtab,0,80
.debug_frame,0,32
device_handles,12,12
.debug_aranges,0,8
.shstrtab,0,1

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

sections,vmsize,filesize
.debug_info,0,763
.debug_str,0,314
.debug_loc,0,126
.debug_line,0,89
.debug_ranges,0,32
.debug_frame,0,28
.debug_aranges,0,8

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

sections,vmsize,filesize
.debug_info,0,22325
.debug_line,0,1056
.debug_str,0,793
.debug_loc,0,591
.debug_abbrev,0,355
text,276,276
.strtab,0,251
.debug_ranges,0,248
rodata,180,184
.symtab,0,80
.debug_frame,0,32
bss,19,0
device_handles,12,12
.debug_aranges,0,8
.shstrtab,0,1
[LOAD #3 [RW]],-19,0


@github-actions
Copy link

github-actions bot commented Apr 7, 2021

Size increase report for "esp32-example-build" from 1898cc4

File Section File VM
chip-all-clusters-app.elf .flash.text 12 12
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.debug_info,0,873
.debug_str,0,403
.debug_line,0,225
.debug_loc,0,43
.debug_ranges,0,24
.flash.text,12,12

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

sections,vmsize,filesize


jimlyall-q pushed a commit to jimlyall-q/connectedhomeip that referenced this pull request Apr 13, 2021
project-chip#5841)

CRMP allows setting some intervals, which assumes that data
transmission does not take place in zero time and prevents
from unnecessary retransmissions. In particular sleepy end devices
may need more time on answering and controller should be aware
of that.

* Modified configs for RMP intervals defining their default
values, according to spec.
* Added TXT record containing default CRMP intervals information to
operational advertising message.
* For Thread sleepy end devices added additional time extension
by its sleeping period (in fact poll period).
* Fixed bug with passing local variable to otSrpSetHostName method
instead of static one.
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.

Add TXT record describing CRMP intervals to operational advertising
4 participants