Client Implementation Reference
The GENIVI SOTA project includes a client implementation in Rust for the GENIVI platform, but any client that implements the necessary JSON-RPC calls may be used. This document is a reference doc for those calls. You can also take a look at a detailed breakdown of a complete session, from registration through to completed package installation, here.
All client-server communication in SOTA is done over RVI, so we will assume that you’ve already got an RVI client node running on the client device, set up to communicate with the SOTA server node. All of the client’s communication with the server is intermediated by the RVI client node, so both in this doc and in the example session, "server" and "RVI client node" are used interchangeably.
Overview
The client, in a nutshell, is a middleman. It listens for messages from RVI, accepts package downloads, sends them to the system’s software loading manager, and reports back to the RVI node the results of the package install. It also can send a list of the packages currently installed on the device when the server asks for it.
All communication with RVI is done via JSON-RPC. The implementation of the client’s communication with the local software update manager is left up to the developer.
RPC Calls Client → RVI
All Client → RVI node JSON RPC calls have an object containing three name/value pairs under params . They are service_name , timeout (given as a Unix epoch time), and parameters . parameters contains all of the actual content of the SOTA protocol.
|
Due to a bug in RVI, the parameters value is actually a one-element array. This should change after the next RVI release
|
genivi.org/backend/sota/start
Description |
Notification that the client has accepted a package install for one or more packages, and the server may start sending them |
Parameters |
|
Example |
|
genivi.org/backend/sota/ack
Description |
Acknowledgement of a start message, or a received chunk |
Parameters |
|
Example |
|
genivi.org/backend/sota/report
Description |
A report on the success or failure of the package install, after the file transfer has completed successfully |
Parameters |
|
Example |
|
genivi.org/backend/sota/packages
Description |
A list of the packages currently installed on the client, and their versions |
Parameters |
|
Example |
|
RPC Calls RVI → Client
All RVI node → Client JSON RPC calls have an object containing two name/value pairs under params . They are service_name and parameters . parameters contains all of the actual content of the SOTA protocol. Note that the RVI node doesn’t supply a timeout.
|
Due to a bug in RVI, the parameters value is actually a one-element array. This should change after the next RVI release.
|
/sota/notify
Description |
Notification that there is one or more new package updates ready to be installed. |
Parameters |
|
Example |
|
/sota/start
Description |
Package file transfer initialization |
Parameters |
|
Example |
|
/sota/chunk
Description |
Delivery of a 64kb chunk of the package file |
Parameters |
|
Example |
|
/sota/finish
Description |
Notification of transfer completion |
Parameters |
|
Example |
|
/sota/getpackages
Description |
A request for information about what packages the client currently has installed |
Parameters |
None |
Example |
|
/sota/abort
Description |
A notification that all pending or in-progress package installs should be aborted |
Parameters |
None |
Example |
|