Disclaimer

This document is only collection of author’s notes, experiences and point of views. It is not, in any meaning, either complete description of the topic nor official RTB documentation. It may be inaccurate, incomplete, obsolete, misleading or completely wrong. It may even cause loss of data or damage system integrity. It may not comply with company codex, values, presentation style or economic interests or may reveal company secrets.

As such, it is absolutely prohibited to distribute this document outside of RTB & Co. GmbH. Such an action may result into legal acts against both the sender and the company. It is only intended, after review of technical and presentational correctness and accuracy, to be used as an information source for official documentation.

Always contact documentation department for information about current presentation style and allowed formats before creating customer’s documentation.

 _ .-') _         _  .-')           ('-.                            .-') _
( (  OO) )       ( \( -O )         ( OO ).-.                       (  OO) )
 \     .'_        ,------.         / . --. /         ,------.      /     '._
 ,`'--..._)       |   /`. '        | \-.  \       ('-| _.---'      |'--...__)
 |  |  \  '       |  /  | |      .-'-'  |  |      (OO|(_\          '--.  .--'
 |  |   ' |       |  |_.' |       \| |_.'  |      /  |  '--.          |  |
 |  |   / :       |  .  '.'        |  .-.  |      \_)|  .--'          |  |
 |  '--'  /       |  |\  \         |  | |  |        \|  |_)           |  |
 `-------'        `--' '--'        `--' `--'         `--'             `--'

1. Data transfer from PDM

Proposal how to transfer data from PDM without necessity to open second port and use binary transfer.

2. Log transfer

2.1. Work flow

  1. User express intention to download logs

    1. Q: PM needs to define where and how.

  2. PDM control will request via keep alive, log download.

  3. PDM sends [negative, persistent, INFO] MNR100 to indicate that logs will be transferred at some time in future.

  4. PDM sends [positive, OK] MNR102 to indicate finished log transfer.

2.2. Log query

To define which logs to download, mnemonic LRQ (Log Range Query) will be used. It contains JSON data which defines which part of log file is required to transfer.

Example of log range query
{
    from:"2020-01-10T12:53:11.120",
    to:"2020-01-10T13:27:46.547",
    level:1,(1)
    components:["SysError","SdCard"]
}
1 at least this level and higher
Example of with WIW
WIW53;LRQ{from:"2020-01-10T12:53:11.120", to:"2020-01-10T13:27:46.547", level:1, components:["SysError","SdCard"]}

2.3. Log transfer

Log entries will be transferred same way as they are now. Each record will be written to the database. User can then browse the logs in UI or export them as usually.

Current implementation of log transfer
PSA00056; GAC09020; DTM2021-02-25T08:41:00; VER7.5.4.78; PID1300A48DE5; KEE; KAI0005;
OPI{M:M17520 72,0 UMTS, SD:0x00, WU:47774 Bat:{a:12.6,n:12.5}}; DBG[{"cat":"CardPay","level":"1","time":"08:40:27.953","msg":"08637 TransID C:5434xxxxxxxx5017 32130056 00010063 436891 Am:400"}];

Please note, that DBG mnemonic can contain multiple entries.

3. Configuration transfer

3.1. Workflow

  1. User somehow express intention to download configuration.

  2. PDM confirms the request by [negative, persistent, INFO] MNR103 that configuration data will be downloaded in future.

  3. After transfer PDM sends [positive, OK] MNR104

3.2. Data transfer

Current version of protocol does not allow to transfer binary data in the direction PDM → Control. However a binary data converted to Base64 can be transferred without any problem. Because configuration files are relatively small and they will be rarely transferred, the overhead generated by Base64 should not be a problem. Then configuration data can be transferred like this.

{
    part:{
        content: "config",(1)
        encoding: "base64"(2)
        nr: 1,
        total: 2,
        crc: "12AB"
    },
    data:"SGksIEknbSBQRE03IGNvbmZpZ3VyYXRpb24="

}
1 May be not needed in the first step.
2 Encoding of data. Use + for multiple. E.g. gzip+base64 means: at first was applied gzip and then base64.

Captured data will be stored to the database to the database and provided to the user for download.