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

firmware/sys/shell_extended: Added stg commands functions and se_* fixes #364

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

CW-75
Copy link
Collaborator

@CW-75 CW-75 commented Oct 14, 2022

Contribution description

To use shell_extended storage commands, saves, loads, and deletes, only writing and reading an interface struct defined in #363 (This pr is merged with #363 and #362). implementing radio gets and sets, these functions allow you save set parameters in the mtd, and after read them, automatically, set that configuration in your own device.
Another little bugs were fixed from storage module, and shell_extended module

Testing procedure

Run the shell_extended example.

make -C examples/shell_extended flash term
  • firs step command line testing (use ifconfig to set radio parameters {tx_power, channel} )
ifconfig [id radio interface] set power 4
ifconfig [id radio interface] set channel 20
  • check your settings
> ifconfig
2022-10-13 19:48:21,456 # ifconfig
2022-10-13 19:48:21,463 # Iface  4  HWaddr: 4A:D4  Channel: 20  Page: 0  NID: 0x23  PHY: O-QPSK 
2022-10-13 19:48:21,464 #           
2022-10-13 19:48:21,469 #           Long HWaddr: 00:04:25:19:18:01:CA:D4 
2022-10-13 19:48:21,476 #            TX-Power: 4dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
....
  • Save them in the mtd_storage using stg save command.
  • reset your device (Press device's reset button or using rebootcommand) .
  • After reset use the stg load command to load all set parameters before.

expected output by the stg load

2022-10-13 19:48:25,264 # Netif_id: [radio interface id]
2022-10-13 19:48:25,266 # Type: Radio iface
2022-10-13 19:48:25,267 # id: [radio interface id]
2022-10-13 19:48:25,268 # Tx power 4
2022-10-13 19:48:25,269 # Channel: 20
  • after that, check your current setting in your interfaces using ìfconfig, the expected output should be the same that step 2.

Also you can delete the interface register.

  • write stg delin your shell
  • check the register using stg load

expected output:

2022-10-13 19:47:12,808 # The register doesn't exists, first you need to save the interface info

Issues/PRs references

this depends of #362, #363

@CW-75
Copy link
Collaborator Author

CW-75 commented Oct 14, 2022

After test the PR, will be removed the shell_commands of Makefile. only are used to ifconfig commands,

@luisan00
Copy link
Contributor

looks good and works as expected, only a few conflicting files to fix and squashing before to merge 👍

firmware/network/radio: Fixed tests

Fixed

examples:shell_extended: basic operations for storage cmds

Fixed

fixed

fixed net_tools
Copy link
Contributor

@luisan00 luisan00 left a comment

Choose a reason for hiding this comment

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

let's go ahead! 👍

@CW-75 CW-75 merged commit 1bef075 into Mesh4all:main Oct 14, 2022
@CW-75 CW-75 deleted the feature/storage_sc branch October 14, 2022 16:24
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.

2 participants