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

6533 Commits

Author SHA1 Message Date
Martine S. Lenders
1f7770da5c gnrc_sixlowpan_frag: move public rbuf functions to their own module 2019-09-27 19:09:52 +02:00
Martine S. Lenders
2d9ba56c2c gnrc_sixlowpan_frag: move reassembly buffer to its own header 2019-09-27 18:34:02 +02:00
9e65405a68
Merge pull request #12309 from haukepetersen/fix_skald_develhelpbuild
ble/skald: remove broken assert in init()
2019-09-26 22:44:55 +02:00
Martine Lenders
062bc732ea
Merge pull request #11299 from llueder/ndp_cpp_compliant
net/ndp: make addr array ptr c++ compliant
2019-09-26 22:34:45 +02:00
Lasse Lueder
1b0fdf5a6f net/ndp: remove convenience pointer in ndp_opt_rdnss_t 2019-09-26 22:09:02 +02:00
Lasse Lueder
8a86ea4a4b use ndp_opt_rdnss_impl_t to access addresses 2019-09-26 22:08:49 +02:00
Lasse Lueder
93fd8b707c net/ndp define ndp_opt_rdnss_impl_t
The auxiliary struct internalizes the handy but non ISO-C++ compliant pointer to the payload in the packet struct. See PR #11299.
2019-09-26 22:08:28 +02:00
Hauke Petersen
1871c0cb85 ble/skald: remove broken assert in init() 2019-09-26 22:07:23 +02:00
Gaëtan Harter
a889e500f0 pthread: make pthread reaper stacksize configurable
new define 'CONFIG_PTHREAD_REAPER_BASE_STACKSIZE' to change pthread reaper for boards that need more stack
default value is 'THREAD_STACKSIZE_IDLE'
2019-09-25 16:14:29 +02:00
benpicco
e942f86837
Merge pull request #11056 from kb2ma/coap/pkt_api_block_write
net/gcoap: add/use Packet API Block implementation
2019-09-24 21:43:33 +02:00
Martine Lenders
58e3384cad
Merge pull request #12298 from brummer-simon/gnrc_tcp-allow_unknown_options
gnrc_tcp: allow unknown options
2019-09-24 20:55:14 +02:00
Martine Lenders
cecdd579cb
Merge pull request #12299 from pokgak/pr/credman_change_to_const_void
credman: change credman_buffer_t::s type to 'const void *'
2019-09-24 20:38:20 +02:00
Ken Bannister
68ccf4bdc5 net/gcoap: add module documentation for block use 2019-09-24 14:03:50 -04:00
Simon Brummer
fdda22c200 gnrc_tcp: allow unknown options 2019-09-24 20:01:40 +02:00
Aiman Ismail
dac69c5332 credman: change credman_buffer_t::s type to 'const void *' 2019-09-24 19:38:26 +02:00
José Alamos
dcbd12f01e
Merge pull request #12295 from benpicco/netif-phy_cfg_lora
shell_commands: gnrc_netif: only include LoRA options when LoRA PHY is present
2019-09-24 18:09:07 +02:00
Benjamin Valentin
c31e373214 shell_commands: gnrc_netif: only include LoRA options when LoRA PHY is present
If no LoRA module is used, there is no use in compiling in all the config options
for LoRA PHYs.

This saves about 1k of .text
2019-09-24 17:14:03 +02:00
Sören Tempel
30e4823e94 asymcute: don't make the assumption that req->arg is non-NULL
This fixes a denial of service where an attacker would be able to cause
a NULL pointer dereference by sending a spoofed packet. This attack only
requires knowledge about pending message ids.
2019-09-24 12:00:12 +02:00
Gunar Schorcht
e0f1ab0a16 cpu/esp32: module esp_can removed
CAN controller driver for ESP32 is no longer realized as separate module.
2019-09-20 19:35:02 +02:00
JulianHolzwarth
a4d0c8a8e7 sys/posix/pthread/pthread.c: reduce pthread reaper size 2019-09-20 15:07:49 +02:00
JulianHolzwarth
d6bc8685f7 sys/posix/pthread/pthread.c: create thread sleeping
creating the pthread sleeping and waking it up instead of THREAD_CREATE_WOUT_YIELD and then yielding(sched_switch)
2019-09-20 15:07:49 +02:00
JulianHolzwarth
28719bae37 sys/posix/pthread/pthread.c: check reaper creation
Checking whether or not the pthread reaper was created
And handeling the error when it was not created
2019-09-20 15:07:49 +02:00
JulianHolzwarth
31b3aeb48c sys/posix/pthread/pthread.c: Reaper fix
before the reaper was never created
2019-09-20 15:07:48 +02:00
Martine Lenders
3a4d1f9bb1
Merge pull request #12281 from aabadie/pr/ci/coccinelle_fix_remaining
tools/ci: fix remaining errors reported by coccinelle static check
2019-09-20 14:22:09 +02:00
Martine Lenders
440b2614b5
Merge pull request #12274 from miri64/gnrc_ipv6/fix/scan-build
gnrc_ipv6: fix scan-build errors
2019-09-20 09:35:40 +02:00
caf48cfb2d
sys/net/lwmac: remove not needed pkt pointer check 2019-09-20 09:01:08 +02:00
Martine S. Lenders
66fa240e9a gnrc_ipv6: fix scan-build errors 2019-09-20 08:59:55 +02:00
Kees Bakker
d9e0c6c859 sys/arduino: use 64bit usec to compute millis()
This is quick solution to avoid wrapping around after 4294967 milliseconds.
It uses xtimer_now_usec64 instead of xtimer_now_usec.

