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

samples: dect_phy: dect_shell: mac: rach_tx: interval support #18915

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jhirsi
Copy link
Contributor

@jhirsi jhirsi commented Nov 15, 2024

Added a an option to send data in intervals: --interval
Additionally, in addition to given data, to include also modem temperature to data in json format: --get_mdm_temp

@jhirsi jhirsi requested a review from a team as a code owner November 15, 2024 12:50
@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Nov 15, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 15, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 3

Inputs:

Sources:

sdk-nrf: PR head: 8069297418cd7e9676866dc743ecee1b82bd7e9f

more details

sdk-nrf:

PR head: 8069297418cd7e9676866dc743ecee1b82bd7e9f
merge base: 0d227d82bbdf56a3c066021fa6c323a00107fe6f
target head (main): 0d227d82bbdf56a3c066021fa6c323a00107fe6f
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (10)
samples
│  ├── dect
│  │  ├── dect_phy
│  │  │  ├── dect_shell
│  │  │  │  ├── README.rst
│  │  │  │  ├── src
│  │  │  │  │  ├── dect
│  │  │  │  │  │  ├── dect_phy_ctrl.c
│  │  │  │  │  │  ├── dect_phy_ctrl.h
│  │  │  │  │  │  ├── dect_phy_shell.h
│  │  │  │  │  │  ├── mac
│  │  │  │  │  │  │  ├── dect_phy_mac_client.c
│  │  │  │  │  │  │  ├── dect_phy_mac_client.h
│  │  │  │  │  │  │  ├── dect_phy_mac_common.h
│  │  │  │  │  │  │  ├── dect_phy_mac_ctrl.c
│  │  │  │  │  │  │  ├── dect_phy_mac_ctrl.h
│  │  │  │  │  │  │  │ dect_phy_mac_shell.c

Outputs:

Toolchain

Version: f51bdba1d9
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:f51bdba1d9_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 50
  • ✅ Integration tests
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi

Note: This message is automatically posted and updated by the CI

@peknis
Copy link
Contributor

peknis commented Nov 15, 2024

Is this change remarkable enough to deserve a changelog entry?

Added a an option to send data in intervals: --interval <secs>
Additionally, in addition to given data, to include also
modem temperature to data in json format: --get_mdm_temp

Signed-off-by: Jani Hirsimäki <[email protected]>
@jhirsi
Copy link
Contributor Author

jhirsi commented Nov 15, 2024

Is this change remarkable enough to deserve a changelog entry?

@peknis , I think that existing comment in release notes covers this as well. This is an update to recently added dect mac command.

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

sprintf(tmp_str, "{\"data\":\"%s\",\"m_tmp\":\"%d\"",
cmd_params.tx_data_str, mdm_temperature);
}
strcat(tmp_str, "}");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there are reason why this is in a separate strcat() instead of the sprintf() calls above?

"Options:\n"
" -d, --data <data_str>, Data to be sent.\n"
" -p, --tx_pwr <integer>, TX power (dBm) (default 0 dBm)\n"
" -m, --tx_mcs <integer>, TX MCS (integer). Default: 0.\n"
" -t, --long_rd_id <id>, Target long rd id (default: 38).\n"
" -i, --interval <interval_secs>, Data sending interval in seconds.\n"
" Default: 0, no interval, i.e. one timer.\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
" Default: 0, no interval, i.e. one timer.\n"
" Default: 0, data sent only once.\n"

Comment on lines +442 to +443
" -j, --get_mdm_temp, Get modem temperature to be included also in\n"
" a payload. json will be encoded.\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
" -j, --get_mdm_temp, Get modem temperature to be included also in\n"
" a payload. json will be encoded.\n"
" -j, --get_mdm_temp, Include modem temperature in the payload. The payload\n"
" is encoded in JSON.\n"

case 'i': {
params.interval_secs = atoi(optarg);
if (params.interval_secs < 0) {
desh_error("Give decent interval (> 0)");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
desh_error("Give decent interval (> 0)");
desh_error("The interval must be positive.");

((strlen(params.tx_data_str) + DECT_PHY_MAC_RACH_TX_DATA_JSON_OVERHEAD) >=
(DECT_DATA_MAX_LEN - 1))) {
desh_error(
"Generated json data is too long to be included with modem temperature.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like this. Or at least make JSON upper case.

Suggested change
"Generated json data is too long to be included with modem temperature.");
"The given data is too long to be encoded into JSON with modem temperature.");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants