diff --git a/frontend/index.html b/frontend/index.html
index f21df42..d2a1c6b 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -372,6 +372,7 @@ const STATE = {
currentSessionId: null,
currentSessionName: null,
sessionViewId: null,
+ sessionStarted: null,
livePoller: null,
messages: [],
typeCounts: [],
@@ -467,6 +468,23 @@ function fmt_elapsed(e) {
return `${String(s).padStart(4, '0')}.${String(ms).padStart(3, '0')}`;
}
+function fmt_absolute(e) {
+ // Absolute wall-clock time of a message: session/capture start
+ // (sessions.started, local time) + message elapsed offset.
+ if (!STATE.sessionStarted) return null;
+ const t = new Date(STATE.sessionStarted);
+ if (isNaN(t)) return null;
+ t.setMilliseconds(t.getMilliseconds() + Math.round(e * 1000));
+ const p = (n, w) => String(n).padStart(w || 2, '0');
+ return `${t.getFullYear()}-${p(t.getMonth() + 1)}-${p(t.getDate())} ` +
+ `${p(t.getHours())}:${p(t.getMinutes())}:${p(t.getSeconds())}.${p(t.getMilliseconds(), 3)}`;
+}
+
+function detail_time_html(msg) {
+ const abs = fmt_absolute(msg.elapsed);
+ return abs ? `${fmt_elapsed(msg.elapsed)} · ${abs}` : fmt_elapsed(msg.elapsed);
+}
+
function fmt_data(hex, limit) {
limit = limit || 32;
const pairs = (hex || '').match(/.{1,2}/g) || [];
@@ -920,19 +938,19 @@ function showDetail(msg, entry) {
const decoded = msg.decoded;
if (msg.type === 'gap') {
- d.innerHTML = `
+ d.innerHTML = `
⚠ ${t('The device disconnected and reconnected — some APDUs may be missing from this trace.')}
`;
return;
}
if (!decoded) {
- d.innerHTML = `
+ d.innerHTML = `
No decoded data available for this message type.
`;
return;
}
if (decoded.type === 'change') {
- d.innerHTML = `
+ d.innerHTML = `
| Flags | ${decoded.flags.join(', ') || 'no changes'} |
@@ -942,7 +960,7 @@ function showDetail(msg, entry) {
}
if (decoded.type === 'fidi') {
- d.innerHTML = `
+ d.innerHTML = `
| Fi | ${decoded.fi_val} (index ${decoded.fi}) |
@@ -955,7 +973,7 @@ function showDetail(msg, entry) {
if (decoded.type === 'atr' || decoded.type === 'pps') {
const rows = atrPpsRows(decoded);
- d.innerHTML = `
+ d.innerHTML = `
${rows.map(([l, v]) => `| ${l} | ${v} |
`).join('')}
@@ -1024,7 +1042,7 @@ function showDetail(msg, entry) {
d.innerHTML = `
@@ -1466,6 +1484,7 @@ async function startCapture() {
const data = await API.startCapture();
STATE.captureActive = true;
STATE.currentSessionId = data.session_id;
+ STATE.sessionStarted = data.started;
STATE.messages = [];
_lastAfter = 0;
STATE.mapExpanded.clear();
@@ -1623,6 +1642,7 @@ async function loadSession(id) {
const data = await API.getSession(id, 0);
STATE.sessionViewId = id;
+ STATE.sessionStarted = data.session.started;
STATE.captureActive = false;
STATE.currentSessionName = data.session.name || t('Session #') + id;
STATE.messages = data.messages;
@@ -1881,7 +1901,7 @@ function onFilterChange() {
}
// ──────────────────── Versioning ────────────────────
-const PWA_VERSION = '1.16.1';
+const PWA_VERSION = '1.17.0';
const MIN_SERVER_VERSION = '1.0.0';
function parseVersion(v) {
diff --git a/frontend/sw.js b/frontend/sw.js
index f6ba6c8..d4faf00 100644
--- a/frontend/sw.js
+++ b/frontend/sw.js
@@ -1,4 +1,4 @@
-const CACHE = 'simtrace-analyser-v23';
+const CACHE = 'simtrace-analyser-v24';
const PRECACHE = [
'index.html',
diff --git a/pyproject.toml b/pyproject.toml
index 5c5de61..3c7f5a6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.backends._legacy:_Backend"
[project]
name = "simtrace2-pysniff"
-version = "1.16.1"
+version = "1.17.0"
description = "Python-based sniffing tool for SIMtrace2 hardware (SIM card communication sniffer)"
readme = {file = "README.md", content-type = "text/markdown"}
license = {text = "GPL-2.0-or-later"}
diff --git a/simtrace2_pysniff/__init__.py b/simtrace2_pysniff/__init__.py
index 5b297ff..9790553 100644
--- a/simtrace2_pysniff/__init__.py
+++ b/simtrace2_pysniff/__init__.py
@@ -6,7 +6,7 @@ from .gsmtap import GsmtapSender, GsmtapReceiver
from .pcap import PcapWriter
from .dump import FileDumper, format_message
-__version__ = '1.16.1'
+__version__ = '1.17.0'
__all__ = [
'SniffSession',
'DeviceDisconnected',
diff --git a/tests/test_pcap_import.py b/tests/test_pcap_import.py
index d5df490..7e5ab53 100644
--- a/tests/test_pcap_import.py
+++ b/tests/test_pcap_import.py
@@ -197,7 +197,7 @@ class TestImportEndpoint(unittest.TestCase):
class TestVersion(unittest.TestCase):
def test_package_version(self):
from simtrace2_pysniff import __version__
- self.assertEqual(__version__, '1.16.1')
+ self.assertEqual(__version__, '1.17.0')
def test_status_includes_version(self):
import os