Commit Graph

760 Commits

Author SHA1 Message Date
Simon Duquennoy
8966460b1f Added per-module runtime log level configuration 2017-07-17 12:16:52 +02:00
Simon Duquennoy
2847a05e0a Shell: new command to show list of IPv6 nbrs 2017-07-16 16:40:30 +02:00
Simon Duquennoy
48c809a320 Shell: added command to print tsch schedule
Conflicts:
	apps/shell/shell-commands.c
2017-07-16 16:39:54 +02:00
Simon Duquennoy
c6537820b1 Minor rpl-lite fixes for DAG leaving/joining 2017-07-14 14:29:17 +02:00
Simon Duquennoy
0ea63514e3 Shell: added a number of RPL and TSCH mngt functions 2017-07-10 17:45:07 +02:00
Simon Duquennoy
f7d4d5a0ec Fix Shell log command argument parsing 2017-07-10 16:32:41 +02:00
Simon Duquennoy
5999323a05 More Shell commands 2017-07-07 18:13:21 +02:00
Simon Duquennoy
03f76a9058 Shell ping command: print out delay 2017-07-07 15:43:31 +02:00
Simon Duquennoy
b81375f638 Shell: added command to set node as root (or unsed) 2017-07-07 15:13:47 +02:00
Simon Duquennoy
07b5373829 Shell: easier argument parsing 2017-07-07 15:13:46 +02:00
Simon Duquennoy
75f3a154ad Added shell command to configure log level at runtime 2017-07-07 15:13:43 +02:00
Simon Duquennoy
ad6ef11a0b Added new shell 2017-07-07 15:13:39 +02:00
Simon Duquennoy
bf5bea583e Disable TCP by default, homogenize UDP and TCP connections config 2017-06-29 16:46:29 +02:00
Simon Duquennoy
a6643a9835 Added RPL-lite, a lightweight implementation of RPL. This is the new default. 2017-06-29 16:46:07 +02:00
Simon Duquennoy
fcc1778dc0 Remove all references to Rime 2017-06-22 18:31:13 +02:00
Simon Duquennoy
d4a608cdad Merge pull request #39 from simonduq/pr/werror
Enable -Wall -Werror by default
2017-06-21 16:00:16 +02:00
Joakim Eriksson
795f646787 Merge pull request #34 from simonduq/pr/no-ipv4
Removing IPv4 stack
2017-06-21 14:31:58 +02:00
Simon Duquennoy
3d5ee21d69 Fix a number of compiler warnings 2017-06-21 12:06:57 +02:00
Simon Duquennoy
1a0f8ab737 Removing IPv4 stack 2017-06-16 17:32:22 +02:00
Nicolas Tsiftes
7e273ff48c Removed servreg-hack. 2017-06-16 15:37:14 +02:00
Simon Duquennoy
d51a9a0811 Making apps makefile optional. Removing shell. 2017-05-18 11:42:06 +02:00
Simon Duquennoy
78e424200b http-socket as an app 2017-05-18 09:26:44 +02:00
Simon Duquennoy
d1641530dd Merge branch 'wip/platform-cleanup' into wip/mac-rdc
Conflicts:
	drivers/dev/cc2520/cc2520.c
	drivers/platform/wismote/Makefile.wismote
	drivers/platform/wismote/contiki-conf.h
	drivers/platform/wismote/contiki-wismote-main.c
	drivers/platform/z1/Makefile.z1
	drivers/platform/z1/contiki-conf.h
	drivers/platform/z1/contiki-z1-main.c
	examples/ipso-objects/cooja-example-ipso-objects.csc
	examples/rssi-scanner/Makefile
2017-05-17 15:13:16 +02:00
Simon Duquennoy
aa1191d8f0 Remove RDC layer 2017-05-17 15:09:19 +02:00
Simon Duquennoy
766c0e21dd Removing platform z1 2017-05-17 13:48:01 +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
Atis Elsts
f83f035855 Keep CoAP 'observe' option length <= 3 bytes 2017-04-08 15:02:52 +01:00
Alexandru-Ioan Pop
f15b86158b Check broker IP conversion. Adjust state machine accordingly
The result of converting the IP address of the broker wasn't checked. As a result, the pointer was left uninitialised and the IPv6 address used for connecting was some random data. The function now returns an error. Before connect_to_broker is called, mqtt_register is executed, which memsets conn to 0, making its state 0 (MQTT_CONN_STATE_ERROR). In order to recover from this error state, the extra check was added in the MQTT_CLIENT_STATE_NEWCONFIG state.

