Support message CRCs in the transport protocol.

This adds CRC-16 checksums for the call_application() function. The
command from the master includes and additional packet containing the
CRC which the slave can verify. The status from the slave after an app
has processed the command included the CRC of the reply data and the
status message itself.

The protocol is backward compatible by detecting the legacy protocol
from the status response and ignoring any CRCs.

In the event of a CRC failure when reading the status or response data,
the read operation is retried 3 times. In the event of a CRC failure of
the request, the transaction is restarted a maximum of 3 times.

Bug: 66104849
Change-Id: Id8c8e1ce0425af66a3a41e59cf7bb3843a4bf740
6 files changed
tree: 69a6c11d27f1e907f39d5a0844f2ee45c6bef44e
  1. citadel/
  2. libnos/
  3. libnos_datagram/
  4. libnos_transport/
  5. nugget/
  6. Android.bp
  7. BUILD
  8. LICENSE
  9. METADATA
  10. README.md
  11. WORKSPACE
README.md

Generic host components for Nugget

Nugget will be used in different contexts and with different hosts. This repo contains the components that can be shared between those hosts.

nugget

The nugget directory contains items that are shared between the host and the firmware. Those include:

  • shared headers
  • service protos

libnos

libnos is a C++ library for communication with a Nugget device. It offers an interface to manage a connection and exchange data and a generator for RPC stubs based on service protos.

libnos_datagram

libnos_datagram is a C library for exchanging datagrams with a Nugget device. This directory only contains the API of the library as the different platforms will need to implement it differently.

libnos_transport

libnos_transport is a C library for communicating with a Nugget device via the transport API. This is built on top of the libnos_datagram library for exchanging datagrams.