1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

934 Commits

Author SHA1 Message Date
chrysn
69cb6b12fc rust: Update dependencies
The change in 399e25cc was did not have the intended effect: As the
local crates still all defined 0.7 as the riot-wrappers version, that
dependency was actually down- rather than upgraded, and thus did not
effect the stabilizations.
2022-10-04 00:28:46 +02:00
José Alamos
f022ac3e23
Merge pull request #17884 from Ollrogge/gnrc_lorawan1.1
gnrc/lorawan: add basic LoRaWAN 1.1 features
2022-09-30 11:29:55 +02:00
Ollrogge
32cef708a7 gnrc/lorawan: uncrustify files 2022-09-29 11:26:04 +02:00
Ollrogge
12a4e1c1ec gnrc/lorawan: add support for GNRC LoRaWAN 1.1 2022-09-29 11:25:56 +02:00
Teufelchen1
3dc3110bab shell/cord_ep: Take full URIs instead of IP and path
This fixes a crash when the path was not entered with a leading slash.
2022-09-27 16:28:04 +02:00
7344e14e1b sys/shell/cmds/dfplayer.c: initialize mode 2022-09-27 09:29:23 +02:00
Benjamin Valentin
52cd8fe4a1 sys/shell: ncput: add option to read from stdin 2022-09-23 19:47:42 +02:00
Marian Buschsieweke
eaa245f5de
sys/shell/commands/sc_vfs.c: use tiny_strerror 2022-09-20 15:51:11 +02:00
Marian Buschsieweke
fe7f75f78c
sys/shell/cmds: improve wording in shell help text
My spell checker says "receival" should be "reception". Also, the
terms allow list and deny list are preferred over whitelist and
blacklist. But since scripts may depend on the shell command name,
only the help description is changed, not the cmd names.
2022-09-16 13:15:46 +02:00
Marian Buschsieweke
c06335b71b
sys/shell: make cmds submodules
Previously `shell_commands` was a "catch-all" module that included
shell commands for each and every used module that has a shell
companion. Instead, the new `shell_cmds` module is now used to provide
shell commands as individually selectable submodules, e.g.
`cmd_gnrc_icmpv6_echo` now provides the ICMPv6 echo command (a.k.a.
ping).

To still have a "catch all" module to pull in shell commands of modules
already used, `shell_cmds_default` was introduced. `shell_commands`
depends now on `shell_cmds_default` for backward compatibility, but
has been deprecated. New apps should use `shell_cmds_default`
instead.

