Maybe we should implement this as an optional parser for Read FeliCa? (EMV was a pretty bad example i.e. hardcoded behavior with no layering)
Reads balance (and transaction history in the future once we got a romanized SFCardFan DB) for Suica-compatibles i.e. CJRC ticketing system.
Use nfc_scene_device_info to display the info for this.
Maybe optional for the PR.
Read FeliCa Lite
Analogous to Read NTAG/Ultralight.
Specialized for FeliCa Lite{,-S}. This might eventually take Link's as well.
Check the first system (no traversal). If it's Lite{,-S} or Link, dump all the high-level blocks possible.
Maybe optional for the PR (more code == longer review == more complications). The Lite reader was pretty functional right now so maybe we can include it.
For card info, we can issue a Request Service v2 + Request Service for node 0x0000 to probe if the card supports AES, DES or both
Try Request Service v2
If it fails, fall back to Request Service
If Request Service v2 succeeds:
Read the encryption identifier
Set node->key_version.aes = aes_version and node->key_version.des = des_version when card supports DES or node->key_version.des = KEY_NOT_INSTALLED when otherwise
Otherwise, if Request Service succeeds
Set node->key_version.des = des_version and node->key_version.aes = KEY_NOT_INSTALLED
Otherwise, set both to KEY_NOT_INSTALLED
On the area info and service viewer UI, print aes key version ${node->key_version.aes} and/or des key version ${node->key_version.des} when they are not KEY_NOT_INSTALLED
Figure out why nfcf patch won't read (is it only handling Lite? Yes.)
Fix crash on double entering lite system info scene (regression?) Might be more appropriate to let @nullableVoidPtr to handle this.
Plumbing for FeliCa Standard
Traversal system
Read public blocks
Enumerate over systems
Put the above 3 together
felica_read_card should automagically read Standard as well as Lite{,-S} using the above routine
Protocol version dumper (use Request Specification Version)
Force probing for Standard or Lite tags
Standard: Probe for Request System Code
Lite: Selecting Lite system code succeeds
12fc: Selecting 12fc system code succeeds
Invoke from generic NFC info scene when needed (FeliCa-specific data should be displayed on the info scene e.g. human readable IC type as title, primary system, # of systems, areas and services)
"More" button behavior
For Standard: NfcDataInfo -> FelicaData
For monolithic Lite or 12fc (IC code 0xffff): NfcDataInfo -> FelicaSystemData (how do we properly support these?)
For Lite or 12fc systems: Same as Standard
Data (FelicaData) scene
List all systems on card
Card info viewer (shows protocol version)
System viewer (FelicaSystemData) scene
List available areas and services when the node is an area
Show service info and public blocks when the node is a service
List service info at the beginning of block view like DESFire (if needed)
Print hexdump of blocks
System info viewer like DESFire (only applicable to root area) (if needed)