Notice that this is more expansive than the previous solution, especially
on AVR systems.
2019-09-19 19:52:43 +02:00
Martine S. Lenders
2c1a2863ce shell: make shell_run run shell forever
This change is in preparation to [PR 10788]. PR 10788 will make the
shell exitable which may lead to unexpected behavior in comparison to
previous usage of the shell.

To prevent this, this PR introduces two "new" functions to the shell's
API: `shell_run_once()` and `shell_run_forever()`.

`shell_run_once()` basically has the same behavior as `shell_run()` in
current master: Start a shell and continue reading lines until EOF is
reached.

`shell_run_forever()` wraps around `shell_run_once()` and restarts the
shell if it exits.

`shell_run()` is re-introduced as a back-porting alias for
`shell_run_forever()`.

As a consequence all current calls to `shell_run()` won't exit even
with [PR 10788] merged (which would add EOT as additional exit
condition for `shell_run_once()`).

[PR 10788]: https://github.com/RIOT-OS/RIOT/pull/10788
2019-09-19 10:26:31 +02:00
Dylan Laduranty
f276328491
Merge pull request #12267 from bergzand/pr/usbus/auto_tests
usbus: Add automated test
2019-09-19 09:52:48 +02:00
5b477918b6
usbus: Rework handling of set control requests 2019-09-19 09:29:52 +02:00
benpicco
7a818f0433
Merge pull request #12249 from nmeum/pr/gnrc_tcp_option_length_access
gnrc_tcp: check if option length field is present before accessing it
2019-09-17 23:22:53 +02:00
smlng
0f1eda14d5 sys/pipe: always include stdlib.h instead of malloc.h
The malloc.h file is deprecated on most systems and should not be
used, instead include stdlib.h which handles needed function in a
portable manner.
2019-09-17 20:43:33 +02:00
Martine Lenders
5631b698db
Merge pull request #11623 from miri64/gnrc_ipv6_ext/feat/ipv6-frag
gnrc_ipv6_ext_frag: Initial import of IPv6 fragmentation
2019-09-17 19:27:38 +02:00
Martine Lenders
51ef1c997d gnrc_ipv6: use fragmentation if available 2019-09-17 18:55:18 +02:00
Martine Lenders
c2c3216c16 gnrc_ipv6_ext_frag: Initial import of IPv6 fragmentation 2019-09-17 18:55:18 +02:00
Ken Bannister
80c5baad0e
Merge pull request #12234 from kb2ma/coap/doc_option_order
net/coap: Document requirement to add CoAP options in order
2019-09-16 18:44:41 -04:00
Sören Tempel
e5503d62bf gnrc_tcp: check if option length field is present before accessing it
TCP options have up to three fields (kind, length, value). The
current code only checks for the presence of the first field. Before
accessing the second field (length) the code must ensure that a length
field is even present.
2019-09-16 21:13:51 +02:00
benpicco
018c15ae0c
Merge pull request #12253 from nmeum/pr/gnrc_tcp_option_length_check
gnrc_tcp: Always ensure that option->length doesn't exceed opt_left
2019-09-16 21:02:52 +02:00
Martine Lenders
4905a1ad49 gnrc_ipv6_ext: use fragment reassembly if available 2019-09-16 19:13:18 +02:00
Martine Lenders
f4b8ba32f3 gnrc_ipv6_ext_frag: Initial import of IPv6 reassembly 2019-09-16 19:13:18 +02:00
Martine Lenders
409e04267f
Merge pull request #12250 from miri64/gnrc_netif_ethernet/fix/debug-output
gnrc_netif_ethernet: fix debug output for received packet
2019-09-16 19:04:05 +02:00
Sören Tempel
463c1212c2 gnrc_tcp: Always ensure that option->length doesn't exceed opt_left 2019-09-16 17:52:25 +02:00
benpicco
92d5428d2e
Merge pull request #12248 from cladmi/pr/makefile_base/thin_archive_fix
Makefile.base: implement relative path linking without 'realpath'
2019-09-16 17:05:53 +02:00
Gaëtan Harter
a1f0651170
Revert "sys/arduino: work around llvm-ar bug."
This reverts commit 72f934f13d.