For a handful of shell commands individual selection was already
possible. Those modules now depend on the corresponding `cmd_%` module
and they have been deprecated.
2022-09-16 13:15:45 +02:00
Marian Buschsieweke
6e68744d76
sys/shell: port random shell command to ztimer
This fixed compilation, as the use of the interal `_xtimer_now()`
function is not compatible with `ztimer_xtimer_compat`. However, this
bug never triggered due to a bug in the build system preventing the
compilation of the shell command. We are about to fix this, so let's
fix the source first.
2022-09-16 12:49:16 +02:00
Marian Buschsieweke
1066195fe9
Merge pull request #18550 from benpicco/sc_vfs-human
sys/shell/vfs: make output of vfs df human readable
2022-09-08 20:13:08 +02:00
Benjamin Valentin
2d45fcaf76 sys/shell/vfs: make output of vfs df human readable 2022-09-08 12:35:27 +02:00
Benjamin Valentin
6ed2394dde sys/shell/commands: add suit revert sub-command 2022-09-05 07:36:28 +02:00
Benjamin Valentin
f95d577245 suit: make use of worker functions 2022-09-03 23:25:01 +02:00
chrysn
7f64521c10
Merge pull request #18424 from benpicco/ncget-convenience
sys/shell: ncget: convenience improvements
2022-08-31 23:40:35 +02:00
Benjamin Valentin
51804679e6 sys/shell: ncget: make use of vfs_is_dir() 2022-08-31 17:23:20 +02:00
Gunar Schorcht
8a5ff74dfc sys/shell: print address type in ble info command 2022-08-18 18:45:13 +02:00
Benjamin Valentin
9057b2c6ad sys/shell/vfs: introduce format sub-command 2022-08-12 15:36:29 +02:00
Benjamin Valentin
7c19ea95b7 sys/shell/vfs: fix error message printing 2022-08-12 15:36:29 +02:00
Benjamin Valentin
4c31bd1689 sys/shell: add CONFIG_NCGET_DEFAULT_DATA_DIR option 2022-08-05 12:05:30 +02:00
benpicco
c125e3d98a
Merge pull request #18133 from fabian18/gcoap_fileserver_file_and_directory_creation
gcoap/fileserver: add file and directory creation and deletion
2022-08-04 16:14:29 +02:00
Fabian Hüßler
70a8cf0d63 sys/shell/commands: add recursive unlink to sc_vfs 2022-08-03 22:09:21 +02:00
Benjamin Valentin
3f0a6c8f9d sys/shell: improve 'ncget' command
Allow to specify destination directory and concat the filename
automatically.
2022-08-02 10:02:39 +02:00
Marian Buschsieweke
cab761ba5d
sys/shell/commands/sc_gnrc_icmpv6_echo: use ztimer 2022-07-21 13:20:11 +02:00
chrysn
d9879c96ca
Merge pull request #16833 from chrysn-pull-requests/rust-lib
Add some Rust library building infrastructure
2022-07-10 21:39:35 +02:00
chrysn
ebfa6f61d6 shell/democommands: Add example Rust module 2022-07-10 21:27:12 +02:00
Martine Lenders
fda230eb7c
Merge pull request #18275 from maribu/sys/net/rpl/netstats
sys/net/gnrc/rpl: sync access to netstats
2022-07-01 12:24:24 +02:00
Marian Buschsieweke
5a47d6a9b8
sys/net/gnrc/rpl: sync access to netstats
Synchronize the RPL thread updating the RPL netstats with the RPL
shell command reading it by disabling IRQs. This will prevent printing
corrupted data on non-32bit platforms as well as printing inconsistent
data (e.g. TX count of old state in conjunction with TX bytes of new
state) for all platforms.

Co-authored-by: Martine Lenders <mail@martine-lenders.eu>
2022-06-30 09:48:46 +02:00
Marian Buschsieweke
93d8bade8e
sys/net/gnrc/rpl: refactor netstats_rpl_t
There is a repeating pattern in the struct that is split out into a
subtype in this commit. This makes handling the data easier, as now
done in the print routine.
2022-06-30 09:48:45 +02:00
Marian Buschsieweke
973b6f69bf
sys/net/netopt: change NETOPT_STATS semantics
Instead of retrieving a pointer with NETOPT_STATS, retrieve the current
data. This avoids data corruptions when reading from one thread (e.g.
the thread running the shell (ifconfig command)) while another thread
is updating it (e.g. the netif thread).

The issue affects all boards, as users typically expect the count of
TX packets and the number of TX bytes to refer to the same state. For
16 bit and 8 bit platforms even a single netstat entry can read back
corrupted.

This fixes the issue by just copying the whole netstat_t struct over
without requiring explicit locking on the user side. A multi-threaded
network stack still needs to synchronize the thread responding to
netopt_get with the thread writing to the netstat_t structure, but that
is an implementation detail no relevant to the user of the API.
2022-06-28 16:57:43 +02:00
Erik Ekman
aaa73b79ed sys/shell/gnrc_netif: List netifs in registration order
The netif list is used like a stack, so it needs to be
iterated in reverse to keep the registration order.

Time complexity in O(n^2), but the the list is normally very short
(1-2 items).

Before:
```
> ifconfig
Iface  10  HWaddr: 24:0A:C4:E6:0E:9C  Channel: 0  Link: down
[..]

Iface  7  HWaddr: 24:0A:C4:E6:0E:9F  Link: down
[..]
```

Now they are in the increasing order:
```
> ifconfig
Iface  7  HWaddr: 24:0A:C4:E6:0E:9F  Link: down
[..]

Iface  10  HWaddr: 24:0A:C4:E6:0E:9C  Channel: 0  Link: down
[..]
```

