server: add --fast-init to skip redundant card resets
pysim's init_card() resets the card once per profile candidate in CardProfile.pick(), once in RuntimeState.__init__ and again in PysimApp.equip(); on typical readers each reconnect costs ~1.3s and a normal init/equip does 7-8 of them (measured: equip 9.85s, startup ~14.8s). fastinit.py mirrors pySim.app.init_card() with the resets removed: pick_profile_no_reset() runs all profile probes back-to-back on one connection, FastRuntimeState.reset() is a software reset (select MF, clear selected_adf/scp, ATR from the transport) and the equip/reset commands are routed through do_equip_fast (one reconnect via wait_for_card) and do_reset_fast (always a physical reset). Enabled with --fast-init; stock behavior remains the default. Tests for the reset-free pick, the soft reset and the explicit reset paths. Docs updated; SW cache v88 -> v89.
This commit is contained in:
@@ -626,7 +626,9 @@ pysim-otaman-server --http-port 8080
|
||||
| `--log-requests` | Log request/response payloads to stderr |
|
||||
| `--sms-oa` / `--sms-sm-sc` | SMS-DELIVER originating address / SM-SC for PoR-in-submit |
|
||||
| `--terminal-profile` | TERMINAL PROFILE payload hex (default 10-byte GSM profile) |
|
||||
| `--poll-interval` | Idle interval before automatic STATUS polling (default 30s) |
|
||||
| `--poll-interval` | Idle interval before automatic STATUS polling (default 30s; `0` disables polling) |
|
||||
| `--fast-init` | Init/equip without redundant card resets (only explicit equip/reset resets the card) |
|
||||
| `--timing` | Log phase durations, card resets and APDU counters with elapsed timestamps |
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user