Doing some test runs on actual hardware I think I noticed that if you use game to create new card emulator will still report (GET /api/v1/insertedCard) as if no card was inserted. Technically it's true as card was dispensed, not inserted, but for purposes of creating NFC replacement I'd like to know if card is present in reader or not.
I.e. my idea of NFC replacement is as it follows:
by default emulator is configured to write into "dummy" card in case someone plays the game and requests a card without using an rfid/nfc card beforehand.*
tapping nfc reader with valid card tells emulator to "insert" card associated with its serial number
nfc controller polls emulator to see if card is present inside emulated reader, if it's not present anymore (i.e. it was ejected) it resets the emulator to dummy card
*) i checked, changing dispenser status while game is running is a bad idea - if you set dispenser to empty while it was full before game will error out and require reset, if you set it to full while it was empty before it will still act as if it's empty.
Doing some test runs on actual hardware I think I noticed that if you use game to create new card emulator will still report (
GET /api/v1/insertedCard
) as if no card was inserted. Technically it's true as card was dispensed, not inserted, but for purposes of creating NFC replacement I'd like to know if card is present in reader or not.I.e. my idea of NFC replacement is as it follows:
*) i checked, changing dispenser status while game is running is a bad idea - if you set dispenser to empty while it was full before game will error out and require reset, if you set it to full while it was empty before it will still act as if it's empty.