Skip to content

PersoSim@SQM 2.7.0

Choose a tag to compare

@joseph0x45 joseph0x45 released this 30 Jun 12:22
· 20 commits to main since this release

PersoSim@SQM v2.7.0

Note: Versions 2.4.0–2.6.0 were internal releases not published to GitHub.
This release bundles all changes since v2.3.0.

What's New Since v2.3.0

Load profiles via HTTP (no UI required)

PersoSim can now load a .perso profile from external automation — no clicking
required, and no prior manual UI load needed. Send a POST /load request to the
control server with the absolute file path as the body:

POST http://localhost:7777/load
Content-Type: text/plain

C:\path\to\profile.perso

The call blocks until the load completes and returns a definitive result:

200  {"loaded": true,  "path": "..."}           success
500  {"loaded": false, "error": "..."}           load failed or timed out
503  {"loaded": false, "error": "no callback"}   simulator not ready yet

Error injection for read and write operations

Two new toggles let you simulate card errors during a live AusweisApp session.
When enabled, PersoSim returns 0x6982 (security status not satisfied) on reads
or writes to DG17/DG18 — the address files — while leaving all other files
unaffected so AusweisApp can still detect the card and start the flow.

GET|POST /failread   — toggle read error injection
GET|POST /failwrite  — toggle write error injection

Both are OFF by default.

Error dialog suppression

The /loaddialog toggle now suppresses both the success dialog and the error
dialog. Previously only the success dialog was suppressed.

Python client library

persosim_client.py wraps the HTTP control server for test automation.
No external dependencies — stdlib only.

from persosim_client import PersoSimClient, PersoSimError

client = PersoSimClient()                  # connects to localhost:7777
client.load("/path/to/profile.perso")     # blocks until done, raises PersoSimError on failure
client.set_load_dialog(False)              # suppress success + error dialogs
client.set_auto_reload(True)
client.set_fail_reads(True)               # inject 0x6982 on DG17/DG18 reads
client.set_fail_writes(True)              # inject 0x6982 on DG17/DG18 writes
logs = client.get_logs()                   # fetch sqm-debug.log as string

Full method list:

load(path)                  load a .perso file, blocks until done
get_logs()                  return sqm-debug.log as a string
get/set/toggle_auto_reload()
get/set/toggle_load_dialog()
get/set/toggle_fail_reads()
get/set/toggle_fail_writes()

PersoSimError is raised on network failures, load timeouts, or invalid paths.

Log viewer improvements

  • New Fail reads / Fail writes toggle buttons in the header
  • All icons replaced with Tabler Icons (no more emoji)
  • Toggle buttons turn green when ON, red when error injection is active
  • INJECTED FAIL log entries highlighted in red
  • Removed the Copy all button

Internal Changelog

v2.4.0 Load profile via HTTP (POST /load), Python client library
v2.5.0 Reliable load detection (CompletableFuture), no prior UI load required,
error dialog suppression, fail read/write endpoints
v2.6.0 Error injection scoped to DG17/DG18 only, INJECTED FAIL log entries
v2.7.0 Log viewer: fail read/write buttons, Tabler Icons, colored button states