---
# System prepended metadata

title: OTA_P2 整合測試

---

# OTA_P2 整合測試
[TOC]

# Integrated/Testing Scenario
## OTA
### 1. report/status -> notification/setCampaing
- [x] Checked
    - [ ] A. 缺少ecuClassName、ecuFirmwareMetadata.currentVersionURL
    - [ ] B. ecuSerialFromOEM、ecuSerialFromVendor、ecuOEMSerialNumber、ecuVendorSerialNumber (@Daren)
    - [ ] C. 多了missionStartTime、missionEndTime
```json=
BMW/ota/DEVICETYPE/DEVICESUBTYPE/report/status
原始訊息
payload = 
    {
        "timestamp": 1667292750000,
        "vehicle": {
            "vehicleId": "635f3b282f554c219a511fc6",
            "vinNumber": "1234567890"
        },
        "ecuList": [
            {
                "ecuId": "84aa751c-57b3-48c3-944c-19b225073bef",
                "softwareVersion": "v0.1.0"
            },
            {
                "ecuId": "80c3a455-43f7-4b27-8318-1d4948f8fff7",
                "softwareVersion": "w0.0.1"
            },
            {
                "ecuId": "9f3a67ce-843f-4b3b-9652-c08a35f86402",
                "softwareVersion": "0.0.1-zxc"
            },
            {
                "ecuId": "5897ba39-bb06-4d69-a7ba-33c574968f69",
                "softwareVersion": "0.0.1"
            },
            {
                "ecuId": "b13f933d-1a91-4b3f-b8a4-b4b2e592f779",
                "softwareVersion": "1.2.3-asd"
            },
            {
                "ecuClassId": "704a31cd-d629-406d-a233-3bdaad25ce36",
                "ecuId": "e9f14408-c036-4e26-bf80-7faf57ab100c",
                "ecuClassSerialFromOEM": "1q2w3e4r",
                "ecuClassSerialFromVendor": "",
                "ecuOEMSerialNumber": "",
                "ecuVendorSerialNumber": "azsxdcfv",
                "hardwareVersion": "",
                "softwareVersion": "2.3.2-zxc"
            }
        ],
        "ecuChangeList": [
            {
                "ecuClassId": "704a31cd-d629-406d-a233-3bdaad25ce36",
                "ecuId": "e9f14408-c036-4e26-bf80-7faf57ab100c",
                "ecuClassSerialFromOEM": "1q2w3e4r",
                "ecuClassSerialFromVendor": "",
                "ecuOEMSerialNumber": "",
                "ecuVendorSerialNumber": "azsxdcfv",
                "hardwareVersion": "",
                "softwareVersion": "2.3.2-zxc"
            }
        ]
    }

encode =>
{
    "identity": "1234567890",
    "payload": "eyd0aW1lc3RhbXAnOiAxNjY4NTg5NzI3MTE0LCAnY2FtcGFpZ25Ub3BpYyc6ICdCTVcvb3RhLzYzNzFhNThmMmYwMDg3NjM0YTQ1NDY4OC9DYW1wYWlnbicsICdtaXNzaW9uVG9waWMnOiAnQk1XL290YS82MzcxYTU4ZjJmMDA4NzYzNGE0NTQ2ODgvNjM3NGE4OWY3ZGI0OGNjNTljZDZjNDYwL01pc3Npb24nLCAnbWlzc2lvblN0YXJ0VGltZSc6ICcnLCAnbWlzc2lvbkVuZFRpbWUnOiAxNjY5Nzc0Njc1NTk1LCAnb3RhQ2FtcGFpZ24nOiB7J2NhbXBhaWduSWQnOiAnNjM3MWE1OGYyZjAwODc2MzRhNDU0Njg4JywgJ21pc3Npb25JZCc6ICc2Mzc0YTg5ZjdkYjQ4Y2M1OWNkNmM0NjAnLCAnY2FtcGFpZ25BY3Rpb24nOiAnc3RhcnQnLCAnY2FtcGFpZ25BY3Rpb25UaW1lc3RhbXAnOiAxNjY4NTg5NzI3MTE0LCAnY2FtcGFpZ25TdGF0dXMnOiAnUnVubmluZycsICd2ZWhpY2xlQ2xhc3MnOiB7J2JyYW5kJzogJ0JNVycsICd2ZWhpY2xlQ2xhc3NOYW1lJzogJ1gxJywgJ3JvbGxvdXREYXRlJzogJzIwMjInfX0sICdwcmVjb25kaXRpb24nOiBbeydfaWQnOiAnMTAwMScsICdjb25kaXRpb24nOiAnc3BlZWQnLCAnb3BlcmF0b3InOiAnPScsICd2YWx1ZSc6ICcxMCcsICd2YWx1ZVR5cGUnOiAnSW50ZWdlcid9LCB7J19pZCc6ICcxMDAyJywgJ2NvbmRpdGlvbic6ICdnZWVyJywgJ29wZXJhdG9yJzogJz0nLCAndmFsdWUnOiAnUCcsICd2YWx1ZVR5cGUnOiAnU3RyaW5nJ31dLCAndXBkYXRlUGF0aCc6IH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NnfBpZGQSRswMCT5zkv2DZ2iL+Rl1n/G9Xot+6BQ3J/zV72f1GHJJLsww=="
}

decode =>
{
    "timestamp": 1668589727114,
    "campaignTopic": "BMW/ota/6371a58f2f0087634a454688/Campaign",
    "missionTopic": "BMW/ota/6371a58f2f0087634a454688/6374a89f7db48cc59cd6c460/Mission",
    "missionStartTime": "",
    "missionEndTime": 1669774675595,
    "otaCampaign": {
        "campaignId": "6371a58f2f0087634a454688",
        "missionId": "6374a89f7db48cc59cd6c460",
        "campaignAction": "start",
        "campaignActionTimestamp": 1668589727114,
        "campaignStatus": "Running",
        "vehicleClass": {
            "brand": "BMW",
            "vehicleClassName": "X1",
            "rolloutDate": "2022"
        }
    },
    "precondition": [
        {
            "_id": "1001",
            "condition": "speed",
            "operator": "=",
            "value": "10",
            "valueType": "Integer"
        },
        {
            "_id": "1002",
            "condition": "geer",
            "operator": "=",
            "value": "P",
            "valueType": "String"
        }
    ],
    "updatePath": {
        "ecuClassId": "55195d81-7ba2-45f5-ac05-d1ed7d701608",
        "upperConnectionType": "CAN",
        "nextNodesOrder": "Serial",
        "nextNodes": [
            {
                "ecuClassId": "e075ceba-21fc-4e00-abd9-d0a5ec5de03d",
                "upperConnectionType": "Ethernet",
                "nextNodesOrder": "Serial",
                "nextNodes": []
            },
            {
                "ecuClassId": "0ceb323e-1063-4b23-aaea-3d59a21256f7",
                "upperConnectionType": "Ethernet",
                "nextNodesOrder": "Serial",
                "nextNodes": [
                    {
                        "ecuClassId": "704a31cd-d629-406d-a233-3bdaad25ce36",
                        "upperConnectionType": "Ethernet",
                        "nextNodesOrder": "Serial",
                        "nextNodes": []
                    }
                ]
            }
        ]
    },
    "otaMission": {
        "vehicle": {
            "vehicleId": "635f3b282f554c219a511fc6",
            "vinNumber": "1234567890",
            "vehicleClass": {
                "brand": "BMW",
                "vehicleClassName": "X1",
                "rolloutDate": "2022"
            }
        },
        "ecuList": [
            {
                "ecuClassId": "0ceb323e-1063-4b23-aaea-3d59a21256f7",
                "ecuClassName": "itachi01",
                "vendor": "NS5001",
                "ecuSerialFromOEM": "",
                "ecuSerialFromVendor": "",
                "ecuId": "b13f933d-1a91-4b3f-b8a4-b4b2e592f779",
                "ecuName": "itachi01",
                "ecuOEMSerialNumber": "1q2w3e4r",
                "ecuVendorSerialNumber": "azsxdcfv",
                "ecuFirmwareMetadata": {
                    "currentVersion": "1.2.3-asd",
                    "currentVersionFilename": "產品建立 (1).txt",
                    "currentVersionSize": "544",
                    "currentVersionMD5": "asdfghjkl",
                    "currentVersionVerifyAlgorithm": "RSA",
                    "currentVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                    "currentVersionCertification": "VGVzdENBQ3JlYXRl",
                    "targetVersion": "1.2.4-asd",
                    "targetVersionFilename": "2022-08-23-19-24-59.log",
                    "targetVersionSize": "15484",
                    "targetVersionMD5": "123456",
                    "targetVersionVerifyAlgorithm": "RSA",
                    "targetVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                    "targetVersionCertification": "VGVzdENBQ3JlYXRl"
                }
            },
            {
                "ecuClassId": "704a31cd-d629-406d-a233-3bdaad25ce36",
                "ecuClassName": "itachi02",
                "vendor": "NS5001",
                "ecuSerialFromOEM": "",
                "ecuSerialFromVendor": "",
                "ecuId": "e9f14408-c036-4e26-bf80-7faf57ab100c",
                "ecuName": "itachi02",
                "ecuOEMSerialNumber": "1q2w3e4r",
                "ecuVendorSerialNumber": "azsxdcfv",
                "ecuFirmwareMetadata": {
                    "currentVersion": "2.3.2-zxc",
                    "currentVersionFilename": "產品建立 (1).txt",
                    "currentVersionSize": "544",
                    "currentVersionMD5": "asdfghjkl",
                    "currentVersionVerifyAlgorithm": "RSA",
                    "currentVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                    "currentVersionCertification": "VGVzdENBQ3JlYXRl",
                    "targetVersion": "3.0.0",
                    "targetVersionFilename": "precondition.csv",
                    "targetVersionSize": "288",
                    "targetVersionMD5": "1234",
                    "targetVersionVerifyAlgorithm": "RSA",
                    "targetVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                    "targetVersionCertification": "VGVzdENBQ3JlYXRl"
                }
            }
        ]
    }
}
```
### 2. report/eventRequest -> notification/eventResponse
- [x] Checked
```json=
BMW/ota/DEVICETYPE/DEVICESUBTYPE/report/readyToExecuteCampaign
原始訊息:
{
    "timestamp":1667292750000,
    "requestId":"x123456789",
    "vehicleId":"635f3a682f554c219a511fbf",
    "vinNumber":"1QAZ2WSX3EDC",
    "sessionReportList":[
    ],
    "ecuReportList":[
        {
            "timestamp":1667292750000,
            "sessionId":"6374c078e9d4f84c6560a883",
            "campaignId":"6371a58f2f0087634a454688",
            "ecuId":"f6fcf928-0aea-4ffc-a24e-85fa8d2faef6",
            "ecuClassId":"704a31cd-d629-406d-a233-3bdaad25ce36",
            "currentVersion":"2.3.2-zxc",
            "targetVersion":"3.0.0",
            "otaStepCode":"Downloading",
            "otaLog":[
                {
                    "logTimestamp":0,
                    "logLevel":"warn",
                    "logContent":"this is a test"
                }
            ]
        }
    ]
}

encode =>
{
    "payload": "eyd0aW1lc3RhbXAnOiAxNjY3MjkyNzUwMDAwLCAncmVxdWVzdElkJzogJ3gxMjM0NTY3ODknLCAndmVoaWNsZUlkJzogJzYzNWYzYTY4MmY1NTRjMjE5YTUxMWZiZicsICd2aW5OdW1iZXInOiAnMVFBWjJXU1gzRURDJywgJ3Nlc3Npb25SZXBvcnRMaXN0JzogW10sICdlY3VSZXBvcnRMaXN0JzogW3sndGltZXN0YW1wJzogMTY2NzI5Mjc1MDAwMCwgJ3Nlc3Npb25JZCc6ICc2Mzc0YzA3OGU5ZDRmODRjNjU2MGE4ODMnLCAnY2FtcGFpZ25JZCc6ICc2MzcxYTU4ZjJmMDA4NzYzNGE0NTQ2ODgnLCAnZWN1SWQnOiAnZjZmY2Y5MjgtMGFlYS00ZmZjLWEyNGUtODVmYThkMmZhZWY2JywgJ2VjdUNsYXNzSWQnOiAnNzA0YTMxY2QtZDYyOS00MDZkLWEyMzMtM2JkYWFkMjVjZTM2JywgJ2N1cnJlbnRWZXJzaW9uJzogJzIuMy4yLXp4YycsICd0YXJnZXRWZXJzaW9uJzogJzMuMC4wJywgJ290YVN0ZXBDb2RlJzogJ0Rvd25sb2FkaW5nJywgJ290YUxvZyc6IFt7J2xvZ1RpbWVzdGFtcCc6IDAsICdsb2dMZXZlbCc6ICd3YXJuJywgJ2xvZ0NvbnRlbnQnOiAndGhpcyBpcyBhIHRlc3QnfV19XX0=",
    "signature": "OrBi0EgfKxnLYLRqmH41HFYrVmD320LzCVBlgBfsF+CDQLfh1NtiTfhgtWOUHbue4ca5/X/u+6EMSfk+Fkg11Ha7C3rwZQ/T4YVEV+ijU6ooj36d+MH/F7LbpWxIB9Uo5oUQR7fUDFy+ESk8olN24u6HPMRtyE/Td4WlBk2/Q3Kd6PD6jE9Dqz1W8DBu2OmQWhWBHIj01nS3kdu4pGiJrVUPU7N/0HylYG2jFcknxXKOsCgq6Yeh7m70HmRLi3mSXXHs/rmIKfe6XQrMIctYbp1Hcx7hW2L3bW6sD5C2wRzURB+KPZ7jKR1oXVRfYcJAbBrqf1T9UROGdLrFC5HMCw==",
    "identity": "1QAZ2WSX3EDC"
}
```
```json=
BMW/ota/DEVICETYPE/vehicleId/notification/eventResponse
收到訊息:
{
    "identity": "1QAZ2WSX3EDC",
    "payload": "eyd0aW1lc3RhbXAnOiAxNjY4NzU5MDg1Mjg4LCAncmVxdWVzdElkJzogJ3gxMjM0NTY3ODknfQ==",
    "signature": "qvN/Zp5zd1APgb+zNCzjPWOFAr0Cc51ENdlPiq+C9g1u9WDCsXkHW/HFt8DyvxfUZB4iz2NmrWmCkl8ubETGmx04RGrl7r4bv2JZcJMZbCPN4Qhkn/JAm/2mb1ZTs+WNetd6wOp7arXLjh+oaYwJE2xL8Who2vbiGEY0DYzorsE5NAVufaBAkqzUMWFQVAsK7ah60eT+dzy7gwtkJu1jKFjjV0RZYqFpFl7S8iwNxs2380Zt10dIO1eq29mGn19a0rPXHccUotmSAu0rQT0DVFz8Zm64Jm1+ERBt6uki4kAhommGM5mu6xPia/O1JPBv3bXZBIQk6PdjG6yG/129mg=="
}

decode=>

```
### 3. report/readyToExecuteCampaign -> notification/setSession
- [x] Checked
    - [x] 多出了欄位
        - 1. ecuSerialFromVendor
        - 2. currentVersionURL
        - 3. targetVersionURL
