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

787 Commits

Author SHA1 Message Date
Bas Stottelaar
47d376c5c3 sys/*: add explicit include of timex.h 2020-10-21 21:47:31 +02:00
Hendrik van Essen
aead3162ec sys/shell: terminate shell on Ctrl-D
Ctrl-D was not caught in a special case so it was interpreted as
a standard character. Handle it now the same way like EOF and
terminate the shell instance.
2020-10-21 17:40:44 +02:00
Martine Lenders
45144fb4a4
treewide: use new gnrc_pkt API functions instead of utlist.h macros 2020-10-13 13:32:53 +02:00
c2685e4e3c
sys/shell/sht1x: fix typo 'presicion' -> 'precision' 2020-10-02 08:15:56 +02:00
Marian Buschsieweke
5a04f48238
sys/shell/commands/gnrc_icmpv6_echo: Fix alignment
Fix unaligned memory access in `ping6` shell command
2020-09-25 12:42:02 +02:00
Francisco Molina
19494a4db3
pkg/openwsn: add riot based openwsn scheduler 2020-09-10 09:37:43 +02:00
Benjamin Valentin
471e81d544 ieee802154: add definitions & config options for MR-FSK 2020-09-07 15:40:56 +02:00
892a681ea4
Merge pull request #14803 from fjmolinas/pr_openwsn_shell_commands
pkg/openwsn: add shell commands
2020-09-02 21:11:35 +02:00
Francisco Molina
badfa06694
pkg/openwsn: add shell commands 2020-09-02 17:19:00 +02:00
Martine S. Lenders
3b7bab1108
gnrc_ipv6_nib_nc: error on non-link-local address without ARSM 2020-09-01 11:12:55 +02:00
benpicco
9f2475dc14
Merge pull request #14832 from maribu/sys-cleanup
sys: Cleanup access to internal variables
2020-08-26 17:07:19 +02:00
Marian Buschsieweke
3b6fa61829
sys: Cleanup access to internal variables
Replace direct accesses to sched_active_thread and sched_active_pid with
the helper functions thread_getpid() and thread_get_active(). This serves
two purposes:

1. It makes accidental writes to those variable from outside core less likely.
2. Casting off the volatile qualifier is now well contained to those two
   functions
2020-08-24 20:28:11 +02:00
Keith Packard
e215261ced picolibc: Use most NEWLIB code with picolibc
In most places, picolibc and newlib are the same, so use
the existing newlib code when compiling with picolibc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-08-24 08:26:16 -07:00
Akshai M
b52e3e1587 net/netif : Move 'NETIF_NAMELENMAX' to 'CONFIG_' 2020-08-03 16:09:21 +05:30
Cenk Gündoğan
891b8e37d7 sys: shell: deduplicate help text for ping command 2020-07-28 10:49:17 +02:00
Akshai M
caab4cd8c5 net/l2filter : Move 'L2FILTER_LISTSIZE' to 'CONFIG_' 2020-07-22 00:26:09 +05:30
Akshai M
0d52f81935 net/l2filter : Move 'L2FILTER_ADDR_MAXLEN' to 'CONFIG_' 2020-07-22 00:26:09 +05:30
Hauke Petersen
dbec7a3e94 sys/shell/sc_nimble_netif: cleanup timing params 2020-07-08 08:46:43 +02:00
Martine Lenders
6fc72be723
Merge pull request #14450 from MrKevinWeiss/pr/shellhooks
sys/shell: Add optional hooks for shell commands
2020-07-07 18:43:50 +02:00
MrKevinWeiss
04630d20ba sys/shell: Add optional hooks for shell commands
Introduce optional user shell_post_readline_hook, shell_pre_command_hook, shell_post_command_hook.
Enable with USEMODULE=shell_hooks.
Calls user implemented *_hook functions if defined.
If implementation does not exist, nothing happens.

The intent is to make profiling of the shell command timings easier.

Test provided in tests/shell with USEMODULE=shell_hooks.
2020-07-07 17:00:38 +02:00
Martine S. Lenders
e923d5dbd8
sc_gnrc_netif: fix whitespaces in output
Originally, the options and flags in the `netif` shell output were
separated by two spaces. For later added flags this is not the case,
making the parsing of those flags and options hard to impossible.

This change adds those missing spaces + comments so it might not happen
again in the future.
2020-07-07 12:24:40 +02:00
Hauke Petersen
3ecb9d8423 sys/shell: add nimble_statconn shell command 2020-07-06 08:14:09 +02:00
e8d8fd2f32
Merge pull request #14404 from benpicco/sys/usb_board_reset_in_bootloader
sys/usb_board_reset: add usb_board_reset_in_bootloader definition
2020-07-01 13:49:59 +02:00
chrysn
a787875cf8 usb_board_reset: Split headers into public and private
The private parts need USB definitions (and are thus preferably used
from USB_H_USER_IS_RIOT_INTERNAL compilation units). Functions like
usb_board_reset_in_bootloader do not depend on USB headers for their
definitions and are fair game throughout the application even for
generic RIOT USB devices.
2020-07-01 13:22:25 +02:00
Benjamin Valentin
33ef4f2902 sys/usb_board_reset: add usb_board_reset_in_bootloader definition
Move the definition of usb_board_reset_in_bootloader() to a common
location.
2020-07-01 10:30:17 +02:00
M Aiman Ismail
edc95679cd cord_ep: allow not specify netif if only one interface exist 2020-06-30 22:36:23 +02:00
benpicco
f372beb405
Merge pull request #12363 from maribu/dfplayer
drivers/dfplayer: New driver for the DFPlayer Mini MP3 player
2020-06-28 23:24:36 +02:00
Marian Buschsieweke
2f858a2c0a
sys/shell: Added shell command "dfplayer"
Added a shell command that is added if the modules shell_commands and dfplayer
are both used. It allows to control the DFPlayer Mini MP3 player.
2020-06-28 21:06:49 +02:00
Gunar Schorcht
c95ebb63b4 sys/net: add NETOPT_RSSI for wireless channels 2020-06-26 12:33:38 +02:00
Chamaeleon-
547d3a0620
sys/shell/commands: fixing typo in ping6 help
reponse -> response in -W <ms timeout>
2020-06-24 12:49:05 +02:00
Francisco
af80e863b3
Merge pull request #13197 from HendrikVE/shell-tokenizer-refactor
sys/shell: refactor tokenizer code
2020-06-24 12:32:51 +02:00
Hendrik van Essen
cc759ebcca sys/shell: further refactor tokenizer (part 2/2)
Code now correctly handles quotes within PARSE_UNQUOTED
and tabs are now considered a BLANK just like a space.
2020-06-23 13:47:04 +02:00
Hendrik van Essen
0782b493ed sys/shell: simplify array traversal code
The code for traversing arrays of shell commands (used to print help messages
and to search for commmand handlers) was needlessly complex.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-06-23 13:46:51 +02:00
Hendrik van Essen
37cff93254 sys/shell: further refactor tokenizer (part 1/2)
Factor out common code for quoted and unquoted tokens. This makes the code
slighly less clear, but it also eliminates repetition (which may improve
clarity).

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-06-23 13:46:40 +02:00
Thomas Stilwell
bbdba4dad1 sys/shell/commands: alias ping=ping6 2020-06-08 23:07:45 -05:00
Marian Buschsieweke
6a4e61f8c4
Merge pull request #14196 from benpicco/sc_bootloader
shell_commands: provide command to reboot to bootloader
2020-06-03 20:21:07 +02:00
benpicco
3a1ee4983c
Merge pull request #14010 from benpicco/at86rf215-mr-ofdm
drivers/at86rf215: implement MR-OFDM
2020-06-03 16:39:04 +02:00
Benjamin Valentin
036d2e2d81 shell_commands: provide command to reboot to bootloader
Make the triggering of the bootloader available as a shell command.
2020-06-03 16:10:31 +02:00
Benjamin Valentin
25a34a1897 ieee802154: add definitions & config options for MR-OFDM
Define options for IEEE 802.15.4g MR-OFDM as well as shell commands
to set them via ifconfig.
2020-06-03 15:58:50 +02:00
Hendrik van Essen
86f60357cf sys/shell: refactor tokenizer code
The tokenizer (the code that breaks up the line given to the shell into
strings to create argv) was quite a messy piece of code. This commit
refactors it into a more traditional state-machine based parser.

This fixes the issues with quote handling exposed by the recently
introduced test.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-05-18 14:31:46 +02:00
608207c4fa
Merge pull request #13859 from disconnect3d/patch-1
shell_commands/rtc: Fix off by one when checking for clearalarm command
2020-05-14 21:20:06 +02:00
Leandro Lanzieri
dfa722c519
gnrc/rpl: Move GNRC_RPL_WITHOUT_PIO to 'CONFIG_' namespace
Also evaluate its value using IS_ACTIVE when possible.
2020-05-14 15:56:59 +02:00
Francisco
1f9d299492
Merge pull request #13196 from HendrikVE/shell-readline-refactor
sys/shell: refactor readline function
2020-05-14 15:32:45 +02:00
Disconnect3d
d91c19b727 shell/commands: fixed off by one when checking for clearalarm command 2020-05-12 12:39:25 +02:00
Francois Berder
31cdcdd0a4 sys/shell: commands: Check argc in _pm_handler
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2020-05-02 20:55:28 +01:00
Francisco
80b300289d
Merge pull request #13912 from benpicco/at86rf215-mr-qpsk
drivers/at86rf215: implement MR-O-QPSK
2020-04-29 12:44:00 +02:00
Marian Buschsieweke
f6873dbac3
sys/pm: Add pm_get_blocker()
Provide access to pm_blocker via a well-defined API rather than hacks.
2020-04-29 11:21:03 +02:00
Benjamin Valentin
6ce0092982 shell/sc_gnrc_netif: fix vera++ errors 2020-04-29 10:41:37 +02:00
Benjamin Valentin
c77119957f shell/sc_gnrc_netif: fix space after NID
All option have a space behind them. This fixes the formatting of the
NID parameter if there are options after it.
2020-04-29 10:41:37 +02:00
Benjamin Valentin
fac35644d0 ieee802154: add definitions & config options for MR-O-QPSK
Define options for IEEE 802.15.4g MR-O-QPSK as well as shell commands
to set them via ifconfig.
2020-04-29 10:41:37 +02:00
Thomas Stilwell
325ab426d4
sys/shell/commands: pm: add set mode block mode unblock mode 2020-04-28 16:56:34 +02:00
Thomas Stilwell
7c82ac6838
sys/shell/commands: add pm show command to view current blockers 2020-04-28 16:51:23 +02:00
0228553384 sys/shell: rpl: make use of xtimer_left_usec() 2020-04-21 11:26:56 +02:00
Hendrik van Essen
a0a3e6c3a1 sys/shell: refactor readline function
This makes the code of `readline()` clearer and shorter. It also fixes a
minor artifact of the long line handling.

Previously it was not possible to recover from a long line. That is, if too
many characters were sent, the line would be invalidated and pressing backspace
would not fix it- the only option was to discard the line. It is now possible
to bring the line back to size. Note that visual effects when deleting characters
will still depend on the host's terminal.

The new code is written in a way that all writes to memory are guarded by
bounds check, so an assertion was removed.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-04-14 15:38:56 +02:00
Hendrik van Essen
45f898563a sys/shell: remove ifdefs in the middle of code
ifdefs in the middle of code reduce the readability
and debugability and should be avoided.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-04-14 15:38:54 +02:00
Hendrik van Essen
268d1b2305 sys/shell: remove useless "inline prevention"
There was some code added to "prevent putchar from being inlined", which
supposedly enlarged the code size.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-04-14 14:34:58 +02:00
Leandro Lanzieri
4052c01e85
net/nanocoap: Move NANOCOAP_URI_MAX to 'CONFIG_' namespace 2020-04-07 17:00:53 +02:00
Peter Kietzmann
767cfc21a9
Merge pull request #13341 from Einhornhool/cryptoauth-shellhandler
sys/shell: add shell handler for CryptoAuth devices
2020-03-31 22:19:21 +02:00
Lena Boeckmann
5bc0b15114 sys/shell: add cryptoauthlib shell handler 2020-03-31 21:31:24 +02:00
Leandro Lanzieri
f2ed8b06c0
gnrc/nib: Move GNRC_IPV6_NIB_L2ADDR_MAX_LEN to 'CONFIG_' namespace 2020-03-31 18:07:12 +02:00
Leandro Lanzieri
53a522d642
gnrc/nib: Move GNRC_IPV6_NIB_CONF_MULTIHOP_P6C to 'CONFIG_' namespace
Also evaluate using IS_ACTIVE macro.
2020-03-31 18:07:10 +02:00
Leandro Lanzieri
40c78f1c75
gnrc/nib: Move GNRC_IPV6_NIB_CONF_6LBR to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE macro.
2020-03-31 18:07:03 +02:00
Hendrik van Essen
3860355380
sys/shell: rephrase/reformat some comments 2020-03-30 12:26:20 +02:00
Juan Carrano
2810637306
sys/shell: correctly detect and handle long lines
The numeric value for EOF is -1. This caused the shell to return
the same code when EOF was encountered and when the line lenght was
exceeded. Additionally, if the line length is exceeded, the correct
behaviour is to consume the remaining characters until the end of
the line, to prevent the following line from containing (potentially
dangerous) garbage.

Co-authored-by: Hendrik van Essen <hendrik.ve@fu-berlin.de>
2020-03-30 12:26:20 +02:00
Martine Lenders
889e8b7cf8
Merge pull request #13752 from gschorcht/sys/shell/fix_gnrc_netif
sys/shell: fix ifconfig command for NETOPT_LINK
2020-03-30 09:44:13 +02:00
Gunar Schorcht
8a1cfd99da sys/shell: fix ifconfig command for NETOPT_LINK 2020-03-30 09:01:21 +02:00
Benjamin Valentin
e1ce24abec shell/gnrc_icmpv6_echo: replace incorrect use of gnrc_netif_highlander()
We want to check if there *is* only one interface, not if there *can*
be no more than one interface here.
2020-03-27 15:07:38 +01:00
Jose Alamos
e451570219 gnrc_netif: remove GNRC_NETIF_NUMOF macro 2020-03-26 11:12:23 +01:00
7d0c475113
Merge pull request #13486 from bergzand/pr/suit/ietf_v3
SUIT: Update to draft-ietf-v3
2020-03-20 14:44:29 +01:00
benpicco
b0fab9c53a
Merge pull request #13638 from gschorcht/sys/shell/rtt_command
sys/shell: add rtt command
2020-03-19 21:21:12 +01:00
Gunar Schorcht
3d20b0b6c5 sys/shell: add rtt command 2020-03-19 17:17:26 +01:00
14bdf8f46b
sys/suit: Add SUIT draft ietf-v3 firmware upgrade module
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2020-03-18 14:13:12 +01:00
6538687a4c
Merge pull request #13613 from fjmolinas/pr_light_shell_interactive_sync
tests: add interactive_sync adapted to shell
2020-03-17 18:16:51 +01:00
Francisco Molina
d57c39f09f
sys/shell: remove sc_interactive_sync 2020-03-17 17:20:58 +01:00
Jose Alamos
6ace7b5472 gnrc_netif: use gnrc_netif_single where possible 2020-03-17 10:54:30 +01:00
Martine Lenders
086d0ac83e
Merge pull request #13152 from miri64/shell_commands/enh/version
shell_commands: provide command to print version
2020-03-11 18:36:43 +01:00
Jose Alamos
6143cd800b gnrc_netif: use gnrc_netif_send where possible 2020-03-06 15:22:58 +01:00
Benjamin Valentin
fa4447241f sock_dns: make sock_dns_query() return the length of the address
The implementation already did that, now also reflect this in the
documentation.
2020-02-24 14:29:17 +01:00
Benjamin Valentin
367f19d390 shell/gnrc_icmpv6_echo: don't do DNS lookup for plain IP
When using ping6 with an IP address, don't do a DNS lookup.
Hostnames can't contain ':', so use that to tell them apart
from plain IP addressees.
2020-02-24 14:21:54 +01:00
Benjamin Valentin
a65daf7a31 shell/gnrc_icmpv6_echo: set success state if DNS query succeeded
We need to set `res` to 0 to signal success, otherwise we end up
in the print usage case.
2020-02-24 14:21:54 +01:00
Benjamin Valentin
f5a5c5dd2c shell/gnrc_icmpv6_echo: fix build with USEMODULE += sock_dns
To be able to call sock_dns_query() in _configure(), we also
need to include the header file.
2020-02-21 23:56:33 +01:00
Benjamin Valentin
d572db83e1 shell/gnrc_icmpv6_echo: print interface id in reply
If there is more than one interface, print the id of the receiving
interface for convenience.

```
ping6 ff02::1
2020-02-20 18:19:38,644 # 12 bytes from fe80::d0ae:c1b:2054:58e%7: icmp_seq=0 ttl=64 rssi=-45 dBm time=4.801 ms
2020-02-20 18:19:38,652 # 12 bytes from fe80::d0ae:c1b:2054:58c%8: icmp_seq=0 ttl=64 rssi=-63 dBm time=13.422 ms (DUP!)
2020-02-20 18:19:38,661 # 12 bytes from fe80::c78:16d9:8aca:ba9a%8: icmp_seq=0 ttl=64 rssi=-44 dBm time=21.819 ms (DUP!)
2020-02-20 18:19:39,648 # 12 bytes from fe80::d0ae:c1b:2054:58e%7: icmp_seq=1 ttl=64 rssi=-44 dBm time=4.797 ms
2020-02-20 18:19:39,657 # 12 bytes from fe80::d0ae:c1b:2054:58c%8: icmp_seq=1 ttl=64 rssi=-61 dBm time=12.917 ms (DUP!)
2020-02-20 18:19:39,666 # 12 bytes from fe80::c78:16d9:8aca:ba9a%8: icmp_seq=1 ttl=64 rssi=-43 dBm time=21.679 ms (DUP!)
2020-02-20 18:19:40,657 # 12 bytes from fe80::d0ae:c1b:2054:58e%7: icmp_seq=2 ttl=64 rssi=-41 dBm time=4.795 ms
```
2020-02-21 13:59:52 +01:00
Martine Lenders
ebb20f2d44
Merge pull request #13305 from miri64/gnrc_ipv6_ext_frag_stats/feat/initial
gnrc_ipv6_ext_frag: initial import of statistics module
2020-02-10 20:23:13 +01:00
Martine S. Lenders
cf69e61289
gnrc_ipv6_ext_frag: initial import of statistics module 2020-02-06 13:48:42 +01:00
Martine S. Lenders
ed9f43ab3a
gnrc_sixlowpan_frag_stats: add average fragments per datagram statistic 2020-02-06 13:40:23 +01:00
Martine S. Lenders
27b86f91c0
shell_commands: remove old and redundant lines 2020-02-05 13:35:48 +01:00
Martine S. Lenders
5fd88ab44a
shell_commands: provide command to print version 2020-01-17 10:28:51 +01:00
Leandro Lanzieri
8e6f6ee460
Merge pull request #13065 from PeterKietzmann/pr_kconf_netif
Kconfig: Expose gnrc/netif configurations
2020-01-13 13:25:17 +01:00
PeterKietzmann
9e83d12bc0 net/gnrc/netif: Move GNRC_NETIF_IPV6_ADDRS_NUMOF to 'CONFIG_' namespace 2020-01-13 12:28:37 +01:00
MichelRottleuthner
53cb3b087c
Merge pull request #9530 from Hyungsin/forupstream_xtimer
sys: xtimer concurrency/robustness improvement
2020-01-13 08:24:15 +01:00
Hyungsin
a18f9318c7 sys/shell/commands: reflecting xtimer's member change 2020-01-10 13:19:36 -08:00
Hauke Petersen
4f9d15d3b1 sys/shell/sc_nimble_netif: adapt event handling 2020-01-10 16:36:12 +01:00
Hauke Petersen
5746795735 shell/sc_nimble_netif: add timing info to ble info 2020-01-10 12:17:07 +01:00
Francisco
dcc5299682
Merge pull request #10667 from miri64/gnrc_sixloenc/enh/6lo-config
gnrc_netif: make 6LoENC dynamically configurable
2020-01-06 13:19:24 +01:00
Martine S. Lenders
5cf26f1adf
shell_commands: make 6Lo compression contexts configurable on non-6LBR 2019-12-20 14:55:55 +01:00
Hauke Petersen
210b1b2f75 sys/shell/sc_nimble_netif: adapt event callback 2019-12-18 17:06:57 +01:00
Martine S. Lenders
e1ae44b536
gnrc_sixlowpan_frag_stats: actualize pseudo-module
Having the definitions sit in the `net/gnrc/sixlowpan/frag.h` header
does not make much sense, when using Selective Fragment Forwarding
(and the fragmentation buffer already includes a
`net/gnrc/sixlowpan/frag/stats.h` header), so they are moved to their
own header. Since with this change it makes more sense to have the
statistics stored in their own sub-module, the pseudo-module is also
actualized.
2019-12-18 15:45:03 +01:00
8d040e5b4d
sys/shell: add missing stdio include in sc_loramac.c 2019-12-16 16:26:18 +01:00
Francisco Molina
1241bee080 sys/shell/commands/sc_interactive_sync: AVR puts to pgmspace 2019-12-15 20:27:56 +01:00
Hauke Petersen
3ffe08d07a shell/sc_nimble_netif: allow connect using name 2019-12-09 10:12:44 +01:00