Not required anymore as 'ar' is not executed in the object directory
anymore.
2019-09-16 15:52:36 +02:00
Martine S. Lenders
1ca05f0c08 gnrc_netif_ethernet: fix debug output for received packet
A received packet is outputted in DEBUG _after_ it was already parsed,
but with a reference to the already parsed header. The result is that
there can be some garbage in the output and the packet is not dumped in
total. As without parsing we do not have access to the header yet, we
use the `gnrc_netif_addr_to_str()` helper function instead of parsing
the destination address by hand.
2019-09-16 14:01:16 +02:00
Martine Lenders
1dcf88efb2
Merge pull request #12245 from nmeum/pr/gnrc_tcp_unknown_option
gnrc_tcp: abort on unknown option
2019-09-16 13:01:01 +02:00
Martine Lenders
56e6887a95
Merge pull request #12079 from nmeum/pr/gnrc_tcp_gnrc_pktbuf_add
gnrc_tcp: Fix invocation of gnrc_pktbuf_add
2019-09-16 12:41:57 +02:00
Sören Tempel
9764697a3b gnrc_tcp: abort on unknown option 2019-09-16 12:18:24 +02:00
benpicco
6c95081e42
Merge pull request #10556 from gschorcht/drivers_pca9685
drivers: support for NXP PCA9685 I2C 16-channel, 12-bit PWM controller
2019-09-15 19:20:29 +02:00
benpicco
65b7102608
Merge pull request #10195 from jcarrano/thin-archives
Makefile.base: use thin static archives.
2019-09-15 13:04:25 +02:00
Ken Bannister
5b0aacc9cf net/nanocoap_sock: insert doc to add options in order 2019-09-15 05:38:58 -04:00
Ken Bannister
414c68a654 net/gcoap: insert doc to add options in order 2019-09-15 05:38:32 -04:00
Ken Bannister
d9d8d92429 net/nanocoap: reinsert doc to add options in order 2019-09-15 05:37:26 -04:00
Ken Bannister
1ea66c713b net/nanocoap_sock: refactor Options API doc 2019-09-14 10:56:38 -04:00
Ken Bannister
3497c67917 net/gcoap: refactor Options API doc 2019-09-14 10:56:38 -04:00
Ken Bannister
0c5706969c net/nanocoap: refactor Options API doc 2019-09-14 10:56:38 -04:00
Ken Bannister
55c18947bd net/nanocoap: doc emphasize application API 2019-09-14 08:13:50 -04:00
Juan I Carrano
9cf1da9f04
Merge pull request #11935 from fjmolinas/pr_schedstatistics_module
sys: add schedstatistics module
2019-09-13 15:09:12 +02:00
Francisco Molina
1caf6610cb sys: add schedstatistics module 2019-09-13 11:37:44 +02:00
benpicco
66ce29d94c
Merge pull request #12051 from OTAkeys/fix/isotp
can/isotp: fix closing connection and improve flow control handling
2019-09-12 23:01:58 +02:00
Schorcht
72eb93626a sys/auto_init: SAUL support for PCA9685 PWMs 2019-09-12 19:13:20 +02:00
Juan I Carrano
e9ca2114ee
Merge pull request #12204 from cladmi/pr/pthread/enable_avr
pthread_cond.h: use 'sys/types.h' value of 'clockid_t' for avr. Enables pthread on AVR.
2019-09-12 16:41:59 +02:00
benpicco
bf2aaa1a5d
Merge pull request #12049 from Sizurka/fix-asymcute-reconnect
asymcute: Reset keepalive counter on connection ACK
2019-09-12 15:55:11 +02:00
Martine Lenders
af45ebecec
Merge pull request #12208 from pokgak/wolfssl_pkg_desc
wolfssl: improve documentation
2019-09-12 15:11:40 +02:00
Ken Bannister
1621cc1d39
Merge pull request #12075 from kb2ma/coap/options_get_opaque
net/nanocoap: get option bytes
2019-09-12 09:00:27 -04:00
Aiman Ismail
083c8f79c0 net/dtls: add reference to wolfssl pkg 2019-09-12 14:58:16 +03:00
Martine Lenders
8911c514fd
Merge pull request #10951 from miri64/gnrc_ipv6_nib/enh/abr-helpers
shell/sc_gnrc_ipv6_nib: extend for ABR
2019-09-12 07:34:09 +02:00
Martine Lenders
1656162835 shell_commands: gnrc_ipv6_nib: remove unnecessary cast 2019-09-11 23:51:20 +02:00
Martine Lenders
28ac07d8e5 shell/sc_gnrc_ipv6_nib: extend for ABR
Adds functionality to list and edit authoritative border router list.
2019-09-11 23:51:20 +02:00
Martine Lenders
b77e08652e gnrc_ipv6_nib: provide ABR iteration and print function 2019-09-11 23:51:20 +02:00
dd99cea622
usbus: rename setup request to control request
This commit changes the name of the requests over the control endpoints
to control requests instead of setup requests. This is a terminology fix
to follow the USB specification more closely as technically only the
first stage of a control request is named setup which contains a setup
packet. The whole transfer is a control transfer.
2019-09-11 21:39:05 +02:00
benpicco
ca6009592f
Merge pull request #11781 from fjmolinas/pr_schedstatistics_refactor
core/schedstatistics: fix call to uninitialized xtimer
2019-09-11 20:11:55 +02:00
Gaëtan Harter
624957252e
pthread_cond.h: use 'sys/types.h' value of 'clockid_t' for avr
This enables 'pthread' support on arduino.

avr-libc C90 'time.h' does not include 'sys/types.h' as POSIX expects it.
However, the type previously defined conflicts with the one in
'cpu/atmega_common/avr_libc_extra/include/sys/types.h' when both are
included, so include 'sys/types.h'.