```json=
BMW/ota/DEVICETYPE/DEVICESUBTYPE/report/readyToExecuteCampaign
原始訊息:
{
    "timestamp": 1667530177000,
    "campaignId": "6371a58f2f0087634a454688",
    "missionId": "6374c078e9d4f84c6560a883",
    "vehicle": {
        "vehicleId": "635f3a682f554c219a511fbf",
        "vinNumber": "1QAZ2WSX3EDC"
    }
}

encode =>
{
    "payload":"eyd0aW1lc3RhbXAnOiAxNjY3NTMwMTc3MDAwLCAnY2FtcGFpZ25JZCc6ICc2MzcxYTU4ZjJmMDA4NzYzNGE0NTQ2ODgnLCAnbWlzc2lvbklkJzogJzYzNzRjMDc4ZTlkNGY4NGM2NTYwYTg4MycsICd2ZWhpY2xlJzogeyd2ZWhpY2xlSWQnOiAnNjM1ZjNhNjgyZjU1NGMyMTlhNTExZmJmJywgJ3Zpbk51bWJlcic6ICcxUUFaMldTWDNFREMnfX0=",
    "signature":"mMQPbD/naO2F4dyNhsfbOncacI36X7kpjkycCnP/UA820zzrT9wpwBEzk8K3ZFKsufivF+pCbh19Z3D6EmoufbcCz8NbQ2oFvi7JM+Cbsk1lk5E1F10f/jhyoK2VhK21MvvL9emK8vrStM4Vc2qbScUrFBGbjJxsrrGkwRJXGUXh8G1s8rDaAX1r9SIpZ0S8yNQwBJtaLrMBNNRGHULsrY5Fw9P6wrnP+ldsmg/AVki2+CtRAsu+EdOZZ7z8t17NCGbEx4g5knbm9fJwW3ncktiN/NHbEGrNDC2BjSiQPEZ1emUcA4KEd8BeL+MKc1sZkU6CSyuNsZzHtwvhxDDBxw==",
    "identity":"1Q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mZmYyYzZjLThkNzEtNDhlMy1hOGU0LTEwNWRjMDAzYmQyZi9wcmVjb25kaXRpb24uY3N2P3N2PTIwMjAtMTAtMDImc3ByPWh0dHBzJnNlPTIwMjItMTEtMThUMDglM0EwMyUzQTU3WiZzcj1iJnNwPXImc2lnPWpOY2F1RFc2eSUyRk03MEREcjJVd0Y1dHRhNEJxM0RzSFBoa3V1S3pEVFVuNCUzRCd9fV19",
    "signature":"NyH1sKj7+ndIh7jtn5ktIp2AAL/YvEBJBPG0I2pl612O3p5cdCORSAW1xRe9cEzl6URyxJrDGQN4W6Z2uLH6AxbmwWoLD0SaFTJA+80m6yqcm2uGSlSftdCr6ZyWiCV8lp0onTrDaqHHSnBr4Ud1LyuDN8OAXFhoioWZ5b3MqCkUA++V0VJWe8Hm3gUi1p+aUThVEkmmtZWsls7+qHUiSQzPp6tcHeCzS/DCrFjY0v2WcpsOJreT7H0RDliCyfEWk8+W4qdhZRY0O/4RshmZ5mi92eGZGVOJ/RbyeFft5aZSzfXb0fhKfNfeel1ksDSRUzOAswBFjHaZlYj0V69fPg=="
}

decode =>
{
    "timestamp": 1668758042830,
    "campaignId": "6371a58f2f0087634a454688",
    "missionId": "6374c078e9d4f84c6560a883",
    "sessionStatus": {
        "sessionId": "6374c078e9d4f84c6560a883",
        "sessionAction": "start",
        "sessionActionServerTimestamp": 1668758043949,
        "otaStatus": "started"
    },
    "ecuList": [
        {
            "ecuClassId": "0ceb323e-1063-4b23-aaea-3d59a21256f7",
            "ecuClassName": "itachi01",
            "vendor": "NS5001",
            "ecuSerialFromOEM": "",
            "ecuSerialFromVendor": "",
            "ecuOEMSerialNumber": "1q2w3e4r",
            "ecuVendorSerialNumber": "azsxdcfv",
            "ecuFirmwareMetadata": {
                "currentVersion": "1.2.3-asd",
                "currentVersionUrl": "version/451447b8-e7f6-48bd-ab22-8fcaba391601/產品建立 (1).txt",
                "currentVersionFilename": "產品建立 (1).txt",
                "currentVersionSize": "544",
                "currentVersionMD5": "asdfghjkl",
                "currentVersionVerifyAlgorithm": "RSA",
                "currentVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                "currentVersionCertification": "VGVzdENBQ3JlYXRl",
                "targetVersion": "1.2.4-asd",
                "targetVersionUrl": "version/0bd4434e-8788-487d-94ff-50c45724080e/2022-08-23-19-24-59.log",
                "targetVersionFilename": "2022-08-23-19-24-59.log",
                "targetVersionSize": "15484",
                "targetVersionMD5": "123456",
                "targetVersionVerifyAlgorithm": "RSA",
                "targetVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                "targetVersionCertification": "VGVzdENBQ3JlYXRl",
                "currentVersionURL": "https://aiotamr.blob.core.windows.net/ota/version/451447b8-e7f6-48bd-ab22-8fcaba391601/產品建立 (1).txt?sv=2020-10-02&spr=https&se=2022-11-18T08%3A03%3A57Z&sr=b&sp=r&sig=CsjCgsx9TbkG1ENUoH4jbS2UhPyD6Z2DC1tz9N2QNzo%3D",
                "targetVersionURL": "https://aiotamr.blob.core.windows.net/ota/version/0bd4434e-8788-487d-94ff-50c45724080e/2022-08-23-19-24-59.log?sv=2020-10-02&spr=https&se=2022-11-18T08%3A03%3A57Z&sr=b&sp=r&sig=gMKPyETGDxwKPvvVkYYDahdIYZvMOA5l3vESFSOxWeA%3D"
            }
        },
        {
            "ecuClassId": "704a31cd-d629-406d-a233-3bdaad25ce36",
            "ecuClassName": "itachi02",
            "vendor": "NS5001",
            "ecuSerialFromOEM": "",
            "ecuSerialFromVendor": "",
            "ecuOEMSerialNumber": "1q2w3e4r",
            "ecuVendorSerialNumber": "azsxdcfv",
            "ecuFirmwareMetadata": {
                "currentVersion": "2.3.2-zxc",
                "currentVersionUrl": "version/603aec54-d9c6-4751-99b8-c5edb9aa6b32/產品建立 (1).txt",
                "currentVersionFilename": "產品建立 (1).txt",
                "currentVersionSize": "544",
                "currentVersionMD5": "asdfghjkl",
                "currentVersionVerifyAlgorithm": "RSA",
                "currentVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                "currentVersionCertification": "VGVzdENBQ3JlYXRl",
                "targetVersion": "3.0.0",
                "targetVersionUrl": "version/8fff2c6c-8d71-48e3-a8e4-105dc003bd2f/precondition.csv",
                "targetVersionFilename": "precondition.csv",
                "targetVersionSize": "288",
                "targetVersionMD5": "1234",
                "targetVersionVerifyAlgorithm": "RSA",
                "targetVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                "targetVersionCertification": "VGVzdENBQ3JlYXRl",
                "currentVersionURL": "https://aiotamr.blob.core.windows.net/ota/version/603aec54-d9c6-4751-99b8-c5edb9aa6b32/產品建立 (1).txt?sv=2020-10-02&spr=https&se=2022-11-18T08%3A03%3A57Z&sr=b&sp=r&sig=rMWNcOJ6qCegEA2ZHUWJe18POX0iWoKpEVIpmwfzpps%3D",
                "targetVersionURL": "https://aiotamr.blob.core.windows.net/ota/version/8fff2c6c-8d71-48e3-a8e4-105dc003bd2f/precondition.csv?sv=2020-10-02&spr=https&se=2022-11-18T08%3A03%3A57Z&sr=b&sp=r&sig=jNcauDW6y%2FM70DDr2UwF5tta4Bq3DsHPhkuuKzDTUn4%3D"
            }
        }
    ]
}
```
### 4. report/completeMission
- [x] Checked
```json=
原始訊息:
{
    "timestamp": 1667292750000,
    "sessionId": "6374c078e9d4f84c6560a883",
    "campaignId": "6371a58f2f0087634a454688",
    "vehicle": {
        "vehicleId": "635f3a682f554c219a511fbf",
        "vinNumber": "1QAZ2WSX3EDC"
    }
}

encode =>
{
    "payload": "eyd0aW1lc3RhbXAnOiAxNjY3MjkyNzUwMDAwLCAnc2Vzc2lvbklkJzogJzYzNzRjMDc4ZTlkNGY4NGM2NTYwYTg4MycsICdjYW1wYWlnbklkJzogJzYzNzFhNThmMmYwMDg3NjM0YTQ1NDY4OCcsICd2ZWhpY2xlJzogeyd2ZWhpY2xlSWQnOiAnNjM1ZjNhNjgyZjU1NGMyMTlhNTExZmJmJywgJ3Zpbk51bWJlcic6ICcxUUFaMldTWDNFREMnfX0=",
    "signature": "mLNwRnASHe1kxVVbIXFdXL58q/Yn1Fs13YzX5N60bwuuM7Upjw7t3HqsZ/ZE6GrGm+hn0ZmTutAW9gBW2tabYDsGI70ruEhLPmOsVZN4PK594eJ4yXJpI4Z5f1dtLKHseXeYZpPNq2fe7LmCko9UJYO1j9u4X3OHxW9qyMLc5R5ifeJn29p4H+lyGKkWO5O8bAwT0F3xRu8fDOttHkirMpih2r243HSDmDYa/j8A9/bz2X5kDwCsQyqNb6Z/E8dnPXnJ0E+yoXrJM3KGGUUMUqnoQczj1YWtE4V2PewEgEhbis7AHELrPDfloOs/siXQ66nIg+kzWpDp7urZxveH1A==",
    "identity": "1QAZ2WSX3EDC"
}
```
## Backend
### 1. Start a compaign -> setCompaign
- [x] Checked
```json=
PUT {{api}}/api/campaign/6371a58f2f0087634a454688/start

Topic: BMW/ota/789/ca5607c0-79f8-4461-88f3-6bba3349c0dd/notification/setCampaign
收到訊息:
response =
{
    "signature": "voWgJszbS7xzFTZgNk3IK8eC62x9E3jqF3f1ciomdb5uMs6RQPmnOsA95fG7nm+3wJBK6tKdcWIfQv5kLu23UwK5iHY1x77JIcvWIGy6BZGAFS41IGLSGpjqNDQQwweHcAHygs3blihbgIDXS+l19TRvcMzKWheDMHjxm7cHQ25wqZsM+gQ9XLV3iAE22IZ3WWlFtOKkr9hIBfdPGcLlJHH40o5GgJNDzFcXPxhFEjF4aIRPn/Vz4x7iTlFrGiJaUuLQCOWixyFLKhzO+KfRJlO54xJrmQVSBXn5ZK7H8TVmOrKyly3OMwSdKMu14z4i+nDnZlxOFZdXqDPiF/yF1g==",
    "payload": "eyJ0aW1lc3RhbXAiOjE2Njg1OTU4MzMyMjcsImNhbXBhaWduVG9waWMiOiJCTVcvb3RhLzYzNzFhNThmMmYwMDg3NjM0YTQ1NDY4OC9DYW1wYWlnbiIsIm1pc3Npb25Ub3BpYyI6IkJNVy9vdGEvNjM3MWE1OGYyZj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tm9kZXNPcmRlciI6IlNlcmlhbCIsIm5leHROb2RlcyI6W119LHsiZWN1Q2xhc3NJZCI6IjBjZWIzMjNlLTEwNjMtNGIyMy1hYWVhLTNkNTlhMjEyNTZmNyIsInVwcGVyQ29ubmVjdGlvblR5cGUiOiJFdGhlcm5ldCIsIm5leHROb2Rlc09yZGVyIjoiU2VyaWFsIiwibmV4dE5vZGVzIjpbeyJlY3VDbGFzc0lkIjoiNzA0YTMxY2QtZDYyOS00MDZkLWEyMzMtM2JkYWFkMjVjZTM2IiwidXBwZXJDb25uZWN0aW9uVHlwZSI6IkV0aGVybmV0IiwibmV4dE5vZGVzT3JkZXIiOiJTZXJpYWwiLCJuZXh0Tm9kZXMiOltdfV19XX19",
    "identity": "1QAZ2WSX3EDC"
}

decode response.paylaod => 得到結果
{
    "timestamp": 1668595833227,
    "campaignTopic": "BMW/ota/6371a58f2f0087634a454688/Campaign",
    "missionTopic": "BMW/ota/6371a58f2f0087634a454688/6374c078e9d4f84c6560a883/Mission",
    "sessionTopic": "BMW/ota/6371a58f2f0087634a454688/6374c078e9d4f84c6560a883/Session",
    "otaMission": {
        "ecuList": [
            {
                "ecuClassId": "0ceb323e-1063-4b23-aaea-3d59a21256f7",
                "ecuClassName": "itachi01",
                "vendor": "NS5001",
                "ecuSerialFromOEM": "",
                "ecuSerialFromVendor": "",
                "ecuOEMSerialNumber": "1q2w3e4r",
                "ecuVendorSerialNumber": "azsxdcfv",
                "ecuFirmwareMetadata": {
                    "currentVersion": "1.2.3-asd",
                    "currentVersionObjectKey": "version/451447b8-e7f6-48bd-ab22-8fcaba391601/產品建立 (1).txt",
                    "currentVersionUrl": "version/451447b8-e7f6-48bd-ab22-8fcaba391601/產品建立 (1).txt",
                    "currentVersionFilename": "產品建立 (1).txt",
                    "currentVersionSize": "544",
                    "currentVersionMD5": "asdfghjkl",
                    "currentVersionVerifyAlgorithm": "RSA",
                    "currentVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                    "currentVersionCertification": "VGVzdENBQ3JlYXRl",
                    "targetVersion": "1.2.4-asd",
                    "targetVersionObjectKey": "version/0bd4434e-8788-487d-94ff-50c45724080e/2022-08-23-19-24-59.log",
                    "targetVersionUrl": "version/0bd4434e-8788-487d-94ff-50c45724080e/2022-08-23-19-24-59.log",
                    "targetVersionFilename": "2022-08-23-19-24-59.log",
                    "targetVersionSize": "15484",
                    "targetVersionMD5": "123456",
                    "targetVersionVerifyAlgorithm": "RSA",
                    "targetVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                    "targetVersionCertification": "VGVzdENBQ3JlYXRl"
                }
            },
            {
                "ecuClassId": "704a31cd-d629-406d-a233-3bdaad25ce36",
                "ecuClassName": "itachi02",
                "vendor": "NS5001",
                "ecuSerialFromOEM": "",
                "ecuSerialFromVendor": "",
                "ecuOEMSerialNumber": "1q2w3e4r",
                "ecuVendorSerialNumber": "azsxdcfv",
                "ecuFirmwareMetadata": {
                    "currentVersion": "2.3.2-zxc",
                    "currentVersionObjectKey": "version/603aec54-d9c6-4751-99b8-c5edb9aa6b32/產品建立 (1).txt",
                    "currentVersionUrl": "version/603aec54-d9c6-4751-99b8-c5edb9aa6b32/產品建立 (1).txt",
                    "currentVersionFilename": "產品建立 (1).txt",
                    "currentVersionSize": "544",
                    "currentVersionMD5": "asdfghjkl",
                    "currentVersionVerifyAlgorithm": "RSA",
                    "currentVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                    "currentVersionCertification": "VGVzdENBQ3JlYXRl",
                    "targetVersion": "3.0.0",
                    "targetVersionObjectKey": "version/8fff2c6c-8d71-48e3-a8e4-105dc003bd2f/precondition.csv",
                    "targetVersionUrl": "version/8fff2c6c-8d71-48e3-a8e4-105dc003bd2f/precondition.csv",
                    "targetVersionFilename": "precondition.csv",
                    "targetVersionSize": "288",
                    "targetVersionMD5": "1234",
                    "targetVersionVerifyAlgorithm": "RSA",
                    "targetVersionVerifyPublicKey": "VGVzdFB1YmxpY0tleUNyZWF0ZQ==",
                    "targetVersionCertification": "VGVzdENBQ3JlYXRl"
                }
            }
        ]
    },
    "otaCampaign": {
        "campaignId": "6371a58f2f0087634a454688",
        "missionId": "6374c078e9d4f84c6560a883",
        "campaignAction": "start",
        "campaignStatus": "started",
        "vehicleClass": {
            "brand": "BMW",
            "vehicleClassName": "X1",
            "rolloutDate": "2022"
        }
    },
    "precondition": [
        {
            "id": "1001",
            "condition": "speed",
            "operator": "Equal",
            "value": "10",
            "valueType": "Integer"
        },
        {
            "id": "1002",
            "condition": "geer",
            "operator": "Equal",
            "value": "P",
            "valueType": "String"
        }
    ],
    "updatePath": {
        "ecuClassId": "55195d81-7ba2-45f5-ac05-d1ed7d701608",
        "upperConnectionType": "CAN",
        "nextNodesOrder": "Serial",
        "nextNodes": [
            {
                "ecuClassId": "e075ceba-21fc-4e00-abd9-d0a5ec5de03d",
                "upperConnectionType": "Ethernet",
                "nextNodesOrder": "Serial",
                "nextNodes": []
            },
            {
                "ecuClassId": "0ceb323e-1063-4b23-aaea-3d59a21256f7",
                "upperConnectionType": "Ethernet",
                "nextNodesOrder": "Serial",
                "nextNodes": [
                    {
                        "ecuClassId": "704a31cd-d629-406d-a233-3bdaad25ce36",
                        "upperConnectionType": "Ethernet",
                        "nextNodesOrder": "Serial",
                        "nextNodes": []
                    }
                ]
            }
        ]
    }
}
```
### 2. Pause a compaign
- [x] Checked
```json=
PUT {{api}}/api/campaign/6371a58f2f0087634a454688/pause

topic: BMW/ota/6371a58f2f0087634a454688/Campaign
收到訊息: 
response =
{
    "signature": "X6nOKq0h7NKT/ZuhhcXvcBormn95nfQn+nchnHPTeGFDi9krib2Vw5KSnyuuKe1E2uSytZM95Pu0WlYGl9UMnGY0oaVykPQoZwXZvHN3o8UKGzt+dXtK1j8bBueheEtzq3RCYAf+8an3NTi3t8Wxb10XuPAcJ9ARndaUrEs2DKzc173Q1okzaLVtxZPlCXqdQ1lbh/4YNMbcdz9d83j/rHqajfskx+Xr4jg77c/thIkoaL2XGJxSrkqFbkW+uuqBuC8tgTuBggaUqSRdySrrclXP55OaRXfxAye2MZBr1ncQi9l5ZTk6tU6jhODW0XFGATA+8ssE2fHB4lm3W8oKlA==",
    "payload": "eyJjYW1wYWlnbkFjdGlvbiI6InBhdXNlIiwiY2FtcGFpZ25JZCI6IjYzNzFhNThmMmYwMDg3NjM0YTQ1NDY4OCIsInRpbWVzdGFtcCI6MTY2ODY0NzA5NDA3NX0=",
    "identity": "BMW"
}

decode response.paylaod => 得到結果
{
    "campaignAction": "pause",
    "campaignId": "6371a58f2f0087634a454688",
    "timestamp": 1668647094075
}
```
### 3. Resume a compaign
- [x] Checked
```json=
PUT {{api}}/api/campaign/6371a58f2f0087634a454688/resume

topic: BMW/ota/6371a58f2f0087634a454688/Campaign
收到訊息: 
response =
{
    "signature": "yNLMDbf4jRhYtavHXltT1c3N65dlswWhU/NUlUNvVKiJYRNPBndjUxQu2ra9JXNsfin1l5XFAPigxV4b3VCZYBDIC7fbPdVOJWp/JS+2wmx/4ogk5fyFDBg9FQeSFMSVCwVvBAwO81OfrHjpOa9QPYzv7s1s74gXM+A3XY4V8jCgGlu6YRnYWFc8FdneXS5cEOO3zijB4hSzy+NMqVMh42mc8T5LgV7sQsIMLxNKXKFkUwP7Uw86FYMoTs7mHepajFrU26LQR7wUU0Ij86/LDr23u0ewfWFfo2gPdIT0F+P8SyHRHZVv0XXtsJ4iGxYCCPmTTWeHuY410eUy1VAoaA==",
    "payload": "eyJjYW1wYWlnbkFjdGlvbiI6InJlc3VtZSIsImNhbXBhaWduSWQiOiI2MzcxYTU4ZjJmMDA4NzYzNGE0NTQ2ODgiLCJ0aW1lc3RhbXAiOjE2Njg2NTA4OTI3OTV9",
    "identity": "BMW"
}

decode response.paylaod => 得到結果
{
    "campaignAction": "resume",
    "campaignId": "6371a58f2f0087634a454688",
    "timestamp": 1668650892795
}
```
### 4. Abort a compaign
- [x] Checked
```json=
PUT {{api}}/api/campaign/6371a58f2f0087634a454688/abort

topic: BMW/ota/6371a58f2f0087634a454688/Campaign
收到訊息: 
response =
{
    "signature": "R61kT92f9AJN1tOsMeN6AySFyy2A/vlHw7ywAWo1QZO01TU1EfZ91+6olUAZrBv25pDrnY5jLO5+Vuu3TXT4gWRNT1aSS2wp2WwRtaF7j5Qz4irnFQgt+otSMqHfVs0vwp75Jha3ZaXKnEKVdoK7Ja0ZnMsOYbaauPIcbc81eaN0cuDz56Mgqh4VgbWNGTPYf8Udo3W+wwyLydjcVNRJSDfEsycD8IEeikF6Xq/yACnpbpJkhw32y9Zo1+0sFUb0t1Hklqqi7Ww2R5C7mkWj7ycwU+mM9hHrfRye+TpSoL+XZK8GHWUBwV8mJenLMzDz8MPMh0KfR29OGTWO+SLzAA==",
    "payload": "eyJjYW1wYWlnbkFjdGlvbiI6ImFib3J0IiwiY2FtcGFpZ25JZCI6IjYzNzFhNThmMmYwMDg3NjM0YTQ1NDY4OCIsInRpbWVzdGFtcCI6MTY2ODY1MTM0ODQyNn0=",
    "identity": "BMW"
}

decode response.paylaod => 得到結果
{
    "campaignAction": "abort",
    "campaignId": "6371a58f2f0087634a454688",
    "timestamp": 1668651348426
}
```
### 5. Pause a Mission
- [x] Checked
```json=
PUT {{api}}/api/mission/6374c078e9d4f84c6560a883/pause

topic: BMW/ota/6371a58f2f0087634a454688/6374c078e9d4f84c6560a883/Mission
收到訊息: 
response =
{
    "signature": "xpSCYMZfhq7F3RTjqy5iw3gFQrMV6an5d7gOf1yFAvOfqJayG6GtakAASDQCwvdWi1OgTKPXywBc90RoWoygQLay/xtP6S5nj7rYnJ6EYONpzxWmCYJ6EZhStdndcz2u8Nd2rmzKGCuxpm2pigd+I8V6UpA0AD8YIItCw1KSrDvmZfTSkoXPFpPraLSHNEEtLFYH+EWCxHHztv6I2gVxBgCI13kV09gsPQFuVRP8xUs3wynEZ7cy+9Ekk7v+TBjK7jXRJ27b7GCZNpFjc7+rN5Q9EpvXOLxVNlkXANSIEkS2muFajQXGCC7GrVMKovHi4YBKo8NPP1IvDdRLxX7sFg==",
    "payload": "eyJzZXNzaW9uSWQiOiI2Mzc0YzA3OGU5ZDRmODRjNjU2MGE4ODMiLCJjYW1wYWlnbklkIjoiNjM3MWE1OGYyZjAwODc2MzRhNDU0Njg4IiwidGltZXN0YW1wIjoxNjY4NjUxODcwOTM2LCJjb21tYW5kIjoicGF1c2UifQ==",
    "identity": "1QAZ2WSX3EDC"
}

decode response.paylaod => 得到結果
{
    "sessionId": "6374c078e9d4f84c6560a883",
    "campaignId": "6371a58f2f0087634a454688",
    "timestamp": 1668653373902,
    "command": "pause"
}
```
### 6. Resume a Mission
- [x] Checked
```json=
PUT {{api}}/api/mission/6374c078e9d4f84c6560a883/resume

topic: BMW/ota/6371a58f2f0087634a454688/6374c078e9d4f84c6560a883/Mission
收到訊息: 
response =
{
    "signature": "jbSS32ZMEfF2VdhRHFf8kAFk2GRnafkQQoe7EIs0JjTffmOhV5cHtyXmYr7CReVdaZlLxnatUVg51H5l7JjSUSmx9+IzSABlpyhmAWXbfX0DUcJwm6a4RHS3cCEKWHdI+EP38R4fDBkqGSc22wPoC22DnC3niv4sRDHLtjUc/00GZW8JT//lVyt+ZNSXRcx7zNXMPiT1Hpv4UPlwlYEUCmv2MbnB1nxjtrdTjkelR0LhJZTbQ0hWmikpQ+4xwRQjwVhp/mxYbULHHWeNf9YeI6vG8IFi/M/5FIE3of7g8MmKfounviHHdD2Y0W4YZuzjK+c57qJAMDuiT53jmAqTPQ==",
    "payload": "eyJzZXNzaW9uSWQiOiI2Mzc0YzA3OGU5ZDRmODRjNjU2MGE4ODMiLCJjYW1wYWlnbklkIjoiNjM3MWE1OGYyZjAwODc2MzRhNDU0Njg4IiwidGltZXN0YW1wIjoxNjY4NjUzMDYyNTU0LCJjb21tYW5kIjoicmVzdW1lIn0=",
    "identity": "1QAZ2WSX3EDC"
}

decode response.paylaod => 得到結果
{
    "sessionId": "6374c078e9d4f84c6560a883",
    "campaignId": "6371a58f2f0087634a454688",
    "timestamp": 1668653062554,
    "command": "resume"
}
```
### 7. Abort a Mission
- [x] Checked
```json=
PUT {{api}}/api/mission/6374c078e9d4f84c6560a883/abort

topic: BMW/ota/6371a58f2f0087634a454688/6374c078e9d4f84c6560a883/Mission
收到訊息: 
response =
{
    "signature": "Ym8bp3pzm1C23djk05vhsJD8ahwCWtPty0B9y5y4o/yJnwqbfz5v1jSmsger2xc2Xuw2JEjcUWwDLuOdo3fnfkoyI+urCo12jRwUzXmrcgHjuABcisX9aTkqZ6Ps4yQf2cS1eVmLT0SZi56ohNGQ/cA6cv/CtHclzQz7YmMugqkwlb+BkfAX1lks4q+Ddr9ik1jSDTacmyG8BIDzDfK+Eb+iU8dwjdXDTWKHBCAJ/8xd92Jp2b+x+YQwBEsk1s7cwzSiqN2HVfS3AeM62Uzb2C0ocMAoI5NTECLbxzx4yrdz4Uwy/UILwnKql25OX9QVIUTTbK0+fz1JZLTnuGyT2A==",
    "payload": "eyJzZXNzaW9uSWQiOiI2Mzc0YzA3OGU5ZDRmODRjNjU2MGE4ODMiLCJjYW1wYWlnbklkIjoiNjM3MWE1OGYyZjAwODc2MzRhNDU0Njg4IiwidGltZXN0YW1wIjoxNjY4NjUzNTgyMTk5LCJjb21tYW5kIjoiYWJvcnQifQ==",
    "identity": "1QAZ2WSX3EDC"
}

decode response.paylaod => 得到結果
{
    "sessionId": "6374c078e9d4f84c6560a883",
    "campaignId": "6371a58f2f0087634a454688",
    "timestamp": 1668653582199,
    "command": "abort"
}
```

