Commit graph

447 commits

Author SHA1 Message Date
Billy Kozak
ca0f32f45b Use collisions for csma backoff and retry
The collision count is now used in the calculation fot the CSMA
backoff and transmission will fail after a certain number of
collisisons.
2016-04-25 08:00:56 -06:00
kkrentz
39921f1231 rdc.h: Read LLSEC802154_ENABLED instead of LLSEC802154_CONF_ENABLED 2016-04-25 03:10:42 -07:00
Simon Duquennoy
e1ea4955c7 TSCH: remove 'not for us' log 2016-04-25 11:51:43 +02:00
Ralf Schlatterbeck
53dd2e5d16 Fix unused variable warning 2016-04-22 12:34:16 +02:00
kkrentz
4a88e9e537 llsec: Removed TSCH_SECURITY_CONF_LEVEL and TSCH_SECURITY_LEVEL 2016-04-13 09:16:08 -07:00
kkrentz
10d8b05bc6 llsec: Permit dynamic security levels 2016-04-13 07:54:46 -07:00
kkrentz
0379af3624 llsec: Do not define surrogates in packetbuf.h, as otherwise configuration errors go unnoticed 2016-04-13 07:54:46 -07:00
Antonio Lignan
8f064511d3 Merge pull request #1213 from joakimeriksson/dao_ack_handling
End-to-End DAO and DAO ACK handling for Contiki RPL.
2016-04-11 18:53:43 +02:00
thomas-ha
2a69999214 space instead of tab 2016-04-05 17:12:48 +02:00
thomas-ha
871c725144 spaces instead of tabs 2016-03-31 11:24:57 +02:00
Carlo Vallati
855703e936 Fixed a bug into tsch-schedule - tsch_schedule_add_link that causes deadlock if a new link cannot be created 2016-03-31 10:35:19 +02:00
Oliver Schmidt
111a976f1e Explicitly mark constant as 'unsigned' to avoid unnecessary promotion to 'long'.
Long constants trigger the performance warning "Constant is long" with cc65.
2016-03-28 14:39:16 +02:00
Joakim Eriksson
444015df67 refactored the rpl-nbr-policy to be called from nbr-table module 2016-03-26 09:45:37 +01:00
thomas-ha
2d9b53667f not leaving promiscuous mode anymore if TSCH_HW_FRAME_FILTERING disabled 2016-03-16 12:24:49 +01:00
Simon Duquennoy
3057cb3363 TSCH: reset now also flushes all queues and resets backoff exponents 2016-03-15 16:24:04 +01:00
Simon Duquennoy
4b4ea36e9b TSCH: substract RADIO_DELAY_BEFORE_DETECT from ACK timestamp (more accurate timeout for the following busy wait) 2016-03-15 16:23:57 +01:00
Simon Duquennoy
0fd097f821 TSCH: bound max packet size to the system's packetbuf size 2016-03-15 16:23:57 +01:00
Simon Duquennoy
0aa36eaa0a TSCH: explicitly turn radio off after ACK tx 2016-03-15 16:23:57 +01:00
thomas-ha
38348b8703 enable/disable HW frame filtering
enable/disable HW frame filtering as defined in TSCH_CONF_HW_FRAME_FILTERING
2016-03-08 15:50:37 +01:00
thomas-ha
6e5e1d05cd TSCH: define to enable/disable HW frame filtering 2016-03-08 15:48:16 +01:00
Simon Duquennoy
73fcfa42c2 TSCH: fix compiler warning that shows up when disabling TSCH_LOG_LEVEL 2016-03-07 17:42:17 +01:00
Harald Pichler
428131e8a8 use dynamic sleep for loop 2016-01-06 21:57:29 +01:00
Simon Duquennoy
cc58384b40 jn516x: remove temporary adjustements for compilation in a 802.15.4e-free Contiki 2015-12-07 11:51:50 +01:00
Atis Elsts
d79ce957a1 Adaptive time synchronization for TSCH 2015-12-07 11:51:41 +01:00
Simon Duquennoy
7eabf8d391 TSCH: latest update from https://github.com/EIT-ICT-RICH/contiki 2015-12-04 15:21:58 +01:00
Simon Duquennoy
2ca7a1a79f TSCH security: port to new ccm-star and llsec APIs 2015-12-04 15:21:56 +01:00
Simon Duquennoy
b0f936263e Added IEEE 802.15.4e TSCH (TimeSlotted Channel Hopping) MAC layer 2015-12-04 15:21:52 +01:00
Simon Duquennoy
ecba49c282 Add support for IEEE 802.15.4e Information Elements (IEs). All IEs used by TSCH are currently included. 2015-12-04 15:21:50 +01:00
Simon Duquennoy
5cf9871d5b Added support for IEEE 802.15.4 frame version 2 2015-12-04 15:21:50 +01:00
Atis Elsts
b5d17bb620 ContikiMAC: use RTIMER_GUARD_TIME #define to avoid accidentally scheduling a rtimer in the past on platforms with fast rtimer ticks 2015-12-03 17:37:26 +01:00
Simon Duquennoy
27fd590b51 Merge pull request #1228 from bkozak-scanimetrics/contikimac_replace_function_pointer_cast
Replaced function pointer cast in contikimac
2015-12-01 15:35:28 +01:00
Antonio Lignan
d31ba8dfdc Replaced tabs leftover in previous commit 2015-11-24 10:21:23 +01:00
Antonio Lignan
e2cf8f9868 Made ContikiMAC more configurable (on uknoblic behalf) 2015-11-23 14:03:51 +01:00
Simon Duquennoy
fbd78a7e3b Merge pull request #1293 from simonduq/pr/fix-warnings
Fix a number of compiler warnings and enable -Werror in Travis
2015-11-10 08:49:11 +01:00
Simon Duquennoy
b979beb075 Merge pull request #1167 from bkozak-scanimetrics/contikimac_fix_qsend_list_packetbuf_pending
Fix Mishandling of PENDING/Queued Packets at ContikiMAC and CSMA
2015-10-23 10:52:17 +02:00
Simon Duquennoy
5dd6261fef Nullrdc: added missing include for cooja nodes 2015-10-20 10:11:15 +02:00
Konrad Krentz
1a12ef3334 llsec: Unsecuring within parse 2015-10-14 08:22:44 -07:00
Konrad Krentz
2059b6559e llsec: Let llsec_drivers define their own framer 2015-10-14 08:21:40 -07:00
Nicolas Tsiftes
a536801e24 Merge pull request #657 from atiselsts/networking_patches
Phase RDC memory allocation bugfix
2015-09-24 16:50:00 +02:00
Billy Kozak
467f28286c The CSMA driver no longer throttles queued packets
Fix for #1166