When lwIP is hacked to use the same shell command, it also
lists it interfaces in the expected order (was ET1,ET0 before):
```
> ifconfig
Iface  ET0  HWaddr: 24:0A:C4:E6:0E:9F  Link: down
[..]

Iface  ET1  HWaddr: 24:0A:C4:E6:0E:9C  Channel: 0  Link: down
[..]
```
2022-06-21 11:54:08 +02:00
Marian Buschsieweke
dd6243f27f
Merge pull request #18213 from maribu/sys/shell/commands/sc_lwip_netif.c
sys/shell/commands/sc_lwip_netif.c: add address state
2022-06-16 13:38:55 +02:00
benpicco
0a16f8266a
Merge pull request #17962 from benpicco/nanocoap_vfs-put
nanocoap_vfs: add nanocoap_vfs_put()
2022-06-16 11:53:36 +02:00
Marian Buschsieweke
3954217fdf
sys/shell/commands/sc_lwip_netif.c: add address state
Add information about the address state (e.g. if it is valid, preferred,
tentative, how many probes have been sent)
2022-06-16 08:40:42 +02:00
benpicco
6a15ad4df2
Merge pull request #18179 from maribu/sys/shell_commands
sys/shell/commands: add static qualifier where appropriate
2022-06-14 10:06:07 +02:00
Marian Buschsieweke
4f769c2f55
sys/shell/commands: add static qualifier where appropriate
Due to the conversion to XFA based SHELL_COMMAND() much fewer function
need to expose a symbol. Hence, spray `static` all over the place.
2022-06-11 14:38:58 +02:00
Benjamin Valentin
d8da1b631c sys/shell: add 'ncput' shell command 2022-06-08 17:21:19 +02:00
Hendrik van Essen
ccc795133f sys/shell: add pseudomodule shell_lock_auto_locking
Module to lock the shell after a given timeout of time x. When the
shell did not receive any input within time x, then the shell is
locked automatically.
2022-06-08 12:53:48 +02:00
Hendrik van Essen
2284f87fdb sys/shell: add module shell_lock
Module to lock the running shell with a password. Shell is proceeded only
when the valid password was entered by the user. After 3 failed attempts,
the input is blocked for a few seconds to slow down brute force attacks.
Does not make use of any cryptographic features yet.
2022-06-08 12:53:48 +02:00
Marian Buschsieweke
5ea582b3dd
sys/shell_commands: convert to SHELL_COMMAND()
Make use of XFA for shell commands
2022-06-07 09:25:04 +02:00
Marian Buschsieweke
66a04926ca
sys/shell_commands: fix signature of _openwsn_ifconfig 2022-06-07 09:24:49 +02:00
Marian Buschsieweke
86e0ba3cdb
sys/shell/commands: remove stale reference to id cmds
The shell command `id` was dropped in
b3a061e0ab but somehow the command entry
was left it. This cleans it up.
2022-06-07 09:24:49 +02:00
Francisco
f6d5a54c3e
Merge pull request #18045 from benpicco/suit/transport-vfs
suit/transport/vfs: add VFS as source for firmware updates
2022-06-07 08:32:15 +02:00
Benjamin Valentin
8e5812d218 suit/transport: move common code to new file 2022-06-01 13:00:51 +02:00
benpicco
b94dd60978
Merge pull request #17912 from benpicco/pkg/fatfs-rtt_rtc
pkg/fatfs, shell: enable RTC support if rtt_rtc is used
2022-05-31 10:30:29 +02:00
Benjamin Valentin
4dd971f749 sys/shell: add 'nget' shell command 2022-05-24 09:35:04 +02:00
benpicco
c72d4ccc0e
Merge pull request #18112 from fjmolinas/pr_vfs_rmount_mkdir
sys/shell/vfs: add umount, rmount and mkdir commands
2022-05-23 23:33:16 +02:00
Francisco Molina
81f172039a sys/shell/vfs: add umount, rmount and mkdir commands 2022-05-23 16:41:34 +02:00
Benjamin Valentin
ff27db9bce sys/shell: add sha256sum command 2022-05-17 11:32:25 +02:00
Benjamin Valentin
a250c2b5ad sys/shell: add sha1sum command 2022-05-17 11:30:52 +02:00
Benjamin Valentin
845450c663 sys/shell: add md5sum command 2022-05-17 11:30:52 +02:00
b8fef54724 sys/shell: drop _builtin_cmds define 2022-05-09 15:24:34 +02:00
Martine Lenders
aa5a18f833
Merge pull request #16974 from yarrick/lwip_netif
pkg/lwip: Add netif_t struct, register all netifs
2022-04-26 23:49:49 +02:00
Francisco Molina
ee9bf559fe sys/sc_suit: aligh seq_no format with riotboot_hdr 2022-04-21 16:59:32 +02:00
Francisco Molina
180be1d6ee sys/sc_suit: add seq_no command 2022-04-14 08:39:28 +02:00
Benjamin Valentin
4fae412027 sys/shell: enable RTC commands with rtt_rtc 2022-04-11 14:26:08 +02:00
Oleg Hahm
f3ffe134b0
Merge pull request #17895 from benpicco/pm_blocker_array
sys/pm_layered: use array representation, get rid of implicit IDLE mode
2022-04-08 14:04:46 +02:00
Benjamin Valentin
7fb8f3b7c5 sys/pm_layered: rename val_u8 -> blockers 2022-04-06 12:29:25 +02:00
3a83c380f7
Merge pull request #17824 from geonnave/set_channels_mask
pkg/semtech-loramac: enable setting channels mask
2022-04-02 18:56:11 +02:00
Benjamin Valentin
bb8def8b3e cord_ep: replace sock_udp_str2ep() with sock_udp_name2ep() 2022-03-24 17:10:51 +01:00
Geovane Fedrecheski
eabeee0ebe sys/shell+pkg/semtech-loramac: add get ch_mask
Also, set LORAMAC_CHANNELS_MASK_LEN based on the
selected LORA_REGION configuration.
2022-03-18 14:26:01 -03:00
Geovane Fedrecheski
26c55a91bd sys/shell: add 'loramac set ch_mask' command 2022-03-18 10:48:18 -03:00
Francisco Molina
be6a76a3c0 sys/sc_gnrc_udp: fix *timer include 2022-03-17 14:37:40 +01:00
Karl Fessel
4147042bc1 sys/shell: add missing includes 2022-02-28 14:53:07 +01:00
Francisco
ff39d5f388
Merge pull request #17657 from benpicco/shell/udp_cmd-fix
shell/sc_gnrc_udp: always use delay in µs
2022-02-22 10:44:57 +01:00
chrysn
40f7c66625
Merge pull request #17660 from chrysn-pull-requests/vfs-drop-per-fs-fstatvfs
vfs: Introduce reliable disk enumeration
2022-02-17 18:47:41 +01:00
chrysn
b9b0ca8972 sys/shell/vfs: Use vfs_iter_mount_dirs instead of vfs_iter_mounts
This solves highly theoretical race conditions of file systems being
unmounted in an application while a shell `df` runs, fixes the previous
weird behavior that `/mountpoint/non-existant-path` could be df'd and
would even report that non-existant path as a file name, but more
practically ensures that an example of vfs_iter_mount_dirs is around.
2022-02-16 19:15:02 +01:00
Benjamin Valentin
609ed81f36 sys/shell: add vfs mount command 2022-02-16 18:55:26 +01:00
Benjamin Valentin
8bb405a493 shell/sc_gnrc_udp: always use delay in µs 2022-02-15 15:08:53 +01:00
Benjamin Valentin
d5dee30368 shell/sc_gnrc_udp: don't add delay after last packet 2022-02-14 17:58:20 +01:00
Benjamin Valentin
e22698f9cd shell/sc_gnrc_udp: set proper timeout based on which timer is used 2022-02-14 17:52:55 +01:00
Benjamin Valentin
0cd3cf4506 sc_vfs: print files with unknown type 2022-02-08 16:28:33 +01:00
Benjamin Valentin
a486bae55a sc_vfs: print file size
This prints the size of the displayed files in `ls`.
It also makes it easier to distinguis files from directories.
2022-02-08 13:23:42 +01:00
Francisco
dbae3ed706
Merge pull request #16860 from haukepetersen/add_nimble_netifextadv
nimble/netif: add support for BT5 PHY modes
2022-02-04 11:16:11 +01:00
benpicco
5a57dec71a
Merge pull request #17093 from maribu/core/change_prio
core/sched: add sched_change_priority()
2022-01-28 20:01:20 +01:00
Hauke Petersen
7c3f4e0fe9 shell/sc_nimble_statconn: allow to set PHY mode 2022-01-27 10:30:29 +01:00
Hauke Petersen
f9386b4af7 shell/sc_nimble_netif: extend to support PHY modes 2022-01-27 10:30:29 +01:00
Jose Alamos
9955a35c63
[treewide] lora: use int16_t for RSSI value
The RSSI values reported by LoRa transceiver can be less than -127.
Therefore, `int8_t` is not enough. This commit defines the RSSI of
`netdev_lora_rx_info` as `int16_t` and adapt the drivers accordingly
(sx126x, sx127x).
2022-01-17 17:54:18 +01:00
Hauke Petersen
bc0adc19a8 shell/sc_gnrc_udp: rename static functions 2021-12-14 13:50:38 +01:00
Hauke Petersen
13363782b2 shell/sc_gnrc_udp: mark all feasible params const 2021-12-14 13:50:29 +01:00
benpicco
cfaa167469
Merge pull request #16598 from benpicco/sys/shell/udp
examples/gnrc_networking: move udp command to shell commands
2021-12-13 15:03:18 +01:00
Hauke Petersen
c7e11d5904 shell/sc_nimble_statconn: adapt to new return vals 2021-12-06 11:28:04 +01:00
Francisco
3afa47d8f2
Merge pull request #14955 from maribu/cflags-cast-align
makefiles/cflags.inc.mk: Add -Wcast-align
2021-12-03 17:47:24 +01:00
Marian Buschsieweke
be42be9d15
sys/shell: use container_of in sc_gnrc_netif 2021-12-03 10:12:36 +01:00
Hauke Petersen
47d1f72a6c shell/sc_nimble_netif: remove ping sub-command 2021-12-02 23:31:33 +01:00
Hauke Petersen
97780b3610 shell/sc_nimble_netif: adapt to scanner changes 2021-12-02 23:31:33 +01:00
Martine Lenders
76bda73235
Merge pull request #17261 from benpicco/shell/gnrc_icmpv6_echo-hang
shell/gnrc_icmpv6_echo: Fix hang with no msg queue
2021-12-01 00:16:30 +01:00
Gunar Schorcht
818c127513 sys/shell: update sc_i2c_scan to new I2C API 2021-11-29 06:35:25 +01:00
Benjamin Valentin
be8a364bb4 shell/gnrc_icmpv6_echo: fix duplicate datalen check 2021-11-24 12:07:14 +01:00
Benjamin Valentin
7d1dd27756 shell/gnrc_icmpv6_echo: Fix hang with no msg queue
`msg_avail()` will return -1 if the thread has no message queue.
Casting this to unsigned will result in the `ping` command to try
receiving 4294967295 messages, which hangs the shell.