This was discovered using [CodeSonar](https://www.grammatech.com/products/codesonar)
2017-03-31 17:33:29 +01:00
Gaëtan Harter
f70adde9a9 er-coap-observe-client: missing 'addr' parameter 2017-03-23 15:12:42 +01:00
Gaëtan Harter
c932ff45a3 er-coap: run uncrustify-fix-style.sh
Clean style before modifying.
2017-03-23 15:12:39 +01:00
George Oikonomou
739b901e0d Add missing variable declaration
#1972 removed the declaration of `i` from various locations. In one of those locations it is still needed. This commit puts it back
2017-03-18 14:01:10 +00:00
George Oikonomou
758d9aa168 Merge pull request #1972 from MohamedSeliem/patch-11
update httpd_cgi to enable the compilation of webserver-ipv6 example
2017-03-18 13:50:52 +00:00
Thomas Blank
ed1b27e40b Fix Bug in MQTT App: Refused Connections should not be pursued.
No means no.
2017-03-09 19:35:20 +01:00
Yasuyuki Tanaka
83f2382791 Orchestra: avoid a link error for nbr_routes 2017-01-19 13:55:08 +01:00
Mohamed Seliem
88fdc46e03 update httpd_cgi to enable the compilation of webserver-ipv6 example
this simple change fixes the bug reported in @#1541.
../../apps/webserver/httpd.h:63:9: note: expected ‘uip_ip6addr_t’ but argument is of type ‘union uip_ipaddr_t *’
2016-12-04 19:03:15 +02:00
Antonio Lignan
efde9132a8 Merge pull request #1769 from gebart/pr/rest-engine-periodic-add-poll
rest-engine: Allow adding periodic resources after starting REST engine
2016-11-11 09:01:32 +01:00
aho
8306aded79 fixed typo in debug PRINTF definition 2016-10-25 12:38:15 +03:00
Oliver Schmidt
957ac63a7c Improved dicarding of text in the HTML header.
Plain text in the HTML header (think of <title>text</title>) is collected as usual. The decision to discard it is triggered by the first withspace following. In the usual case of the <body> no preceeded by any whitespace this means that by the point the first whitespace is encountered we're not in "discard mode" anymore and therefore incorrectly render the text.

Explicitly calling do_word() just before leaving "discard mode" discards all text collected so far.
2016-10-11 11:25:31 +02:00
Nicolas Tsiftes
fa6771f058 Merge pull request #1677 from gebart/pr/lwm2m-instance-list
oma-lwm2m: Add functionality to send object instance list as core link format
2016-09-06 16:50:11 +02:00
Joakim Nohlgård
f16f5b5241 squash clean up left overs 2016-07-09 10:39:23 +02:00
Joakim Nohlgård
6b238873ef squash move rest-engine timers to activate timer 2016-07-09 10:34:23 +02:00
Joakim Nohlgård
e7070a5f79 rest-engine: Allow adding periodic resources after starting REST engine
Without this fix, any periodic resources added after the REST engine was
already running were never started.
2016-07-06 19:18:34 +02:00
Tiago Koji Castro Shibata
c2a0f739f7 Compilation targeting c64
Adds some casts required by cc65 compiler and small fixes
2016-06-12 21:16:01 -03:00
Simon Duquennoy
c3ea1f9fc6 Orchestra: added support for RPL non-storing mode 2016-06-08 14:03:24 +02:00
Simon Duquennoy
6c946319d9 Merge pull request #1667 from alignan/pull/at-driver
AT driver (master) and example
2016-06-04 22:47:24 +02:00
Joakim Nohlgård
e8edb6b1a0 oma-lwm2m: Add JSON writer 2016-05-28 07:55:54 +02:00
Joakim Nohlgård
9832b356ba oma-lwm2m: Use Accept header to determine the writer object for the content 2016-05-28 07:55:27 +02:00