Commit Graph

12284 Commits

Author SHA1 Message Date
Simon Duquennoy
54d6756815 Move cpu, dev and platform into a new top-level directory: drivers 2017-05-16 09:04:52 +02:00
Simon Duquennoy
16611693e3 Cleanup Travis configuration file 2017-05-16 08:59:50 +02:00
Simon Duquennoy
edb4bb092c Remove Travis icon from readme: not available as a private repository 2017-05-16 08:59:45 +02:00
Simon Duquennoy
6220aea14a Removing Rime, old platforms, old MAC layers, LLSEC (as a layer), some examples and apps 2017-05-14 01:14:05 +02:00
Peter Sjödin
8a384685b0 Untabify mqtt.c 2017-05-13 15:58:05 +02:00
Robert Olsson
209fcd1c0c Whitespace change to force new travis-check.
modified:   apps/mqtt/mqtt.h
2017-05-13 15:58:03 +02:00
Peter
b2cfb727ed Several changes to fix bugs and harden mqtt code.
1. The PT_MQTT_WAIT_SEND() macro has several issues:

- It does not check the return value from process_post(), which
  sometimes returns an error code. See next issue.

- Each time the macro is called, is posts an event to itself. The idea
seems to be that the event should be absorbed by the macro itself, so
when the macro terminates there is NOT a net growth of the event
queue. This does not work.  The reason is that the
PROCESS_WAIT_EVENT() sometimes absorbs a broadcast event instead of
its own event, and then the number of events in the event queue
increases. This leads to event explosions and overflow in the event
queue.

- The macro cannot call PT_EXIT(). This will expand to a return
statement, causing a return from the function calling the macro
(mqtt_process), rather then exiting the protothread (which was
probably the intention). Protothreads have lexical scope...

Fixes: 1) Check return value from process_post() 2) Loop until the
event posted to itself is absorbed (rather than just absorbing the
next event) 3) Replace PT_EXIT() with PT_INIT() (doesn't really make a
difference, could probably just be removed).

2. Change order of the checks in the protothread-calling loops in
mqtt_process().  Reason: When a protothread has been cleared by
PT_MQTT_WAIT_SEND(), it will not return a value, so checking against
PT_EXITED does not make sense.

3. PT_MQTT_WRITE_BYTES() should initialize conn->out_write_pos to 0.
When PT_MQTT_WRITE_BYTES() does not finish (due to TCP disconnect for
instance), it may leave conn->out_write_pos with a non-zero
value. Next time PT_MQTT_WRITE_BYTES() is called, it will take data
from the wrong place.