## OTA_P2
### 1. GenKey
- [x] Checked
```json=
[Request]
BMW/ota/DEVICETYPE/vehicleId/report/vehicle
request = {
        "timestamp": 1664326481000,
        "action": "genkey",
        "msgId": "x",
        "body": {
            "tenantId": "t123",
            "clientPublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq/dKZntyd3dzwdHAAtfNcdvIHKQeaTpVQG24rXj+opcVybDq/Eq/gpeVTg91+0mp47JVr3vg6du2aBZbllsNP9C/W8o8VBDdVBA/i8zyye6QBlHvIbEPgW0CXhe99ioqxMHN4Zm2VaQ1L/sTFMyZkRgVHa9x/DhZQU3y6tGnaAOhrRTx5QB6Wwf9U9Pr+j9GMU9nKZbbh+51kHfmFdzdWE0+pDscfyD85EDc+GZCHO6qJudhTQ1IT1NumsNDO+1B8O5boA9fgl7Q35uAglhgCDO+IyMjTahcDKHTL3877AIioot3z4WcPkNY2GzTRiM+ybQkk6zTFTZqxDzqy0TOIQIDAQAB"
        }
} 
Step1. 將request encode成 Base64String =>
"eyd0aW1lc3RhbXAnOiAxNjY0MzI2NDgxMDAwLCAnYWN0aW9uJzogJ2dlbmtleScsICdtc2dJZCc6ICd4JywgJ2JvZHknOiB7J3RlbmFudElkJzogJ3QxMjMnLCAnY2xpZW50UHVibGljS2V5JzogJ01JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBcS9kS1pudHlkM2R6d2RIQUF0Zk5jZHZJSEtRZWFUcFZRRzI0clhqK29wY1Z5YkRxL0VxL2dwZVZUZzkxKzBtcDQ3SlZyM3ZnNmR1MmFCWmJsbHNOUDlDL1c4bzhWQkRkVkJBL2k4enl5ZTZRQmxIdkliRVBnVzBDWGhlOTlpb3F4TUhONFptMlZhUTFML3NURk15WmtSZ1ZIYTl4L0RoWlFVM3k2dEduYUFPaHJSVHg1UUI2V3dmOVU5UHIrajlHTVU5bktaYmJoKzUxa0hmbUZkemRXRTArcERzY2Z5RDg1RURjK0daQ0hPNnFKdWRoVFExSVQxTnVtc05ETysxQjhPNWJvQTlmZ2w3UTM1dUFnbGhnQ0RPK0l5TWpUYWhjREtIVEwzODc3QUlpb290M3o0V2NQa05ZMkd6VFJpTSt5YlFrazZ6VEZUWnF4RHpxeTBUT0lRSURBUUFCJ319"

Step2. 將Base64String 放入欄位payload，再用clientPrivateKey對base64String做signature並放入signature欄位
=> 得到結果
{
  "payload":"eyd0aW1lc3RhbXAnOiAxNjY0MzI2NDgxMDAwLCAnYWN0aW9uJzogJ2dlbmtleScsICdtc2dJZCc6ICd4JywgJ2JvZHknOiB7J3RlbmFudElkJzogJ3QxMjMnLCAnY2xpZW50UHVibGljS2V5JzogJ01JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBcS9kS1pudHlkM2R6d2RIQUF0Zk5jZHZJSEtRZWFUcFZRRzI0clhqK29wY1Z5YkRxL0VxL2dwZVZUZzkxKzBtcDQ3SlZyM3ZnNmR1MmFCWmJsbHNOUDlDL1c4bzhWQkRkVkJBL2k4enl5ZTZRQmxIdkliRVBnVzBDWGhlOTlpb3F4TUhONFptMlZhUTFML3NURk15WmtSZ1ZIYTl4L0RoWlFVM3k2dEduYUFPaHJSVHg1UUI2V3dmOVU5UHIrajlHTVU5bktaYmJoKzUxa0hmbUZkemRXRTArcERzY2Z5RDg1RURjK0daQ0hPNnFKdWRoVFExSVQxTnVtc05ETysxQjhPNWJvQTlmZ2w3UTM1dUFnbGhnQ0RPK0l5TWpUYWhjREtIVEwzODc3QUlpb290M3o0V2NQa05ZMkd6VFJpTSt5YlFrazZ6VEZUWnF4RHpxeTBUT0lRSURBUUFCJ319",
  "signature":"MZlNt48jBmFivBjpBdyAy6CW896lGR2e46wW4ln3McLfzhMHktMdPdggVIE/ClpGjkCBPBjwBOvH0gTLAZzZELW4QYISeigwQsY5U14wSJ6QjJKWg7xihCVV37gVXyrKQBqsVXgmbRHGj/o1r6mLhEWP9hp1dS3HUTq+2Lch4RIMeJgXgHHG1c0W1KIb4CDcJPorss0jkYXQObXTE4voESRg9Hlk96eLUtBMSXkcoVbi1XJBoqMhqBtEFFwIS5MLWWIkRK/C5mmEt0HI8LaDmyXjYyEMA+YAlGQr96G9OwrW8bzS2qdYoG8t4/2DYtRwu2GrtoJ3ILoqkVqbcU+uHg==",
  "identity":"AG"
}
```
```json=
[Response]
BMW/ota/DEVICETYPE/vehicleId/notification/vehicle
response = 
{
    "signature": "o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ya0d1QnhSRlpJdnpoeWV4T01nMWRXT1Y5NTdZbG9SZmJIelZua0dVSW44YzJxTld1NDBsTXEwK3lTUHFhd2lvdnBpcDF3djlHbER3cWtXeHQ1dGpyQkZUZ0tVY0N0Ym1BeDE2bVhwVFJNaEVmcDFtbUxPWDJHOVRyQlNjNWJOdTU4QStRdUFJS1NCU0I1RFd4Wjk1Y3dlV1l2MnA5bk1oR1hwQXpPOUZVMXNVVVJ1c0NjbkVMNVJQM3VwamNUcWsraUE4TUVRL014TmxDU2NyWmRudDBkYlRhTUIwS216akZsTWtYZGdJblpOZTNySjluVHJVd1hZS3htQVRWNXVZYU1qelZKTHNjaEp5cjkzYVhhQ0VpUmdMRXY2cjcxV2VRUC80c2pMVkdmS3Y4NXNoZ3R2MzBWWnZLUWtFYlF0a2laWWl2bDk4K2J5bDlSTWFrNndJREFRQUIifSwibWVzc2FnZSI6IkFDVElPTl9TVUNDRVNTIn19",
    "identity": "AG"
}
Step1. 將response.payload decode 成class Object =>得到
msg=
{
    "msgId": "x",
    "result": {
        "code": "s0010",
        "data": {
            "serverPublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxuxsQ5y6DAbxQkaS4elTwxpTFID9mP2y9pgPUFxPisSJUzSL3HUNvVUkK+kwA1BbvMAmHPkatIaeUqkQSBQSSBzScm4PSqLRohxvkFTvC2a2/7P+EVgN2sYxtyuHiOjtX6Y9ZcqzzsNIa0TtBdBJQKbiYw/jXyIUyBoSKmcY4ZKySgsT8ZDbRM5nTsfaMWbxy/7waSOBM6s85M0S3HW/W146v3vxUeGN1Q8pQzpTiBPjoL3DjVCaLMPXZISl+y7EY5V5KAhTg1HaeeuRuHudXO8cWuWBU1pZgYGGQZ/7Wg8QQQnjj1Mo0n4RzlVfLYIgtZxwQy3Di/VUT0b5mBPk+QIDAQAB",
            "brandServerPublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyi12kGuBxRFZIvzhyexOMg1dWOV957YloRfbHzVnkGUIn8c2qNWu40lMq0+ySPqawiovpip1wv9GlDwqkWxt5tjrBFTgKUcCtbmAx16mXpTRMhEfp1mmLOX2G9TrBSc5bNu58A+QuAIKSBSB5DWxZ95cweWYv2p9nMhGXpAzO9FU1sUURusCcnEL5RP3upjcTqk+iA8MEQ/MxNlCScrZdnt0dbTaMB0KmzjFlMkXdgInZNe3rJ9nTrUwXYKxmATV5uYaMjzVJLschJyr93aXaCEiRgLEv6r71WeQP/4sjLVGfKv85shgtv30VZvKQkEbQtkiZYivl98+byl9RMak6wIDAQAB"
        },
        "message": "ACTION_SUCCESS"
    }

    
Step2. verify signature with msg.serverPublicKey + response.signature + reponse.payload 
    
```
### 2. Register mode
- [ ] Checked
### 3. Repalcement mode
- [ ] Checked
### 4. Deprecated mode
- [ ] Checked