Remote Procedure Calls (RPC)
Infuse-IoT implements a compact RPC protocol for device management.
RPC Server
The embedded RPC server handles INFUSE_RPC_CMD
packets and generates
INFUSE_RPC_RSP
packets in response. The command handling is automatically invoked
by the default ePacket packet handler function epacket_default_receive_handler()
.
The server has a dedicated thread context for running commands, with a configurable stack size
(CONFIG_INFUSE_RPC_SERVER_STACK_SIZE
).
RPC Client
The RPC client library enables running commands on remote devices. This is currently
limited to devices that share the same root network key and commands that only require
EPACKET_AUTH_NETWORK
level authentication.
Command Configuration
Each command is enabled through a dedicated Kconfig symbol, for example
CONFIG_INFUSE_RPC_COMMAND_APPLICATION_INFO
. Each command also has a configurable
authentication level, which determines the encryption level required on the packet for the command
to be executed, for example CONFIG_INFUSE_RPC_COMMAND_APPLICATION_INFO_REQUIRED_AUTH
.
Built-in Commands
For a list of available commands, see rpc_builtin_id
.
User-defined Commands
Infuse-IoT also allows custom user-defined commands to be integrated with the framework with
CONFIG_INFUSE_DEFS_GENERATED_DOWNSTREAM
. See Extending Infuse-IoT Definitions
for more details.