Updated the CSMA driver so it no longer applies a time delay for
sending queued packets which were sent without error.
2015-09-18 09:35:29 -06:00
Billy Kozak
32e668ae2a Fix for #1165
It is possible that packetbuf is modified by the call to
mac_call_sent_callback. If this occurs ContikiMAC will not be able to
recognize that a packet is pending.

This fixes this problem by storing pending status in a local variable before
calling mac_call_sent_callback.
2015-09-18 09:33:10 -06:00
Harald Pichler
6b41f23d59 make mcusleep variable, use mcusleepcycle 2015-09-15 09:52:06 +02:00
Simon Duquennoy
63ddba93a9 Merge pull request #1169 from feshie/pr-warnings-fix
Fix multiple warnings (TCPIP, coap-observe, msp430, z1/tmp102, ContikiMAC)
2015-09-08 09:05:44 +02:00
Billy Kozak
7b27ad64ca Replaced function pointer cast in contikimac
Replaced a cast of the funciton pointer to powercycle with a
wrapper calling powercycle which has the correct signature.

The previous implementation was an instance of undefined behaviour
according to the C standard.
2015-09-01 10:16:43 -06:00
Harald Pichler
500078ef9a update to contiki 3.0 2015-08-26 16:01:57 +02:00
Atis Elsts
b75f673801 RDC phase optimization: correct the behavior in case of memory allocation failure
phase_wait did not check whether queuebuf_new_from_packetbuf() returns NULL. This potentially causes send_packet to behave incorrectly; the proper packet would not be sent out (because queuebuf_to_packetbuf(NULL) is a no-op). Instead, whatever has been left in the packet buffer by its previous user will be sent out.
2015-08-14 16:37:00 +02:00
Simon Duquennoy
dc4de9d001 Merge pull request #1161 from g-oikonomou/contrib/contikimac-sw-ack
Implement TX of S/W ACKs with ContikiMAC
2015-08-04 13:15:03 +02:00
Arthur Fabre
8739113308 Fix warnings in ContikiMAC
../..//core/net/mac/contikimac/contikimac.c:503:11: warning: variable
‘seqno’ set but not used [-Wunused-but-set-variable]
../..//core/net/mac/contikimac/contikimac.c:496:7: warning: variable
‘len’ set but not used [-Wunused-but-set-variable]

