Go to file
Johan Hedberg c44daebe97 Bluetooth: Mesh: Fix HB Pub Count Log calculation routine
"4.1.2 Log field transformation

In order to compress two-octet values into one-octet fields, the
following logarithmic transformation is used: any two-octet value is
mapped onto a one-octet field value representing the largest integer
n, where 2^(n-1) is less than or equal to the two-octet value."

Log field transformation table:

Log Field Value         2-octet Value
0x01                    0x0001
0x02                    0x0002 through 0x0003
0x03                    0x0004 through 0x0007
0x04                    0x0008 through 0x000F
0x05                    0x0010 through 0x001F
0x06                    0x0020 through 0x003F
0x07                    0x0040 through 0x007F
0x08                    0x0080 through 0x00FF
0x09                    0x0100 through 0x01FF
0x0A                    0x0200 through 0x03FF
0x0B                    0x0400 through 0x07FF
0x0C                    0x0800 through 0x0FFF
0x0D                    0x1000 through 0x1FFF
0x0E                    0x2000 through 0x3FFF
0x0F                    0x4000 through 0x7FFF
0x10                    0x8000 through 0xFFFF

"4.2.17.2 Heartbeat Publication Count Log

The Heartbeat Publication Count Log value between 0x01 and 0x11 shall
represent that smallest integer n where 2^(n-1) is greater than or
equal to the Heartbeat Publication Count value. For example, if the
Heartbeat Publication Count value is 0x0579, then the Heartbeat
Publication Count Log value would be 0x0C."

According to this definition 2^(n-1) is an upper bound for n log
value.

Proposed Publication Count Log transformation table:

Pub Count Log Value     2-octet Value
0x01                    0x0001
0x02                    0x0002
0x03                    0x0003 through 0x0004
0x04                    0x0005 through 0x0008
0x05                    0x0009 through 0x0010
0x06                    0x0011 through 0x0020
0x07                    0x0021 through 0x0040
0x08                    0x0041 through 0x0080
0x09                    0x0081 through 0x0100
0x0A                    0x0101 through 0x0200
0x0B                    0x0201 through 0x0400
0x0C                    0x0401 through 0x0800
0x0D                    0x0801 through 0x1000
0x0E                    0x1001 through 0x2000
0x0F                    0x2001 through 0x4000
0x10                    0x4001 through 0x8000
0x11                    0x8001 through 0x10000

According to Log field transformation table 0x0579 would be
transformed to 0x0B and should be to transformed to 0x0C.

This is required to pass MESH/NODE/CFG/HBP/BV-01-C.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-11-04 23:53:50 +03:00
.known-issues doc: Fix regexp in .known-issues networking.conf file 2017-10-09 14:35:21 +03:00
arch arm: nxp_kinetis: cleanup soc.h - remove unused defines 2017-11-03 13:52:57 -05:00
boards boards: disco_l475_iot1: Enable I2C_1 in default config 2017-11-03 13:52:57 -05:00
doc doc: update links to new zephyrproject.org site 2017-11-03 19:31:14 -04:00
drivers sensors: hts221: provide name to Kconfig choice 2017-11-03 13:52:57 -05:00
dts dts: add i2c2 to disco_l475_iot1 2017-11-03 13:52:57 -05:00
ext ext: lib: crypto: mbedtls: Set default MBEDTLS_HEAP_SIZE to 512 2017-11-03 14:27:41 -04:00
include userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
kernel userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
lib libc: Add support for static_assert 2017-10-25 10:43:38 -07:00
misc kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
samples samples: net: echo-client: Fix compile warning 2017-11-03 10:49:33 -04:00
scripts userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
subsys Bluetooth: Mesh: Fix HB Pub Count Log calculation routine 2017-11-04 23:53:50 +03:00
tests tests: kernel: timer: Fix TC_PRINT format specifiers 2017-11-03 10:59:43 -07:00
.checkpatch.conf checkpatch: define typedefsfile to deal with a few false positives 2017-10-09 10:43:05 -04:00
.gitattributes
.gitignore scripts: Convert gen_offset_header to Python 2017-07-24 11:20:04 -07:00
.gitlint scripts: allow "title" in commit titles 2017-09-15 16:36:49 -04:00
.mailmap mailmap: added axy (for Anas Nashif) 2016-12-21 13:49:59 +00:00
.shippable.yml ci: Use latest docker image with SDK 0.9.2 2017-10-28 17:39:15 -04:00
CODEOWNERS boards: arm: Add support for TI MSP-EXP432P401R-LAUNCHXL 2017-10-19 12:16:11 -05:00
CONTRIBUTING.rst doc: update links to new zephyrproject.org site 2017-11-03 19:31:14 -04:00
Kbuild build: remove unused Kconfig variables 2017-08-03 07:19:29 -05:00
Kconfig license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Kconfig.zephyr kconfig: move dts Kconfigs to dts/ 2017-08-03 07:19:29 -05:00
LICENSE
Makefile boards: move pinmux driver to board/soc dir 2017-10-31 12:32:34 -04:00
Makefile.inc kconfig: sort fragment inclusion 2017-11-02 18:03:23 -04:00
Makefile.test tests: introduce Makefile.test 2017-01-03 17:48:44 +00:00
README.rst doc: update links to new zephyrproject.org site 2017-11-03 19:31:14 -04:00
zephyr-env.sh env: Remove usage of -P in grep 2017-07-15 11:12:35 -07:00

