Skip to content

extended pager demodulator plugin, log to SQLite, filter messages by dictionnary or Regex, block by adresses or messages

License

Neronron/sdrangel-demodpager-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pager Demodulator Log plugin

DemodPagerLog

Introduction

This plugin is a logging-focused fork of SDRangel’s Pager Demodulator.

It demodulates POCSAG pager messages and adds SQLite logging controls, block-list filters, and “human-readable” tagging via regex or a dictionary.

Multiple instances of the plugin can write on the same SQlite DB simultaneously.

Quick install

  1. Download PagerDemodLog-7.22.8-Qt6.7.3-msvc2022-x64.zip.

  2. Unzip into your SDRangel install folder (where SDRangel.exe is).

Final layout:
     - SDRangel folder/
         - SDRangel.exe
         - Qt6Sql.dll                 
         - plugins/
             - demodpagerlog.dll
         - sqldrivers/
             - qsqlite.dll
  1. Start SDRangel → Add channel → “Pager Demodulator Log”.

If DB logging doesn’t work:

  • Ensure sqldrivers/qsqlite.dll exists next to SDRangel.exe.
  • Versions must match (SDRangel 7.22.8 & Qt 6.7.3 & MSVC 2022-x64).

Interface

The top and bottom bars of the channel window are described here.

1: Filter duplicates

Toggle duplicate filtering. Right-click for options (match adresses and messages by default, options to match message only and last only). Duplicate filtering affects logging coherently (CSV and DB).

2: Notifications

Opens the notifications dialog (highlighting, speech/command actions, map plotting).

3: Start/Stop recording

Single button that starts/stops logging for both CSV and SQLite backends (subject to each backend’s “Use …” checkbox below).

4: Only log human-readable

Two checkboxes:

  • Only log human readable to CSV
  • Only log human readable to DB

When enabled the row is logged only if a human-readable tag is detected (see sections 7-8).

5: Use CSV + path

Enable/disable CSV logging and choose the output file path.

CSV columns match the table: Date, Time, Address, Function Bits, Alpha, Numeric, Even Parity Errors, BCH Parity Errors.

6: Use SQLite + path

Enable/disable SQLite logging and choose a database file path. See schema in the SQLite section below.

7: Custom regex

A multi-line list of QRegularExpression patterns used to tag messages as human-readable.

The header row includes an Enable custom regex checkbox.

If a line starts with label: the label is stored in the DB tag.

Examples:

  • phone_e164:^+[1-9][0-9]{5,14}$
  • phone: (?:(?<!\d)0(?:[1-9])(?:[ .-]?\d{2}){4}(?!\d)|(?<!\d)0\d{9}(?!\d))
  • date: (?<!\d)(?:\d{2}[.-/ ]\d{2}[.-/ ]\d{4}|\d{4}[.-/ ]\d{2}[.-/ ]\d{2})(?!\d)

8: Dictionary detection

Enable dictionary, select a text file (one token per line), and set:

  • Min word len: minimum token length
  • Min word count: minimum number of distinct tokens found to tag a message
Dictionary matching is accent-insensitive and uses lower-cased tokens.

9: Block log filters (one per line)

Rules to block logging to CSV and DB before writing.

These do not affect display in "Received Messages".

Format: ADDRESS:MESSAGE with keywords:

  • ALL: match any
  • EMPTY: empty message

Examples:

0000001:ALL     # block all messages from address 0000001 
ALL:EMPTY       # block empty messages from any address 
0001234:Test    # block if displayed message equals "Test" for address 0001234 

A master checkbox Enable block filters turns this feature on/off.

10: Received Messages table

Columns:
  • Date, Time, Address, Message, Function, Alpha, Numeric, Even PE, BCH PE
Rows are highlighted in green if a human-readable tag is detected by regex/dictionary.

Logging behavior

  • Start/Stop recording applies to both CSV and DB (if their “Use …” checkbox is enabled).
  • Block list is applied before logging and affects CSV and DB identically.
  • Duplicate filtering can skip logging duplicates (consistent across CSV/DB).
  • Only human-readable (CSV/DB) logs rows only when a non-empty tag is detected.

SQLite

The database is created if missing with WAL journaling for responsiveness. Table schema:

 CREATE TABLE IF NOT EXISTS pocsag_messages (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  date TEXT NOT NULL, time TEXT NOT NULL,
  address INTEGER NOT NULL,
  function_bits INTEGER NOT NULL,
  alpha TEXT,
  numeric TEXT,
  even_pe INTEGER,
  bch_pe INTEGER,
  readable_tag TEXT,-- e.g. 'alpha:regex:phone_fr' or 'alpha:dict:3' 
  rx_hz INTEGER, -- capture frequency (center + offset) 
  created_at TEXT DEFAULT CURRENT_TIMESTAMP ); 

Windows runtime note

Ensure Qt’s SQLite driver is deployed alongside SDRangel:

<SDRangel.exe>/sqldrivers/qsqlite.dll

Without it, the GUI will load but DB writes will not occur.

Build

This plugin is designed to be built in-tree with SDRangel.

Prerequisites

Qt 6 (Widgets/Core/SQL), CMake ≥ 3.16, C++17 compiler, SDRangel source tree.

Location

Place sources under:

sdrangel/plugins/channelrx/demodpager_log/

Targets

  • GUI plugin: demodpagerlog

Notes

  • Regex are Qt QRegularExpression (case-insensitive by default).
  • Dictionary matching is accent-insensitive on lower-cased tokens.

Credits & license

This is a fork of SDRangel’s Pager Demodulator. Copyrights remain with their respective owners. License: GPLv3, same as SDRangel.

About

extended pager demodulator plugin, log to SQLite, filter messages by dictionnary or Regex, block by adresses or messages

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published