Both of these variables are only used if RDC_CONF_HARDWARE_ACK is not
true.
Their definitions and use have been moved into #ifdef guards so they do
not appear if RDC_CONF_HARDWARE_ACK is set.
2015-07-16 13:49:31 +01:00
George Oikonomou
315f6fe535 Implement TX of S/W ACKs with ContikiMAC 2015-07-12 00:07:33 +01:00
George Oikonomou
503a992887 Make ContikiMAC more configurable
Allow the project / platform to provide values for CCA_SLEEP_TIME and LISTEN_TIME_AFTER_PACKET_DETECTED.

This is useful for sub-ghz operation.

This has been shamelessly stolen from the [Mountain Sensing project](https://github.com/feshie/contiki)

@heliosfa @kmartinez
2015-07-11 23:55:44 +01:00
Benoît Thébaudeau
66acf74612 cc2538: examples: Fix build warnings
Toolchain used:
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150303
(release) [ARM/embedded-4_9-branch revision 221220]

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-06-02 01:38:11 +02:00
Harald Pichler
6a0d407806 Merge branch 'contiki' into osd 2015-05-19 10:54:55 +02:00
Moritz 'Morty' Strübe
0dab6926b3 Move MAX, MIN and ABS to sys/cc.h 2015-05-18 08:53:17 +02:00
Harald Pichler
877bf27f5a Merge branch 'contiki' into osd 2015-05-15 20:48:26 +02:00
George Oikonomou
11a5e0a49a Merge pull request #1051 from simonduq/fix-warning
Fixed a number of compiler warnings
2015-05-13 00:52:40 +01:00
Simon Duquennoy
4a93f5148d Fixed a number of compiler warnings 2015-05-08 09:07:20 +02:00
Simon Duquennoy
333e076b24 Disable PACKETBUF_ATTR_PACKET_TYPE in the non-Rime case by default 2015-05-06 16:36:15 +02:00
Simon Duquennoy
290fc829ea Consistently use PACKETBUF_ATTR_MAC_SEQNO for MAC sequence number, both input and output. Disable PACKETBUF_ATTR_PACKET_ID in the non-Rime case. 2015-05-06 16:34:44 +02:00
Simon Duquennoy
bb76bb8beb Remove unused flag SICSLOWPAN_CONF_ACK_ALL. Include packetbuf attribute PACKETBUF_ATTR_RELIABLE only when RIME is compiled. 2015-05-06 16:34:26 +02:00
Harald Pichler
d31ecbf486 Merge branch 'contiki' into osd 2015-02-18 10:04:47 +01:00
George Oikonomou
dd4f181cde Fix warnings caused by incorrect \defgroup, \addtogroup, \file 2015-02-15 20:11:09 +01:00
Harald Pichler
9efc5d41c1 Merge branch 'contiki' into osd 2014-12-29 08:20:00 +01:00
Harald Pichler
76ea945fd7 add power save mode RDC_CONF_PT_YIELD_OFF 2014-12-09 16:42:45 +01:00
Harald Pichler
a02be51f08 Merge branch 'contiki' into osd 2014-12-07 15:24:00 +01:00
Simon Duquennoy
bd4233a953 Cleanup packetbuf: use rime attributes and addresses only when rime is enabled. Saves 32 byte per queuebuf in the non-rime case. 2014-12-02 16:54:58 +01:00
Simon Duquennoy
a9cc909794 Network layer configuration: replace UIP_CONF_* with NETSTACK_CONF_WITH_* 2014-12-01 21:02:57 +01:00
Nicolas Tsiftes
9b90c378e8 Merge pull request #812 from kkrentz/packetbuf-holds-broadcast
packetbuf_holds_broadcast()
2014-11-28 19:15:19 +01:00
kkrentz
6ecbf8af34 ContikiMAC: Retain original copyright 2014-11-25 04:56:09 -08:00
kkrentz
18ee5ce294 ContikiMAC: Added missing length function to contikimac-framer.c 2014-11-25 04:56:09 -08:00
Harald Pichler
dd917c3260 bugfix server client demo 2014-11-19 13:34:37 +01:00
Nicolas Tsiftes
866bb99944 Merge pull request #860 from simonduq/frame802154-align
frame802154_t: make sure dest_addr and src_addr are aligned
2014-11-18 08:59:30 +01:00
kkrentz
fb00a217f5 packetbuf: Use packetbuf_holds_broadcast() all-over 2014-11-13 09:58:08 -08:00
Enrico Joerns
85b494c16b [doc] Give files a common structure by placing license first (partial)
Followed by doxyen file and group tags.
This patch is only a first attempt to make provide a clean structure,
many more files require rework, too.
2014-11-10 23:54:49 +01:00
Enrico Joerns
e9b5899eed [core/net/mac] Doxygen: Added frame802154 to net group 2014-11-10 23:53:32 +01:00
Simon Duquennoy
6b7017452b frame802154: move inclusion of linkaddr.h from .h to .c file 2014-11-10 15:43:32 +01:00
Simon Duquennoy
df6a435d42 struct frame802154_t: make sure dest_addr and src_addr are aligned 2014-11-10 15:40:24 +01:00
Nicolas Tsiftes
6fb7dd238e Merge pull request #648 from cetic/pr-csma-fixes
High throughput fixes for csma and sixlowpan
2014-10-21 12:17:03 +02:00
Laurent Deru
7cbd59df03 Add per neighbor packet throttle 2014-08-13 10:11:02 +02:00
Laurent Deru
91d84a3086 Improve csma debug traces 2014-08-13 10:11:02 +02:00
kkrentz
2cf7d98cad ContikiMAC: Create and parse ContikiMAC header in special framer; Expanded framer interface
to allow for creating and securing frames in advance; Create and secure frames in advance when sending bursts; Do neither recreate nor resecure frames that come from phase
2014-08-05 05:07:06 -07:00
kkrentz
515287ef17 llsec: Removed superseded NETSTACK_ENCRYPT, NETSTACK_DECRYPT, and
NETSTACK_ENCRYPTION_INIT macros
2014-08-05 05:07:05 -07:00
kkrentz
41c5dbf961 llsec: Disable duplicate detection when the LLSEC driver provides replay protection anyway. 2014-08-05 05:07:05 -07:00
kkrentz
eaae9f1100 llsec: Calling NETSTACK_LLSEC.on_frame_created() 2014-08-05 05:04:15 -07:00
kkrentz
8659c97fb0 framer-802154: Support for explicit keys 2014-08-05 05:04:15 -07:00
kkrentz
124dde25f3 framer-802154: Conditional compilation of security-related code 2014-08-05 05:04:14 -07:00
kkrentz
fb6d2270ab framer-802154: Simplification of frame802154_create 2014-08-05 05:04:14 -07:00
kkrentz
11495a011c framer-802154: Renamed variable for the sake of consistency 2014-08-05 05:04:14 -07:00
kkrentz
1d324e50d2 framer-802154: Sequence number fix 2014-08-05 05:04:14 -07:00
kkrentz
9dc9e4bd9f framer-802154: Support for setting and accessing the frame type
attribute
2014-08-05 05:04:14 -07:00
kkrentz
19c9ef0a95 framer-802154: Support for creating and parsing frames with security headers 2014-08-05 05:04:14 -07:00
kkrentz
be22883724 framer-802154: Introduced mnemonic variable 2014-08-05 05:04:14 -07:00
kkrentz
c9ad9c04bd framer-802154: Style fixes 2014-08-04 01:09:57 -07:00
kkrentz
bb74fc320f llsec: Configuration option for defining a constant LoWPAN-wide security level 2014-08-04 01:09:57 -07:00
kkrentz
c396a85364 llsec: Added a layer in between NETSTACK_MAC and NETSTACK_NETWORK for implementing link layer security 2014-08-04 01:09:57 -07:00
Adam Dunkels
cff30a394b Merge pull request #635 from nfi/linkaddr-size
Use LINKADDR_SIZE instead of sizeof(linkaddr_t) to avoid struct padding problems.
2014-06-11 23:18:27 +02:00
Adam Dunkels
eceaf0c59b Merge pull request #631 from nfi/framer-len
Added function to framer that returns the estimated header length
2014-06-11 23:17:47 +02:00
Rémy Léone
25c8b0835d Closing doxygen groups 2014-05-30 11:01:20 +02:00
Niclas Finne
b1335b08a8 Changed to use LINKADDR_SIZE instead of sizeof() to select between
short address and long address as some platforms might use padding in
the struct. This fixes #555.
2014-04-11 17:24:16 +02:00
Niclas Finne
68730566a3 Added method to framer that returns the header length if the framer
would create a header with the current packet information.

This allows sicslowpan to calculate the max payload size without
consuming a sequence number or clearing/restoring the packet buffer.
2014-04-11 17:03:23 +02:00
Adam Dunkels
5b1a9f5bc2 Bugfix: when a packet is sent by the RDC layer, we should count the number of transmissions made because a single callback can pertain to multiple transmissions at the RDC layer. 2014-03-24 08:36:18 +01:00