====== Communications Overview ======

It is important to draw the distinction between interfaces and protocols: interfaces being the physical and logical channels over which communication occurs (e.g. BLE, WiFi, UART) and protocols being the coding of messages flowing over these channels.

Summary

Interface

LL Protocol(s)

App Protocol

WiFi

TCPIP, etc

HTTP/REST <-> RICREST

WiFi

WebSocket/RICSERIAL

Any App - ROSSerial, etc

BLE

RICSerial

Any App - ROSSerial, etc

Raw UART

RICSerial

Any App - ROSSerial, etc

I2C

I2C

Hardware dependent

USB UART

human-readable 7-bit ASCII serial + 8th bit set ProtocolOverASCII

Serial terminal / RICREST GET immediate mode / ESP32 bootloader programming / ProtocolOverASCII

Interfaces

RIC provides the following interfaces:

Protocol levels and groups

Protocols are referred to based on their “notional” level in a manner somewhat consistent with the ISO-OSI model. The only levels referred to are LL (Lower Layer - protocol(s) below the application layer which are responsible for moving data around and ensuring flow control, integrity checks, etc), and App (Application - an application layer protocol which is used to convey top-level messaging between applications - e.g. between an iPad app and the firmware).

The protocols used in RIC are:

BLE

The BLE interface provides a RICSerial protocol only. There is a single GATT service with 2 main GATT characteristics:

WiFi

WiFi connections include the following possibilities:

RAW UART

This serial interface is intended to be connected to a more powerful control computer such as a Raspberry Pi.

USB UART

The USB interfaces passes through a CP2102N USB to Serial converter, and so becomes another serial interface. This interface will be used via a terminal-emulator program (human-readable) and/or other dedicated-purpose serial software such as the ESP IDF flash programming software. This interface is generally used for:

I2C

It is not expected that I2C will be used for higher-level communication with RIC (only for controlling and reading sub-systems such as smart servos, accelerometer and power level sensors).