Upgrade Receiving Card
# Upgrade Receiving Card
Path:
/api/rcv_update
Method: POST
Content-type: application/json; charset=utf-8
API Description: This can be used to upgrade receiving card programs. Upgrade file body should be updated through form-data. If files are not to be upgraded, use raw instead (internal file of the player). Save the upgrade file to /mnt/sdcard/Android/data/com.color.home/files/RCV_UPDATE).
Request
Name | Type | Example | Description |
---|---|---|---|
limitType | byte | true | True by default. true: Limit generation of model; false: Do not limit generation of model. |
Upgrade Description File:
Name | Type | Example | Description |
---|---|---|---|
name | string | "xx.hex" | Name of the upgrade file. |
portIndexes | List | - | Information of the port to be upgraded. |
portIndexInfo
Name | Type | Example | Description |
---|---|---|---|
portIndex | byte | 0 | Port number of the receiving card. |
rcvIndexes | List | [0,1,2] | Number array of the receiving card to be upgraded, starting from 0. |
Example of the description file to be upgraded (the file name must be update.json)
{
"name": "xxx.hex",
"portIndexes": [{
"portIndex": 1,
"rcvIndexes": [1, 2]
}, {
"portIndex": 2,
"rcvIndexes": [0, 2]
}]
}
Request Example
(1) form-data Method
(2) raw Method
Response
Name | Type | Example | Description |
---|---|---|---|
errorCode | int | 0 | Error code. |
apiErrorCode | int | 0 | sdk |
portIndexes | List | - | Upgrade result array. If errorCode or apiErrorCode is not 0, portIndexes is empty. |
PortUpdateInfo
Name | Type | Example | Description |
---|---|---|---|
portIndex | int | 0 | Port number, starting from 0. |
rcvIndexes | List | - | Upgrade result array of the receiving card via the port. |
rcvUpdateInfo
Name | Type | Example | Description |
---|---|---|---|
rcvIndex | int | 0 | Receiving card number |
errorCode | int | 0 | Error code. |
Response Example
{
"errorCode": 0,
"apiErrorCode": 0,
"portIndexes": [{
"portIndex": 0,
"rcvIndexes": [{
"rcvIndex": 0,
"errorCode": 0
}, {
"rcvIndex": 1,
"errorCode": 0
}]
}, {
"portIndex": 1,
"rcvIndexes": [{
"rcvIndex": 0,
"errorCode": 0
}, {
"rcvIndex": 1,
"errorCode": 0
}]
}]
}
Notes:
●The name of the upgrade description file must be update.json.
●The parameter name in the description file must match the name of the uploaded file.
●The port number in the upgrade description file and that of the receiving card via the port cannot be duplicated.