4. Put MQTT_CONN_STATE_ABORT_IMMEDIATE before
MQTT_CONN_STATE_NOT_CONNECTED in the enum list, so that the check
if(conn->state > MQTT_CONN_STATE_NOT_CONNECTED) in mqtt_connect()
fails when in state MQTT_CONN_STATE_ABORT_IMMEDIATE. Otherwise, it
will deadlock and not reattempt connections while in this state.
2017-05-13 15:58:01 +02:00
George Oikonomou
cbde8855cf Use ccaInfo.ccaState to decide whether CCA is complete
This commit changes the logic of `get_cca_info()` in the CC26xx IEEE mode driver. We now use the command's return status bits to determine whether the radio's CCA monitoring function has concluded, instead of drawing conclusions based on RSSI readings.
2017-05-13 15:57:59 +02:00
George Oikonomou
edebc1dd2c Add documentation for the new boards 2017-05-13 15:57:56 +02:00
George Oikonomou
dcd0ad22e7 Add travis tests for CC1350 boards 2017-05-13 15:57:54 +02:00
George Oikonomou
c6523d010d Add support for the CC1350 Launchpad 2017-05-13 15:57:52 +02:00
George Oikonomou
6216b7f8e6 Re-organise sensortag documentation modules
Many of those doxygen blocks are now applicable to both sensortags, with only a couple of them being different between the CC1350 and CC2650 tags
2017-05-13 15:57:50 +02:00
George Oikonomou
87e7bdbcbd Add support for the CC1350 sensortag 2017-05-13 15:57:48 +02:00
George Oikonomou
5feb8ccb4b Allow band-specific RSSI offset override 2017-05-13 15:57:46 +02:00
George Oikonomou
f43e9a058b Provide additional overrides for the 470MHz frequency band 2017-05-13 15:57:44 +02:00
George Oikonomou
febf7b62c1 Allow frequency band-specific overrides 2017-05-13 15:57:42 +02:00
George Oikonomou
d039080d19 Factor-out CC13xx PROP mode TX power table
The CC13xx PROP mode TX power table can differ between boards as well as across frequency bands. This commit provides defaults for all bands and allows the board to override.
2017-05-13 15:57:40 +02:00
George Oikonomou
a077db0c8f Make LNA bias trim offset configurable 2017-05-13 15:57:38 +02:00
George Oikonomou
93bed3847f Make Launchpad unused pins configurable 2017-05-13 15:57:35 +02:00
George Oikonomou
4f7d13c0f9 Extend the RF core to support RF switches 2017-05-13 15:57:33 +02:00
George Oikonomou
45946b7422 Allow boards to explicitly provide an RSSI offset 2017-05-13 15:57:31 +02:00
George Oikonomou
95b3194e61 Allow boards to append to overrides 2017-05-13 15:57:29 +02:00
George Oikonomou
ee501fb887 Delegate RF Front End and Bias settings to board.h 2017-05-13 15:57:27 +02:00
George Oikonomou
6a36a398bd Merge pull request #1931 from g-oikonomou/contrib/cc26xx-cc13xx/update-rf-api
Use TI-Provided CC13xx/CC26xx RF API
2017-04-24 15:33:14 +01:00
Nicolas Tsiftes
ddf723f88d Merge pull request #2180 from atiselsts/bugfix/coap-observe-option
Keep CoAP 'observe' option length <= 3 bytes
2017-04-21 17:59:40 +02:00
Nicolas Tsiftes
66fe7abf79 Merge pull request #2188 from tonnenpinguin/pr/uninitialized_variables
Fix several uninitialized variables
2017-04-21 17:59:12 +02:00
Bernhard Hackl
848f801460 Fix several uninitialized variables 2017-04-19 01:55:27 -07:00
Nicolas Tsiftes
38b82aeeeb Merge pull request #2189 from tonnenpinguin/pr/unterminated_strings
Fix potentially unterminated strings
2017-04-18 16:39:34 +02:00
Nicolas Tsiftes
52c709bdb7 Merge pull request #2101 from yatch/pr/bugfix-rpl-icmp6
RPL: fix a bug accessing an uninitialized pointer
2017-04-18 16:09:06 +02:00
Nicolas Tsiftes
391a84726f Merge pull request #2148 from niziak/master
native-border-router: fix for disappearing timer 'uip_ds6_timer_perio…
2017-04-18 15:19:57 +02:00
Bernhard Hackl
ae91d6b4b1 Fix potentially unterminated strings 2017-04-14 08:33:40 -07:00
Oliver Schmidt
078359127b Merge pull request #2182 from oliverschmidt/master
Adjusted cc65 compiler options to recent cc65 option handling change.
2017-04-10 11:46:08 +02:00
Oliver Schmidt
fa618ad86c Adjusted cc65 compiler options to recent cc65 option handling change. 2017-04-10 11:09:28 +02:00
Atis Elsts
f83f035855 Keep CoAP 'observe' option length <= 3 bytes 2017-04-08 15:02:52 +01:00
George Oikonomou
d0ddb7221e Merge pull request #2176 from atiselsts/bugfix/hdc_sensor
Fix HDC sensor reading conversion
2017-04-08 00:11:05 +01:00
Nicolas Tsiftes
0b85b76778 Merge pull request #2173 from simonduq/pr/tsch-readme
Updating TSCH readme file
2017-04-06 16:06:29 +02:00
Atis Elsts
f6a2c4ea3f Fix HDC sensor reading conversion 2017-04-05 12:23:26 +01:00
Simon Duquennoy
a330f59b8e TSCH readme: update with 802.15.4-2015 and 6TiSCH 2017-04-04 14:15:48 +02:00
Simon Duquennoy
51205eb809 TSCH readme: link to reference paper on implem and eval 2017-04-04 14:12:35 +02:00
George Oikonomou
fbffcc2dfc Merge pull request #2109 from chenek/cc26xx-web-demo-adc-demo
add ADC example to cc26xx-web-demo
2017-04-03 12:21:03 +01:00
Yasuyuki Tanaka
faeb71de00 RPL: fix a bug accessing an uninitialized pointer
This bug is uncovered when RPL_WITH_MULTICAST is enabled.
2017-04-03 17:54:25 +09:00
Yasuyuki Tanaka
3559402781 RPL: add regression test for multicast
This test aims to reproduce the issue #2031:

  https://github.com/contiki-os/contiki/issues/2031

Test nodes are built from the code under example/ipv6/multicast with
WITH_SMRF=1 and WITH_DAO_ACK=1.

If the simulation runs through for one hour, the test is regarded as
success. Otherwise, when it crashes, the test fails.
2017-04-03 17:54:18 +09:00
Yasuyuki Tanaka
b7b23b712f RPL: fix indentation (rpl-icmp6.c) 2017-04-03 17:52:58 +09:00
George Oikonomou
e9ee15efde Merge pull request #2166 from posjodin/TSCH-N1
Updates for Atmel radio part II
2017-04-02 21:31:59 +01:00
George Oikonomou
e823ead4b0 Tidy up web demo ADC code style 2017-04-02 13:44:02 +01:00
George Oikonomou
474dc33e12 Wrap web demo ADC functionality inside #if blocks 2017-04-02 13:43:21 +01:00
chenek
22b262ce73 Add ADC example to cc26xx-web-demo 2017-04-02 13:43:12 +01:00
George Oikonomou
55f3a92211 Merge pull request #2168 from tarakanov/sensortag-spi
Correct SPI pins
2017-04-02 13:26:30 +01:00
Robert Olsson
aed5457332 Correct names for Atmel previous radio fixes plus static declarations. 2017-04-02 11:32:52 +02:00
tarakanov
f564e6bb5f Correct SPI pins 2017-04-02 13:14:09 +05:00