Transport Management Group
Transport management group defines the following commands:
|
Command description |
|---|---|
|
Connect (bridge) transport |
|
Disconnect bridged transport |
|
Fetch bridge/transport status |
|
List transports |
|
Details on transport modes |
|
Details on transport configuration |
Note
Transport management is experimental and subject to change without notice.
Connect (bridge) transport command
Bridge the transport which received the MCUmgr packet to another MCUmgr transport.
Connect (bridge) transport request
Connect (bridge) transport request header fields:
|
|
|
|---|---|---|
|
|
|
CBOR data of request:
{
(str)"transport" : (uint)
(str,opt)"mode" : (uint)
...
}
where:
“transport” |
|
“mode” |
contains the configuration mode of the transport to use, may be omitted to use the default value of 0. |
… |
there might be additional fields that the transport requires in order to make a connection, these are not described here as are transport-specific. |
Connect (bridge) transport response
Connect (bridge) transport response header fields:
|
|
|
|---|---|---|
|
|
|
The command sends an empty CBOR map as data if successful. In case of error the CBOR data takes the form:
{
(str)"err" : {
(str)"group" : (uint)
(str)"rc" : (uint)
}
}
{
(str)"rc" : (int)
}
where:
“err” -> “group” |
|
“err” -> “rc” |
contains the index of the group-based error code. Only appears if non-zero (error condition) when using SMP version 2. |
“rc” |
|
Disconnect bridged transport command
Disconnect the current transport’s bridge, or disconnect all transport bridges.
Disconnect bridged transport request
Disconnect bridged transport request header fields:
|
|
|
|---|---|---|
|
|
|
CBOR data of request:
The command sends an empty CBOR map as data.
{
(str)"transport" : (uint)
}
{
(str)"all" : (bool)
}
where:
“transport” |
|
“all” |
set to true to disconnect all active bridged transports, this
must not be provided if |
Disconnect bridged transport response
Disconnect bridged transport response header fields:
|
|
|
|---|---|---|
|
|
|
The command sends an empty CBOR map as data if successful. In case of error the CBOR data takes the form:
{
(str)"err" : {
(str)"group" : (uint)
(str)"rc" : (uint)
}
}
{
(str)"rc" : (int)
}
where:
“err” -> “group” |
|
“err” -> “rc” |
contains the index of the group-based error code. Only appears if non-zero (error condition) when using SMP version 2. |
“rc” |
|
Fetch bridge/transport status command
Return information on active bridges and what the device supports.
Fetch bridge/transport status request
Fetch bridge/transport status request header fields:
|
|
|
|---|---|---|
|
|
|
The command sends an empty CBOR map as data.
Fetch bridge/transport status response
Fetch bridge/transport status response header fields:
|
|
|
|---|---|---|
|
|
|
CBOR data of successful response:
{
(str)"supported" : (uint)
(str)"active" : (uint)
(str,opt)"bridged" : (bool)
(str,opt)"transport" : (uint)
}
In case of error the CBOR data takes the form:
{
(str)"err" : {
(str)"group" : (uint)
(str)"rc" : (uint)
}
}
{
(str)"rc" : (int)
}
where:
“supported” |
contains how many bridges can be active at a given time. |
“active” |
contains how many bridges are currently active. |
“bridged” |
will be present and true if the current transport is bridged, otherwise will be omitted. |
“transport” |
the transport ID of the MCUmgr transport that the transport is bridged to. Only appears if the transport is bridged. |
“err” -> “group” |
|
“err” -> “rc” |
contains the index of the group-based error code. Only appears if non-zero (error condition) when using SMP version 2. |
“rc” |
|
List transports command
Return information on transports that the device supports.
List transports request
List transports request header fields:
|
|
|
|---|---|---|
|
|
|
The command sends an empty CBOR map as data.
List transports response
List transports response header fields:
|
|
|
|---|---|---|
|
|
|
CBOR data of successful response:
{
(str)"transports" : [
{
(str)"id" : (uint)
(str,opt)"name" : (str)
}
...
]
}
In case of error the CBOR data takes the form:
{
(str)"err" : {
(str)"group" : (uint)
(str)"rc" : (uint)
}
}
{
(str)"rc" : (int)
}
where:
“id” |
the transport ID of the MCUmgr transport that supports bridging. |
“name” |
optional name of the MCUmgr transport (if available). |
“err” -> “group” |
|
“err” -> “rc” |
contains the index of the group-based error code. Only appears if non-zero (error condition) when using SMP version 2. |
“rc” |
|
Details on transport modes command
Return information on modes of a transport that the device supports.
Details on transport mode request
Details on transport modes request header fields:
|
|
|
|---|---|---|
|
|
|
CBOR data of request:
{
(str)"transport" : (uint)
}
where:
“transport” |
|
Details on transport modes response
Details on transport modes response header fields:
|
|
|
|---|---|---|
|
|
|
CBOR data of successful response:
{
(str)"modes" : [
{
(str)"id" : (uint)
(str)"description" : (str)
(str,opt)"incoming" : (bool)
(str,opt)"outgoing" : (bool)
}
...
]
}
In case of error the CBOR data takes the form:
{
(str)"err" : {
(str)"group" : (uint)
(str)"rc" : (uint)
}
}
{
(str)"rc" : (int)
}
where:
“id” |
the ID of the transport mode. |
“description” |
description of the transport mode. |
“incoming” |
will be set to true if transport mode supports incoming bridge connections. |
“outgoing” |
will be set to true if transport mode supports outgoing bridge connections. |
“err” -> “group” |
|
“err” -> “rc” |
contains the index of the group-based error code. Only appears if non-zero (error condition) when using SMP version 2. |
“rc” |
|
Details on transport configuration command
Return information on transport configuration that is supported.
Details on transport configuration request
Details on transport configuration request header fields:
|
|
|
|---|---|---|
|
|
|
CBOR data of request:
{
(str)"transport" : (uint)
(str)"mode" : (uint)
}
where:
“transport” |
|
“mode” |
contains the configuration mode of the tranport type which to get configuration information for. |
Details on transport configuration response
Details on transport configuration response header fields:
|
|
|
|---|---|---|
|
|
|
CBOR data of successful response:
{
(str)"configs" : [
{
(str)"name" : (str)
(str)"type" : (uint)
(str,opt)"required" : (bool)
}
...
]
}
In case of error the CBOR data takes the form:
{
(str)"err" : {
(str)"group" : (uint)
(str)"rc" : (uint)
}
}
{
(str)"rc" : (int)
}
where:
“name” |
name of the configuration item. |
“type” |
|
“required” |
will be present and set to true if the parameter is required. |
“err” -> “group” |
|
“err” -> “rc” |
contains the index of the group-based error code. Only appears if non-zero (error condition) when using SMP version 2. |
“rc” |
|