The official git repository for OSD-Contiki, the open source OS for the Internet of Things
Go to file
George Oikonomou 16f56abfad Wait for a valid RSSI reading in CC13xx/CC26xx RF drivers
As discussed in #1341, the current CC13xx/CC26xx IEEE mode driver sends `CMD_GET_RSSI` once and returns the RSSI reading uncondtionally. This happens within the `get_rssi()` function.

This logic is broken if `get_rssi()` is called with the radio off. The function will make sure to turn on the radio first, but it does not make sure the RSSI reading is valid, which only happens a number of symbol periods after the radio enters RX. The outcome is that `NETSTACK_RADIO.get_value(RADIO_PARAM_RSSI, ...)` will always return -128 (meaning that RSSI is unavailable) if the radio was off at the time of calling the function.

The same condition affects the prop mode driver.

This commit changes the logic of `get_rssi()`:
* For PROP mode, if `CMD_GET_RSSI` returns an invalid RSSI, we send it again. For unknown reasons, `CMD_GET_RSSI` on occasion returns 0, so we ignore that value too.
* For IEEE mode, we use `CMD_IEEE_CCA_REQ` and we inspect the value of `ccaInfo.ccaEnergy` of the return structure. If the value is 0x02 (Invalid), we send the command again.

Fixes #1341
2016-07-17 18:20:22 +01:00
apps Orchestra: added support for RPL non-storing mode 2016-06-08 14:03:24 +02:00
core TSCH: add RADIO_DELAY_BEFORE_DETECT to rx guard time when waiting for a packet to be received 2016-07-16 18:08:41 +01:00
cpu Wait for a valid RSSI reading in CC13xx/CC26xx RF drivers 2016-07-17 18:20:22 +01:00
dev Merge pull request #1673 from njh/enc28j60_init_const 2016-06-03 19:46:31 +02:00
doc Fix doxygen warning 2016-03-15 10:25:05 +01:00
examples Merge pull request #1777 from herjulf/master 2016-07-15 20:30:06 +02:00
lib/newlib Implement generic Newlib syscalls 2015-12-16 19:50:49 +01:00
platform Merge pull request #1727 from g-oikonomou/contrib/cc26xx/trng 2016-07-16 23:34:53 +01:00
regression-tests Incorporate latest changes on rpl tests to 23-rpl-non-storing 2016-06-08 14:09:43 +02:00
tools Merge pull request #1730 from groessler/something_to_pull 2016-07-06 09:17:39 +02:00
.gitattributes Add binary files file extension 2015-10-22 16:19:39 +02:00
.gitignore Merge pull request #1469 from wbober/nrf52dk-pr 2016-06-01 23:11:39 +02:00
.gitmodules Align to current master 2015-09-04 17:01:04 +02:00
.travis.yml Run RPL regression tests in non-storing mode 2016-06-08 14:03:19 +02:00
CONTRIBUTING.md Updated CONTRIBUTING.md to reflect Contiki's new merging policy 2015-08-18 22:06:56 +02:00
LICENSE Removed the explicit year 2012 to make it more generic 2012-10-25 23:08:54 +02:00
Makefile.include Extended SOURCEDIRS variable with EXTRALDIRS variable in Makefile.include 2016-02-15 09:37:38 +01:00
README-BUILDING.md Rename to md 2013-03-26 23:15:37 +01:00
README-EXAMPLES.md Several minor consistency improvements. 2013-07-31 00:55:31 +02:00
README.md Travis icon in README.md: show build status of the current master rather than latest build status (can be any pull request) 2015-08-19 09:21:38 +02:00

The Contiki Operating System

Build Status

Contiki is an open source operating system that runs on tiny low-power microcontrollers and makes it possible to develop applications that make efficient use of the hardware while providing standardized low-power wireless communication for a range of hardware platforms.

Contiki is used in numerous commercial and non-commercial systems, such as city sound monitoring, street lights, networked electrical power meters, industrial monitoring, radiation monitoring, construction site monitoring, alarm systems, remote house monitoring, and so on.

For more information, see the Contiki website:

http://contiki-os.org