Zephyr Project
##############

.. raw:: html

   <a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
   src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
   <img
   src="https://api.shippable.com/projects/58ffb2b8baa5e307002e1d79/badge?branch=master">


The Zephyr Project is a scalable real-time operating system (RTOS) supporting
multiple hardware architectures, optimized for resource constrained devices,
and built with security in mind.

The Zephyr OS is based on a small-footprint kernel designed for use on
resource-constrained systems: from simple embedded environmental sensors and
LED wearables to sophisticated smart watches and IoT wireless gateways.

The Zephyr kernel supports multiple architectures, including ARM Cortex-M,
Intel x86, ARC, NIOS II, Tensilica Xtensa, and RISC V, and a large number of
`supported boards`_.

.. below included in doc/introduction/introduction.rst

.. start_include_here

Community Support
*****************

The Zephyr Project Developer Community includes developers from member
organizations and the general community all joining in the development of
software within the Zephyr Project. Members contribute and discuss ideas,
submit bugs and bug fixes, and provide training. They also help those in need
through the community's forums such as mailing lists and IRC channels. Anyone
can join the developer community and the community is always willing to help
its members and the User Community to get the most out of the Zephyr Project.

Welcome to the Zephyr community!

Resources
*********

Here's a quick summary of resources to find your way around the Zephyr Project
support systems:

* **Zephyr Project Website**: The https://zephyrproject.org website is the
  central source of information about the Zephyr Project. On this site, you'll
  find background and current information about the project as well as all the
  relevant links to project material.  For a quick start, refer to the
  `Zephyr Introduction`_ and `Getting Started Guide`_.

* **Releases**: Source code for Zephyr kernel releases are available at
  https://zephyrproject.org/developers/#downloads. On this page,
  you'll find release information, and links to download or clone source
  code from our GitHub repository.  You'll also find links for the Zephyr
  SDK, a moderated collection of tools and libraries used to develop your
  applications.

* **Source Code in GitHub**: Zephyr Project source code is maintained on a
  public GitHub repository at https://github.com/zephyrproject-rtos/zephyr.
  You'll find information about getting access to the repository and how to
  contribute to the project in this `Contribution Guide`_ document.

* **Samples Code**: In addition to the kernel source code, there are also
  many documented `Sample and Demo Code Examples`_ that can help show you
  how to use Zephyr services and subsystems.

* **Documentation**: Extensive Project technical documentation is developed
  along with the Zephyr kernel itself, and can be found at
  https://zephyrproject.org/doc.  Additional documentation is maintained in
  the `Zephyr GitHub wiki`_.

* **Issue Reporting and Tracking**: Requirements and Issue tracking is done in
  the Github issues system: https://github.com/zephyrproject-rtos/zephyr/issues.
  You can browse through the reported issues and submit issues of your own.

* **Security-related Issue Reporting and Tracking**: For security-related
  inquiries or reporting suspected security-related bugs in the Zephyr OS,
  please send email to vulnerabilities@zephyrproject.org.  We will assess and
  fix flaws according to our security policy outlined in the Zephyr Project
  `Security Overview`_.

  Security related issue tracking is done in JIRA.  The location of this JIRA
  is https://zephyrprojectsec.atlassian.net.

* **Mailing List**: The `Zephyr Mailing Lists`_ are perhaps the most convenient
  way to track developer discussions and to ask your own support questions to
  the Zephyr project community.
  You can also read through message archives to follow
  past posts and discussions, a good thing to do to discover more about the
  Zephyr project.

* **IRC Chatting**: You can chat online with the Zephyr project developer
  community and other users in our IRC channel #zephyrproject on the
  freenode.net IRC server. You can use the http://webchat.freenode.net web
  client or use a client-side application such as pidgin.


.. _supported boards: https://www.zephyrproject.org/doc/boards/boards.html
.. _Zephyr Introduction: https://www.zephyrproject.org/doc/introduction/introducing_zephyr.html
.. _Getting Started Guide: https://www.zephyrproject.org/doc/getting_started/getting_started.html
.. _Contribution Guide: https://www.zephyrproject.org/doc/contribute/contribute_guidelines.html
.. _Zephyr GitHub wiki: https://github.com/zephyrproject-rtos/zephyr/wiki
.. _Zephyr Mailing Lists: https://lists.zephyrproject.org/
.. _Sample and Demo Code Examples: https://www.zephyrproject.org/doc/samples/samples.html
.. _Security Overview: https://www.zephyrproject.org/doc/security/security-overview.html