Maybe it should alway be included by 'time.h' but this
would need its specific review.
2019-09-11 18:25:10 +02:00
Juan I Carrano
00e0a1cf13
Merge pull request #12056 from JulianHolzwarth/pr/posix/pthread/small_insert_fix
sys/posix/pthread/pthread.c: fix thread count limiting in pthread_create()
2019-09-11 18:22:54 +02:00
Kevin "Tristate Tom" Weiss
d6af98b5b7
Merge pull request #11835 from miri64/gnrc_sixlowpan_frag/new/stats
gnrc_sixlowpan_frag_stats: initial import of frag statistics
2019-09-11 12:01:22 +02:00
Ken Bannister
39eddce078 net/nanocoap: add function to retrieve opaque option 2019-09-11 05:40:14 -04:00
Martine Lenders
0ab0a19871 shell_commands: add command to get 6lo frag statistics 2019-09-11 10:30:29 +02:00
Martine Lenders
dca3408167 gnrc_sixlowpan_frag_stats: initial import of frag statistics 2019-09-11 10:30:29 +02:00
Martine Lenders
0c24bfcd0d shell_commands: fix ping6 response check for multicast 2019-09-10 21:50:23 +02:00
benpicco
720db1ab1e
Merge pull request #11262 from OTAkeys/fix/can_crash
can: fix a race condition with tx_list
2019-09-10 19:28:14 +02:00
Juan Carrano
72f934f13d sys/arduino: work around llvm-ar bug.
llvm-ar behaves weidly when creating thin archive. This only manifests
itself when using arduino sketches as these are built from the "bin"
directory.

Specifically, given a directory "m" and an object in "m/obj.o " an
invocation with CWD==m:

```
llvm-ar rcTs ../m.a obj.o
```

Will create a maformed archive. Binutils does not have any issue with this.

The following command, executed with CWD==m/.. works:

```
llvm-ar rcTs m.a m/obj.o
```

The trick used in this commit is to put the source files in a different
directory than the object files and compile from there.
2019-09-10 17:53:07 +02:00
francisco
3d62fa05b8 core/schedstatistics: refactor
- add init_schedstatistics function to be called after
  auto_init, that way xtimer_is init is called before
  the first call to xtimer_now
- register schedstatics code as a callback to be executed
  on each sched_run()
2019-09-10 17:07:54 +02:00
Martine Lenders
9e33c04e3d
Merge pull request #9404 from OTAkeys/pr/can_memarray
can: use memarray for pkt and router allocation
2019-09-10 16:28:31 +02:00
Marian Buschsieweke
b87ab96d17
Merge pull request #10661 from miri64/gnrc_netif_hdr/enh/netif_setter
gnrc_netif_hdr: add setter for netif
2019-09-10 16:14:28 +02:00
Javier FILEIV
ced8094e1a can_pm: if powered up by raw interface, fix sleeping timer. 2019-09-10 13:04:52 +02:00
Vincent Dupont
6bbb908d59 can/pkt: free pkt on bus off error 2019-09-10 13:04:52 +02:00
Vincent Dupont
d3fac6f5ac can/conn: use non-blocking function from timer interupts 2019-09-10 13:04:52 +02:00
Vincent Dupont
c9211f9c06 can: fix race condition in tx_list 2019-09-10 13:04:52 +02:00
Vincent Dupont
9207e6b446 can: use memarray for pkt and router allocation 2019-09-10 13:01:28 +02:00
Martine S. Lenders
cee1b7296d gnrc_icmpv6_echo: use gnrc_netif_hdr_set_netif() also for loopback 2019-09-10 12:37:32 +02:00
04d33973f4
sys/log: add colored logging module 2019-09-09 20:27:16 +02:00
88e07c06d2
Merge pull request #11367 from maribu/arm_early_stdio
cpu: Moved stdio_init() prior to periph_init() for ARM targets
2019-09-09 16:52:30 +03:00
Sebastian Meiling
9f5951d216
Merge pull request #10214 from bergzand/pr/nanocoap/flags_uint32t
nanocoap: change method flag type to uint16_t
2019-09-09 12:33:17 +03:00
Martine Lenders
58d621611f
Merge pull request #12175 from shr70/icmpv6_error_fix
[gnrc_icmpv6_error] Fixed multicast detection
2019-09-09 11:32:31 +02:00
Leandro Lanzieri
563a053bc1
Merge pull request #10983 from skullbox305/driver_ph_oem
drivers/ph_oem: support for Atlas Scientific pH OEM sensor
2019-09-09 10:18:49 +02:00
Sebastian Meiling
c78ae0e33c
Merge pull request #12074 from kb2ma/coap/options_iterate
net/nanocoap: iterate options
2019-09-09 10:51:23 +03:00
bde253cca3
gcoap: use coap_method_flags_t 2019-09-09 09:40:14 +02:00
4d399bf444
nanocoap: change method flag type to uint32_t 2019-09-09 09:40:14 +02:00
Ken Bannister
113dd645bf
Merge pull request #10193 from bergzand/pr/coap/include_rfc8428_rfc8132
coap: Update list of defines for "PATCH and FETCH Methods" and SenML
2019-09-08 19:14:40 +03:00
Kees Bakker
35c5869a2e
Merge pull request #12117 from maribu/arduino-println
sys/arduino: Extended Serial.print() / println()
2019-09-07 21:16:43 +02:00
Marian Buschsieweke
df27dbef7a
cpu: Moved stdio_init() into cpu_init()
- Removed stdio_init() from newlib's _init(), as this is too late in the boot
  process to allow DEBUG()ing during periph_init()
- Added stdio_init() to the various cpu_init() routines of the ARM CPUs just
  before periph_init()
