# OTA
## Protocol:
READERID is 5 Digits
1. Hello: Topic="fabreader", Payload="READERID"
1. Start: Topic="fabreader/READERID/startOTA", Payload=UID of Card
1. Request: Topic="fabreader/READERID/requestOTA", Payload=256 Bytes APDU Command
1. Response: Topic="fabreader/READERID/responseOTA", Payload=256 Bytes APDU Response
1. Stop: Topic="fabreader/READERID/stopOTA", Payload=NULL
1. Cancel: Topic="fabreader/READERID/cancelOTA", Payload=UID of Card
1. Restart: Topic="fabreader/READERID/restartOTA", Payload=NULL

## Procedure:
After Start Reader sends "Hello".

After new Card is on Reader:
"Start" -> to Server
"Request" <- from Server
"Response" -> to Server

Repeat Request and Response until:  
"Stop" <- from Server
"Cancel" -> to Server

If FabReader works as deadmen switch the OTA connection is not stopped and the next check can be started with restartOTA.
If DESFire Card uses Random UID the UID changes every new connection, so the connections stays active until the server restartsOTA and performs new OTA.

# Display
## Protocol
1. Title: Topic="fabreader/READERID/display/title", Payload=Title Text
2. Info: Topic="fabreader/READERID/display/info", Payload=Info Text