Commit graph

12239 commits

Author SHA1 Message Date
Peter 1fa9dde049 Merge remote-tracking branch 'contiki/master' into PR2 2017-04-11 17:00:38 +02: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
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
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
George Oikonomou e4da7c66e0 Merge pull request #2165 from alexandruioanp/check-ipv6addrconv-mqtt
Check broker IP conversion. Adjust state machine accordingly
2017-04-02 00:33:43 +01:00
George Oikonomou 6eac73103d Merge pull request #2164 from alexstanoev/web-demo-crash-fix
Zero out httpd_state before deallocating
2017-04-02 00:32:53 +01:00
George Oikonomou 12f17211e6 Merge pull request #2167 from posjodin/sensniff-new
Adding sensniff support for Atmel via avr-rss2 platform
2017-04-02 00:29:09 +01:00
Robert Olsson 417f32c65d Adding sensniff support for Atmel via avr-rss2 platform 2017-03-31 20:00:20 +02:00
Robert Olsson 093550ecbf Update for Atmel radio part II
modified:   cpu/avr/radio/rf230bb/halbb.c
	modified:   cpu/avr/radio/rf230bb/rf230bb.c
2017-03-31 18:38:27 +02: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
alexstanoev a30364189a Zero out httpd_state before deallocating
When a connection is aborted by the HTTP server while it's still being processed it is possible to hit a null pointer dereference issue by jumping back to a protothread (outputpt) after its httpd_state has been freed. This can be triggered by sending a POST to any form in the CC26xx web demo server using Firefox.
This patch prevents that by zeroing out httpd_state structs before freeing them, thus also clearing the httpd_state->outputpt field.
Tested using Firefox 55.0a1 on a CC2650 LaunchPad.
2017-03-31 16:44:11 +01:00
George Oikonomou 4425a67433 Merge pull request #2162 from posjodin/PR4
Updates for  Atmel radio
2017-03-31 12:24:55 +01:00
Nicolas Tsiftes 69c2e7e2b6 Merge pull request #2159 from posjodin/PR3
avr-rss2 platform fixes
2017-03-30 16:30:46 +02:00
Robert Olsson 399150b142 Minor spell fix in ANNOUNCE_BOOT
modified:   platform/avr-rss2/contiki-main.c
2017-03-30 15:24:19 +02:00
Nicolas Tsiftes 9d003fe52f Merge pull request #2155 from iot-lab/pr/er-coap/stylecleanup
er-coap: Fix style and add missing `addr` argument
2017-03-30 14:14:03 +02:00
Robert Olsson d6128852b2 Added missing register definitions in at86rf230_registermap.h
modified:   cpu/avr/radio/rf230bb/at86rf230_registermap.h
2017-03-29 11:32:39 +02:00
Robert Olsson 55daec98dc Added missing registers in
modified:   cpu/avr/radio/rf230bb/atmega128rfa1_registermap.h
2017-03-28 22:16:50 +02:00
Robert Olsson 94defe6ba2 Updates for Atmel RF233 radio in AtMega256rfr2 including register
update for MAC symbol counter. Basic functions for get/set-value
parameter setting added. SPI radios needs to be tested.

	modified:   cpu/avr/radio/rf230bb/atmega256rfr2_registermap.h
	modified:   cpu/avr/radio/rf230bb/rf230bb.c
2017-03-28 18:53:56 +02:00
Robert Olsson 3829dd2f20 Leds toggle added
modified:   platform/avr-rss2/dev/leds.c
2017-03-24 17:37:37 +01:00
Robert Olsson e77dba152d Removing avr-rss2 private sniffer app. Better use examples/sensniff. 2017-03-24 17:29:50 +01:00
Robert Olsson bf8e77ea4e Added missing prototype
modified:   cpu/avr/radio/rf230bb/rf230bb.h
2017-03-24 17:07:35 +01:00
Robert Olsson c0239b41c9 Cleand-up _CONF for ROUTES, NEIGHBOR and BUFFER_SIZE
modified:   platform/avr-rss2/contiki-conf.h
2017-03-24 16:57:53 +01:00
Robert Olsson e09bdc0c07 Increasing route table from 4 to 20
modified:   platform/avr-rss2/examples/ipv6/mqtt-demo/project-conf.h
2017-03-24 16:57:27 +01:00
Robert Olsson 29914b5a1f Fixing input serial line initialization pointed by Peter Sjödin/KTH
For avr-rss2 platform
2017-03-24 16:57:03 +01:00
Peter Sjödin fa6c52633f Use RS232_BAUDRATE to define baudrate from projekt config file.
Removed serial initialization from contiki-main.c. It seems to be
too soon.
2017-03-24 16:56:42 +01:00
Robert Olsson 9e5aed5df6 Support for changing PANID and channel from project-conf.h
modified:   cpu/avr/radio/rf230bb/rf230bb.c
	modified:   platform/avr-rss2/contiki-conf.h
	modified:   platform/avr-rss2/contiki-main.c
2017-03-24 16:56:22 +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
Nicolas Tsiftes 7342a3f8a7 Merge pull request #2103 from stringr9/bugfix/non-storing-drop-fix
Don't drop packets bound for outside the RPL mesh in non-storing mode
2017-03-23 14:27:06 +01:00
Nicolas Tsiftes 90ea58e206 Merge pull request #2145 from g-oikonomou/bugfix/multicast-config
Don't force RPL MOP configuration in contiki-default-conf.h
2017-03-23 13:43:08 +01:00
Robert Olsson 34fa389054 Whitespace change to force new travis-check.
modified:   apps/mqtt/mqtt.h
2017-03-22 13:15:58 +01:00
Peter 432f12e156 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-03-21 16:43:15 +01:00
George Oikonomou 99402348eb Merge pull request #2147 from g-oikonomou/bugfix/1972
Add missing variable declaration
2017-03-18 17:23:41 +00:00
Oliver Schmidt 356814fe9c Merge pull request #2146 from oliverschmidt/slip
Add SLIP support to retro platforms.
2017-03-18 15:56:06 +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
Oliver Schmidt 7f3fcbd8e7 Made it somewhat more obvious that this is SLIP-only. 2017-03-18 14:19:36 +01:00
George Oikonomou dc782732e0 Merge pull request #2132 from JoaoS/energest_avr_rss2
add CPU energest measurements that were lacking in this platform
2017-03-18 13:17:51 +00:00