2019-09-06 16:54:23 +02:00
JulianHolzwarth
d76bb689d6 sys/posix/pthread/pthread.c: pthread_create fix
The function insert returns KERNEL_PID_UNDEF now because pthread_create checks for it.
In pthread_create it checks now if thread_create returns a valid pid
2019-09-06 15:54:59 +02:00
steffen
485dbd1fda [gnrc_icmpv6_error] Fixed multicast detection
before this commit the src address was checked for multicast, but the dst address should be checked. Therefore udp multicast packets would be flooded back to the src as ICMPv6 error, as not all nodes had a UDP receiver registered.
2019-09-05 19:22:43 +02:00
Francisco Molina
1357f46c47 pkg/semtech-loramac: add uplink_counter get/set functions 2019-09-05 16:01:32 +02:00
7bd9e68867
nanocoap: Add method flags for rfc8132 2019-09-05 13:00:22 +02:00
c4e48ea5e0
coap: update defines for sen(s)ml format types 2019-09-05 12:59:45 +02:00
bf51f35838
coap: update defines for rfc8132
Update the list of defines for methods and response codes with the new
codes as defined in [rfc8132](https://tools.ietf.org/html/rfc8132)
2019-09-05 12:55:17 +02:00
Igor Knippenberg
89082a3eb2 sys/auto_init: Added auto initialization for pH OEM driver 2019-09-05 12:47:10 +02:00
Igor Knippenberg
61d0970939 drivers/saul: Added pH
- added device class SAUL_SENSE_PH in saul.h
- added stringification SAUL_SENSE_PH in saul_str.c
2019-09-05 12:47:10 +02:00
Gunar Schorcht
140987fc3a sys/shell: cleanup the heap command approach
Replaces the special heap command approach of the lpc_common module with a more general heap command approach. Module lpc_common was already removed with PR #2118. PR #2118 integrated cpu/lpc_common code in cpu/lpc2387. With PR #3530 special heap handling for cpu/lpc2387 was replaced by newlib memory management which uses _sbrk_r to allocate chunks from the heap. _sbrk_r uses _sheap and _eheap symbols that are defined in lpc2387.ld and can be used together with mallinfo function for heap statistics.
2019-09-05 09:18:46 +02:00
benpicco
f421cb7d9d
Merge pull request #12116 from maribu/arduino-millis
sys/arduino: Added millis()
2019-09-05 04:12:46 +02:00
Marian Buschsieweke
d4aeca7469
sys/arduino: Extended Serial.print() / println()
- Serial.print() and Serial.println() have been extended to support:
    - unsigned int
    - long
    - unsigned long
- The SerialFormat BIN has been implemented
- Serial.println(void) has been added
2019-09-04 21:36:20 +02:00
benpicco
7f487ac807
Merge pull request #12131 from brummer-simon/gnrc_tcp-release_after_failed_send
gnrc_tcp - Release pakets on failed gnrc_netapi_send()
2019-09-03 15:59:21 +02:00
Francisco Molina
5e1558ba57 shell/commands: fix, only accept proper pong response 2019-09-03 09:07:29 +02:00
Simon Brummer
351220e884 gnrc_tcp - Release pakets on failed gnrc_netapi_send() 2019-08-31 11:16:55 +02:00
Daniele Lacamera
5cb76e521b posix_socket: set sock for returned socket on accept() 2019-08-30 21:18:25 +02:00
benpicco
837f99e757
Merge pull request #12084 from nmeum/pr/gnrc_tcp_minlen
gnrc_tcp: add minimum length check to _receive
2019-08-30 17:37:20 +02:00
benpicco
7d3f20b1a8
Merge pull request #12088 from nmeum/pr/gnrc_tcp_option_overflow
gnrc_tcp: fix integer underflow in option parser
2019-08-30 17:34:39 +02:00
Martine Lenders
3671f69a43
gnrc_rpl: use gnrc_netif_hdr_set_netif() 2019-08-29 14:51:46 +02:00
Martine Lenders
685f7f6b38
gnrc_lwmac: use gnrc_netif_hdr_set_netif() 2019-08-29 14:51:46 +02:00
Martine Lenders
3c105d8b33
gnrc_gomach: use gnrc_netif_hdr_set_netif() 2019-08-29 14:51:45 +02:00
Marian Buschsieweke
8cff47304b
sys/arduino: Make use of US_PER_MS in delay() 2019-08-29 13:57:56 +02:00
Marian Buschsieweke
27eca42f48
sys/arduino: Added millis()
Added arduino-compatilbe "unsigned long millis()"
2019-08-29 13:36:15 +02:00
Hauke Petersen
33eb83ff42 sys/shell/nimble: make default name more generic 2019-08-29 11:23:51 +02:00
Hauke Petersen
de890bd9a8 sys/shell/nimble: only print ip addr if ipv6 is used 2019-08-29 11:23:51 +02:00
Hauke Petersen
a3b8c87ab5 sys/shell: add 'ble' shell cmd for nimble_netif 2019-08-28 16:48:42 +02:00
Hauke Petersen
1cb54659c3 net/ble.h: add l2cap cid and gapp svc id constants 2019-08-28 16:48:42 +02:00
Hauke Petersen
7f7993f1d6 bluetil/addr: fix byte ordering in addr_from_str() 2019-08-28 16:48:42 +02:00
Hauke Petersen
b7b5791930 sys/bluetil/addr: fix byte ordering in print funcs 2019-08-28 16:48:42 +02:00
Hauke Petersen
bcf2f2a2de sys/bluetil/addr: add doc in byte ordering 2019-08-28 16:48:41 +02:00
Hauke Petersen
218b547b3c net/bluetil/addr: add addr swapped copy function 2019-08-28 16:48:41 +02:00
Hauke Petersen
9df583457f net/l2util: fix addr conversion for BLE 2019-08-28 16:48:41 +02:00
Hauke Petersen
504acc5097 net/l2util: add nimble opt for addr resolution 2019-08-28 16:48:03 +02:00
Rotzbua
9cf0c3bc70 sys/net: fix typos in docu 2019-08-28 15:59:16 +02:00
Juan I Carrano
a6e26597c7
Merge pull request #11987 from miri64/nhdp/doc/deprecate
nhdp: deprecate module
2019-08-28 15:45:00 +02:00
Martine S. Lenders
056bd35e6c nhdp: deprecate module 2019-08-28 06:22:14 +02:00
Aiman Ismail
ede7edd313 sys/net pkg/: document DTLS support in net_dtls 2019-08-27 16:41:39 +02:00
Aiman Ismail
fed72571ec sys/net/sock: add sock_dtls API 2019-08-27 16:41:39 +02:00
Sören Tempel
7f3415e91d gnrc_tcp: Fix invocation of gnrc_pktbuf_add
The size parameter should specify the length of the given data.
2019-08-27 10:19:40 +02:00
Sören Tempel
c9358b9217 gnrc_tcp: fix integer underflow in option parser 2019-08-27 10:18:15 +02:00
Sören Tempel
0fff1b35ec gnrc_tcp: add minimum length check to _receive 2019-08-26 16:45:46 +02:00
Rotzbua
5a8bac399c
drivers/ccs811: sys/hashes: fix typo usefull -> useful 2019-08-25 21:27:55 +02:00
Ken Bannister
4e89741b79 net/nanocoap: add function to iterate over options 2019-08-24 06:51:29 -04:00
Ken Bannister
6c8e646b83 net/nanocoap: check for payload marker when parse option 2019-08-24 06:51:29 -04:00
Kevin "Tristate Tom" Weiss
1b1c902dd3
Merge pull request #12022 from JannesVolkens/tmp00x
driver/tmp00x: make tmp006 more generic
2019-08-23 13:26:09 +02:00
Jannes
90c4ef04ef driver/tmp00x: Change tmp006 to tmp00x and add tmp007
Rename TMP006 to TMP00x
Add TMP007 sensor support to TMP00X
Change uint8_t reg to uint16_t
Add to doxygen documentation group
Expose compile time configurations
Move defines from .c to .h
Change double to float, because double is not needed
Add TMP007 register information
2019-08-23 12:11:16 +02:00
Ken Bannister
78ea07d5e7 net/nanocoap: make coap_pkt_t param const 2019-08-21 13:20:49 -04:00
Sebastian Meiling
8e08748c60
Merge pull request #7654 from cladmi/pr/arduino_sketches.cpp
arduino/sketches: build sketches as a module
2019-08-21 15:22:45 +02:00
Gaëtan Harter
be30f072e2
sys/arduino/sketches: build sketches as a module
Generate a module for arduino sketches in a subfolder of BINDIR.
This prevents issues when doing concurrent builds or out of tree build with
readonly sources.

Declare all generated files as `BUILDDEPS` to be re-created after
`clean` on parrallel `clean all`.
2019-08-21 11:57:41 +02:00
Vincent Dupont
af66fe101d can/isotp: allow changing FC options at runtime 2019-08-21 11:16:56 +02:00
Vincent Dupont
32b00706e3 can/isotp: remove timers when closing connection
Timers were not properly removed leading to hard faults if it fires
after the connection is closed.
2019-08-21 11:16:56 +02:00
Derek Hageman
18910cf4e2 asymcute: Reset keepalive counter on connection ACK
When a keepalive timeout occurs keepalive_retry_cnt remains zero,
so when the connection is re-established _on_keepalive_evt will
immediately disconnect instead of actually sending a keepalive ping.

The sequence looks like:
  1. _on_connack: start con->keepalive_timer
  2. Server does not respond to keepalive pings
  3. _on_keepalive_evt: con->keepalive_retry_cnt reaches zero
  4. Connection torn down and ASYMCUTE_DISCONNECTED sent to application
  5. Application starts reconnection
  6. _on_connack: start con->keepalive_timer again
  7. First _on_keepalive_evt: con->keepalive_retry_cnt is still zero
  8. Repeat from 4.

So this simply resets keepalive_retry_cnt in _on_connack when
the keepalive timer is restarted.  It's a new connection, so
resetting the keepalive retry counter make senses regardless.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-08-20 17:23:05 -06:00
d6356bdc08
Merge pull request #11692 from maribu/fmt_table
sys/fmt: Added submodule fmt_table for printing tables
2019-08-20 22:18:54 +02:00
Peter Kietzmann
11b4bab101
Merge pull request #10340 from maribu/cc110x_rewrite
drivers/cc110x: Complete rewrite from scratch
2019-08-20 17:58:21 +02:00
Marian Buschsieweke
88cf6cb46f
sys/auto_init/netif: Increased cc110x stack size
With the increase of the message queue size from 8 to 16 in
946b06e4f0, the default stack became too small.
This changes the stack size to grow with the message queue size.
2019-08-20 16:38:49 +02:00
Marian Buschsieweke
972367432a
drivers/cc110x: Rewrite of the cc110x driver
The cc110x driver has been re-written from scratch to overcome the limitations
of the old driver. The main motivation of the rewrite was to achieve better
maintainability by a detailed documentation, reduce the complexity and the
overhead of the SPI communication with the device, and to allow to
simultaneously use transceivers with different configuration regarding the used
base band, the channel bandwidth, the modulation rate, and the channel map.

Features of this driver include:

- Support for the CC1100, CC1101, and the CC1100e sub-gigahertz transceivers.
- Detailed documentation of every aspect of this driver.
- An easy to use configuration API that allows setting the transceiver
  configuration (modulation rate, channel bandwidth, base frequency) and the
  channel map.
- Fast channel hopping by pre-calibration of the channels during device
  configuration (so that no calibration is needed during hopping).
- Simplified SPI communication: Only during start-up the MCU has to wait
  for the transceiver to be ready (for the power regulators and the crystal
  to stabilize). The old driver did this for every SPI transfer, which
  resulted in complex communication code. This driver will wait on start up
  for the transceiver to power up and then use RIOT's SPI API like every other
  driver. (Not only the data sheet states that this is fine, it also proved to
  be reliable in practise.)
- Greatly reduced latency: The RTT on the old driver (@150 kbps data rate) was
  about 16ms, the new driver (@250 kbps data rate) has as RTT of ~3ms
  (depending on SPI clock and on CPU performance) (measured with ping6).
- Increased reliability: The preamble size and the sync word size have been
  doubled compared to the old driver (preamble: 8 bytes instead of 4,
  sync word: 4 byte instead of 2). The new values are the once recommended by
  the data sheet for reliable communication.
- Basic diagnostic during driver initialization to detect common issues as
  SPI communication issues and GDO pin configuration/wiring issues.
- TX power configuration with netdev_driver_t::set() API-integration
- Calls to netdev_driver_t::send() block until the transmission has completed
  to ease the use of the API (implemented without busy waiting, so that the
  MCU can enter lower power states or other threads can be executed).
2019-08-20 16:32:11 +02:00
benpicco
20dec77e39
Merge pull request #11999 from nmeum/pr/gnrc_tcp_mark_update
net/gnrc/tcp: fix invalid read
2019-08-20 15:37:17 +02:00
Marian Buschsieweke
26d73116f6
sys/fmt: Added submodule fmt_table
print_col_u32_dec() / print_col_s32_dec() can be used to print an
uint32_t / int32_t as a column of the given width
2019-08-20 14:32:49 +02:00
benpicco
f483988ae9
Merge pull request #12001 from nmeum/pr/gnrc_tcp_memory_leak
gnrc_tcp: Fix memory leak, potential DOS
2019-08-19 14:42:13 +02:00
Marian Buschsieweke
615e25f319
drivers: Removed driver for CC110x transceivers
- Removed cc110x driver
- Updated all makefiles
- Kept both board specific configurations and support for it in RIOT's
  upper layers, so re-implementations don't need to start from zero
2019-08-19 12:56:47 +02:00
Vincent Dupont
5a953a2137
Merge pull request #11991 from gschorcht/cpu/stp32_common/can/auto-init-cleanup
sys/auto_init/can: cleanup for STM32 CAN controller driver
2019-08-19 09:40:36 +02:00
913614ef04
Merge pull request #11004 from jcarrano/shell_cancel_line_ctrl-c
sys/shell: cancel current line on CTRL-C.
2019-08-16 13:00:33 +02:00
Sebastian Meiling
226ace7bb6
Merge pull request #9852 from bergzand/pr/rpl/fix_debug_hdrs
gnrc_rpl: remove DEBUG from header files
2019-08-16 11:27:48 +02:00
b33ee93d22
gnrc_rpl: remove DEBUG from header files
This conflicts with the DEBUG setting in C files that include these
headers making it impossible to enable the DEBUG setting in these C
files.
2019-08-16 10:11:41 +02:00
Juan Carrano
fa9337d73c sys/shell: cancel current line on CTRL-C.
CTRL-C cancels the current line, similar to how getty works.

This is useful if one is using a dumb terminal to communicate with
a node, as it saves having to repeatedly type backspace to discard the
current line. It also helps when connecting to an already running node,
as one does not know what is on the line buffer, the safest thing to do
is to begin by sending a ctrl-C.

This is a suggestion of @benemorius.
2019-08-15 17:13:42 +02:00
Gaëtan Harter
027426793c
test_utils_interactive_sync: add a helper for synchronizing tests
Add an implementation that waits for 's' to print 'START' and return.
If 'r' is given is prints 'READY' to allow querying for state.

The help and answered string have to be different to not match the other.
Using puts/getchar was smaller than using `stdio_read/stdio_write` on the
example I tested with `esp32`.
2019-08-15 12:26:28 +02:00
Marian Buschsieweke
c225636966
Merge pull request #10555 from gschorcht/irq_handler
sys: single interrupt handler thread for interrupts in modules with blocking functions
2019-08-13 15:08:53 +02:00
Gunar Schorcht
82e020fb81 sys/irq_handler: single interrupt handler thread
Single thread for handling interrupts that may trigger blocking  functions and therefore may only be called in thread context.
2019-08-13 14:49:10 +02:00
Sören Tempel
c6df2064af gnrc_tcp: Fix memory leak 2019-08-12 23:14:15 +02:00
Sören Tempel
9e91d21625 net/gnrc/tcp: fix uninitialized memory access
From the gnrc_pktbuf_mark documentation:

	    It's not guaranteed that `result->data` points to the
	    same address as the original `pkt->data.

Thus it should be necessary to update the `hdr` pointer.
2019-08-12 22:04:35 +02:00
Sören Tempel
3396743bab gnrc_pktbuf: fix typo (guaranteeed → guaranteed) 2019-08-12 22:00:14 +02:00
Juan I Carrano
b48afd6375
Merge pull request #11807 from JulianHolzwarth/pr/xtimer_mutex_lock_timeout/first_fix_improvements
sys/xtimer/xtimer.c: _mutex_timeout() cleanup
2019-08-09 19:23:16 +02:00
Gunar Schorcht
ba00269dc9 sys/auto_init/can: cleanup for STM32 CAN controller
Initialization code for module `can_stm32` is obsolete since the STM32 CAN controller driver isn't a module anymore.
2019-08-09 18:23:05 +02:00
JulianHolzwarth
c1f58186cb xtimer/xtimer.c: sched_switch instead of yield
because of pr #11759: not all boards check for is_in_irq when thread_yield_higher
2019-08-09 17:29:40 +02:00
JulianHolzwarth
1bcb4fcc5f xtimer/xtimer.c: _mutex_timeout improvements
Only yields and change threads status when thread was removed from mutex list.
2019-08-09 17:29:40 +02:00
JulianHolzwarth
a321dfc51d xtimer/xtimer.c: ensure modifing mutex is done with interrupt disabled
if xtimer_set spins the callback is executed in the thread context.

comment to explain irq_disable
and when this line could be removed
(when xtimer stops executing the callback funtion from thread context)
2019-08-09 17:28:54 +02:00
Francisco
56a6e5d53e
Merge pull request #11933 from miri64/shell/fix/check-sender
shell_commands: check ICMPv6 echo reply sender
2019-08-09 16:27:39 +02:00
Martine Lenders
c12bd5edb1
Merge pull request #11938 from miri64/shell_commands/enh/now-id
shell_commands/ping6: mix-in current time into ID
2019-08-09 12:56:54 +02:00
Francisco
fde50372c3
Merge pull request #11837 from miri64/gnrc_netif/enh/inter-tx-wait
gnrc_netif: allow for wait of minimum time between sends
2019-08-09 10:53:26 +02:00
Martine Lenders
488c47cbf3 gnrc_netif: allow for wait of minimum time between sends 2019-08-09 10:21:42 +02:00
Martine Lenders
af5bf360a0
Merge pull request #11575 from miri64/posix_socket/fix/init-uninit-fields
posix_socket: initialize uninitialized fields
2019-08-08 15:56:48 +02:00
Martine Lenders
3bcb1ee2ef posix_socket: initialize uninitialized fields 2019-08-08 15:03:28 +02:00
Kevin "Bear Puncher" Weiss
10a2794c8e
Merge pull request #11970 from miri64/gnrc_ipv6/fix/check-source-for-send
gnrc_ipv6: check validity of preconfigured source on send
2019-08-08 13:39:47 +02:00
Martine S. Lenders
7f2cc4f0b3 gnrc_ipv6: check validity of preconfigured source on send
If an address was pre-configured by the upper layer its validity is
currently ignored. It is neither checked if the address is on the
interface at all nor is it checked if it is valid.

This change provides a fix for that by checking both facts.
2019-08-08 13:16:28 +02:00
Hauke Petersen
02df6ab13f
Merge pull request #11000 from miri64/gnrc_sixlowpan_frag/new/vrb
gnrc_sixlowpan_frag: initial import of the VRB
2019-08-07 17:33:01 +02:00
Martine Lenders
a06b84dbcd
Merge pull request #11965 from pokgak/credman-add-credential-type-docs
credman: add documentation for enum credman_type_t
2019-08-07 16:33:03 +02:00
Martine Lenders
1f1ff16e3c gnrc_sixlowpan_frag: include VRB in normal GC 2019-08-07 16:19:36 +02:00
Martine Lenders
26a526eaee gnrc_sixlowpan_frag: initial import of the VRB
VRB = virtual reassembly buffer
2019-08-07 16:18:19 +02:00
Aiman Ismail
0c542f6605 credman: add documentation for enum credman_type_t 2019-08-07 14:00:39 +02:00
Juan I Carrano
ff57a904e3
Merge pull request #10271 from mtausig/aes_rv
Fix return value of aes_init for keys of incorrect length
2019-08-07 13:26:25 +02:00
Mathias Tausig
66edeeb9c6 crypto: aes_init(): Fail correctly when called with bad key length
A proper error code is returned if a key with unsupported (either by the implementation or the AES algorithm) length is passed to aes_init.
This fixes Issue #10175
2019-08-07 11:02:16 +02:00
Mathias Tausig
0352c7406d crypto: Fix code style 2019-08-07 11:02:16 +02:00
Benjamin Valentin
9311e05fcf sys/arduino: reduce scope of adc_line_state
This makes cppcheck happy.
2019-08-06 19:43:54 +02:00
Benjamin Valentin
0c98b79e2f sys/shell: reduce scope of variable 'entry' 2019-08-06 19:43:54 +02:00
Benjamin Valentin
9279733ed2 sys/shell: remove superfluous explicit cast 2019-08-06 19:43:54 +02:00
Benjamin Valentin
e8dc1119b8 sys: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +02:00
e352b54a9b
net/gnrc/tcp: remove duplicate net_gnrc_tcp group definitions 2019-08-05 16:57:37 +02:00
f922df8c99
net/gnrc/sock: remove duplicate net_gnrc_sock group definition 2019-08-05 16:57:37 +02:00
998fd6bcc9
sys/pthread: deduplicate pthread group definition 2019-08-05 16:57:36 +02:00