Tools
moka Log Extract
Drop a moka debug log and get every APDU exchange back as a readable trace and as one APDU per line, plus a specification trace: each EMVCo requirement the Entry Point and the kernel went through, in order, around the APDUs, signals and outcomes.
Or paste the content of the log
Specification trace
Every requirement the log marks as executed, such as [Book B 3.3.2.5 bullet C] or [Book C-2 S456.36], in order, grouped by Entry Point start and kernel state, with the APDUs, the ACT, MSG and OUT signals and their decoded fields, and the warnings, such as each TVR bit the kernel raises. Repeated lines are counted (×n).
Filtered log
The original log lines, reduced to what you tick: the C-APDU and R-APDU lines, and the signals whose data starts with a tag, with their label and decoded lines. Nothing ticked shows the whole log.
Readable trace
Command name, C-APDU and R-APDU with timestamps, status word and its meaning, grouped by transaction.
One APDU per line
Commands and responses alternate, in order. Each response ends with its status word. A <tap> line marks each SELECT PPSE (contactless), an <insert> line each SELECT PSE (contact), and a <mute> line replaces the response to a command the card never answered. The file starts with the terminal's dynamic data for each transaction (9A, 9F21, 9F37, 9F6A, DF8301), read from the commands along the card's DOLs; a tag is written alone when its value was not found. With DDA, 9F37 appears twice, in command order: first the value sent in INTERNAL AUTHENTICATE (DDOL, or the default DDOL 9F3704), then the value sent in GENERATE AC.
How it works
moka debug logs have one event per line: a level (DBG, SPC, WRN, CRT), the function and line that wrote it, and a message. Commands and responses are read from the PC/SC transmit lines; reader-only commands with class FF, such as GET UID, are left out. SPC lines name the EMVCo requirement being executed, CRT lines carry the signals exchanged with the kernel, and each Start A opens a transaction. Colour codes are removed.
A command without a response is written as a <mute> line. The dynamic data (9A, 9F21, 9F37, 9F6A, DF8301) is read from the commands along the card's DOLs and, when it cannot be found there, from the values the kernel writes to its database during the transaction.
Test tool logs show what crossed the contactless interface. A kernel log that names each requirement shows why: which bullet of Book B 3.3.2.5 kept or dropped a combination, which state the kernel was in when it sent a command, and where a TVR bit was set. Use it to compare an implementation with the specification step by step, or to find where two runs diverge.
Paste any response into the TLV parser to decode it, or take a SELECT PPSE response and the reader configuration to the Entry Point simulator.