mrfylke / hwb-standard

MQTT topic and payload specification for Sales Client Hardware Integration for Buses in Norway
https://hwb.developer.frammr.no/
Other
0 stars 0 forks source link

Specification: APDU Communication #10

Closed mikaelbr closed 1 year ago

mikaelbr commented 1 year ago

Scenario and Use Case

How to communicate by APDU

Topics:

validators/[deviceId]/apdu/request

Send sett med kommandoer til device

validators/[deviceId]/apdu/response

Motta response fra kommandosett fra device.

Topguy commented 1 year ago

Quick example/suggestion for:

apdu/request

{
    "trace_id":"40012a1d-ca90-435b-9418-78416e873421",
    "commands":[
        {"command_id":1,"frame":"WgCAVw=="},
        {"command_id":2,"frame":"vQwAAAAQAAA="},
        {"command_id":3,"frame":"WgGAVw=="},
        {"command_id":4,"frame":"Cgc="}
    ],
}

apdu/response

{
    "travelcard_id": "691250467",
    "trace_id": "40012a1d-ca90-435b-9418-78416e873421",
    "results": [
        {
            "command_id": 1,
            "frame": "AA=="
        },
        {
            "command_id": 2,
            "frame": "AJCAAAIpM6UjpXwAKAACgEA="
        },
        {
            "command_id": 3,
            "frame": "AA=="
        },
        {
            "command_id": 4,
            "frame": "r///////////"
        }
    ],
}