Drop the cast to `unsigned` and the loop behaves as intended.
But then it's still wrong: If new messages become available, they
would be ignored.

So change the `for` loop to a `while` loop. The index variable is
not used at all.
2021-11-24 12:00:14 +01:00
Leandro Lanzieri
43c567ab53
sys/shell/commands/sc_dfplayer: make cppcheck happy 2021-11-22 12:25:58 +01:00
Leandro Lanzieri
e525e23143
drivers/dfplayer: add no_strerror option to Kconfig 2021-11-22 12:25:57 +01:00
Benjamin Valentin
f362a19eed sys/shell: hide random commands behind random_cmd pseudo-module
These commands cost 248 bytes of memory, we don't want to always
include them when the `random` module is selected.
2021-11-19 16:53:46 +01:00
Erik Ekman
7593bb0e40 pkg/lwip: Update netif_get_name implementation
Correctly refer to the struct netif inside the netif_t

Fix call to netif_get_name from lwIP ifconfig shell command
2021-11-16 22:04:44 +01:00
Marian Buschsieweke
ed9bf358c5
sys/shell: Add nice shell command via module nice 2021-11-02 20:44:32 +01:00
Erik Ekman
ccfe80c844 sys/shell/gnrc_netif: Allow 'ifconfig help'
Currently a valid netif name must be passed to show the usage
instructions:

```
> ifconfig help
error: invalid interface given
> ifconfig 6 help
usage: ifconfig
usage: ifconfig <if_id> [up|down]
[...]
```

`ifconfig --help` is also accepted.
2021-10-22 14:14:58 +02:00
Hauke Petersen
b985ad2330 sys/shell/sc_nimble_netif: add ping subcommand 2021-10-06 16:47:34 +02:00
Hauke Petersen
8ac2ad8531 shell/sc_nimble_netif: adapt to scanner API change 2021-09-17 14:46:05 +02:00
Hauke Petersen
a83b171330 shell/sc_nimble_netif: adapt to new return values 2021-09-10 21:10:53 +02:00