惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
N
Netflix TechBlog - Medium
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes
Simon Willison's Weblog
Simon Willison's Weblog
I
Intezer
L
Lohrmann on Cybersecurity
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
The Register - Security
The Register - Security
T
Threat Research - Cisco Blogs
P
Privacy & Cybersecurity Law Blog
A
Arctic Wolf
F
Fortinet All Blogs
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
V
Visual Studio Blog
Know Your Adversary
Know Your Adversary
博客园 - Franky
C
Check Point Blog
P
Privacy International News Feed
NISL@THU
NISL@THU
T
Tenable Blog
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
B
Blog RSS Feed
A
About on SuperTechFans
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
G
Google Developers Blog
WordPress大学
WordPress大学
T
Threatpost
Y
Y Combinator Blog
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
T
Tor Project blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Spread Privacy
Spread Privacy

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Logging VHF DSC distress calls in SignalK (PGN 129808)
Bryan Clark · 2026-06-24 · via DEV Community

A DSC distress alert is the most important packet a marine VHF will ever hand you, and it's structured data. When a vessel hits the red button, its radio transmits a digital selective calling burst on channel 70: format specifier, the sender's MMSI, category, nature of distress, position, and UTC time — encoded per ITU-R M.493. A DSC-equipped radio that hears it re-emits it to your network, as $--DSC/$--DSE sentences on NMEA 0183 or as PGN 129808 on NMEA 2000.

That burst arrives — and stays readable — even when the follow-up voice MAYDAY on channel 16 is garbled, stepped on, or out of range. If you might be the nearest boat, you want every received alert stored with its position and surfaced as an alarm.

Stock SignalK quietly drops most of it. This is the broke → tried → fixed of getting DSC distress calls into SignalK, with receipts for every gap. The result is signalk-dsc.

The test sentence — try it without a radio

You don't need a transmitting vessel in distress to reproduce all of this. Feed two sentences through any NMEA 0183 input (TCP, UDP, file playback):

$CDDSC,12,3380400790,12,05,00,1423108312,2019,,,S,E*69
$CDDSE,1,1,A,3380400790,00,45894494*1B

That's a format 12 (distress alert), from MMSI 338040079 (the sentence carries it * 10, with a trailing zero), category 12 (distress), nature 05 (sinking), a position field, UTC 2019, and the E expansion flag saying a $--DSE sentence follows. The second sentence is that expansion, refining the position. Both together are one incident.

Now walk through what stock SignalK does with each, and where it falls short.

Gap 1: the 0183 hook misses sparse distress alerts — and persists nothing

The DSC field layout (sentence id and checksum already stripped) is:

        0  1          2  3  4  5          6    7 8 9 10
        |  |          |  |  |  |          |    | | | |
 $--DSC,XX,XXXXXXXXXX,XX,XX,XX,XXXXXXXXXX,XXXX,,,A,C*hh

  0: format specifier (12 = distress alert)
  2: category (00 routine / 08 safety / 10 urgency / 12 distress)
  3: nature of distress
  5: position (quadrant + ddmm + dddmm)
  6: UTC time hhmm
 10: expansion flag — 'E' means a $--DSE sentence follows

The upstream issue here is SignalK/nmea0183-signalk#217: some radios emit a distress alert with the category field empty — it's redundant, because format 112 is a distress alert by definition. The stock parser treats the empty category as "not a distress call" and the alert evaporates.

signalk-dsc registers its own DSC parser (a superset of the stock hook) that infers the category from the format when it's missing:

let categoryCode = field(parts, 2);
// Some radios omit the category on distress alerts — it is implied by
// format 112 (see SignalK/nmea0183-signalk#217).
if (!categoryCode && formatCode === '12') categoryCode = '12';

The whole parser is tolerant by design: anything it can't interpret stays undefined, and the raw sentence is always kept alongside the parsed fields. That's the second half of the gap — even when the stock hook does fire, it raises a transient notification and stores nothing. There is no record afterward. A distress alert with no persistence is a distress alert you can't act on the moment you look away from the screen.

signalk-dsc appends every received call to an on-disk JSONL log and serves the history at /signalk/v2/api/resources/dsc-calls (anonymously readable under allow_readonly):

app.registerResourceProvider({
  type: 'dsc-calls',
  methods: {
    async listResources() { /* every stored call, by id */ },
    async getResource(id) { /* one call */ },
    setResource() { throw new Error('dsc-calls is read-only'); },
    deleteResource() { throw new Error('dsc-calls is read-only'); },
  },
});

The store is deliberately boring — append-only JSONL, synchronous I/O, full-file compaction past a cap. DSC traffic is rare (a busy day within range of a coast station might see dozens of calls), so the simplest thing that survives a power cut mid-write wins: a torn last line is skipped on load, the rest is kept.

Gap 2: $--DSE position refinement, which the stock parser ignores entirely

The position in the DSC sentence is truncated to whole minutes — about ±1 NM. That's coarse for a search. The optional $--DSE expansion sentence carries the missing precision, down to ten-thousandths of a minute:

        0 1 2 3          4  5
        |_|_|_|__________|__|________
 $--DSE,t,n,A,XXXXXXXXXX,00,llllyyyy*hh

  3: address — MMSI * 10, same convention as DSC
  4+: (code, data) pairs; code 00 = enhanced position,
      data = 4 digits lat + 4 digits lon, in 1/10000 of a minute

The stock parser doesn't handle DSE at all. signalk-dsc pairs an incoming DSE with the matching DSC call it stored in the last two minutes (same MMSI, position still at minute resolution) and refines it. DSC truncates toward zero, so the fractional minutes always extend the magnitude — sign-preserving:

function refinePosition(position, ext) {
  const extend = (value, minuteFraction) => {
    const sign = value < 0 ? -1 : 1;
    return sign * (Math.abs(value) + minuteFraction / 60);
  };
  return {
    latitude: extend(position.latitude, ext.latMinuteFraction),
    longitude: extend(position.longitude, ext.lonMinuteFraction),
  };
}

The stored call's positionResolution flips from minute to enhanced, and the refined position goes out as a delta. ±1 NM becomes a tight fix.

Gap 3: n2k-signalk has no PGN 129808 mapping at all

On NMEA 2000, a DSC call is PGN 129808, "DSC Call Information." n2k-signalk — the converter that turns N2K into SignalK deltas — produces no delta for it. There's nothing to subscribe to.

So signalk-dsc goes one layer down and listens to the server's analyzer stream directly:

const DSC_PGN = 129808;

function onPgn(pgnData) {
  if (!started || !pgnData || pgnData.pgn !== DSC_PGN) return;
  record(normalizePgn129808(pgnData), { source: 'n2k', raw: pgnData.fields });
}

app.on('N2KAnalyzerOut', onPgn);

Normalizing 129808 is fiddly because canboatjs may resolve the enumerations to their names or pass through the raw ITU symbol numbers when a lookup misses, and the distress vs. general variants use different field names. The mapping handles both — name and number — for format, category, and nature:

const NATURES = new Map([
  ['sinking', 'sinking'],
  ['man overboard', 'mob'],
  ['flooding', 'flooding'],
  // ...resolved names above; raw ITU symbols below
  [5, 'sinking'],
  [10, 'mob'],
  [1, 'flooding'],
]);

Both transports — 0183 and N2K — land in the same canonical event shape, so everything downstream (storage, alarms, logbook) is transport-agnostic.

Alarms under your own vessel — and surviving a restart

Every received distress/urgency/safety call raises a notification under self so the vessel's own alarm chain fires. The category maps straight onto SignalK's severity ladder:

const NOTIFICATION_STATES = {
  distress: 'emergency',
  urgency:  'alarm',
  safety:   'alert',
};
// → notifications.dsc.distress / .urgency / .safety

Routine calls never alarm. DSC distress alerts auto-repeat until acknowledged, so a naive implementation would re-alarm every few minutes; instead, a repeat inside a 5-minute window bumps a repeats counter on the stored call rather than firing again.

The subtle one: SignalK notifications live in memory. If the server restarts mid-incident, an active distress alarm silently vanishes — and a received MAYDAY must not disappear because the server bounced. So on start, signalk-dsc re-raises the newest alert per category that's still fresh (within the last hour):

reannounceTimer = setTimeout(() => {
  const now = Date.now();
  const reannounced = new Set();
  const events = store.list();
  for (let i = events.length - 1; i >= 0; i--) {
    const event = events[i];
    if (!NOTIFICATION_STATES[event.category] || reannounced.has(event.category)) continue;
    const at = Date.parse(event.lastReceivedAt || event.receivedAt);
    if (now - at <= REANNOUNCE_WINDOW_MS) {
      notify(event);
      reannounced.add(event.category);
    }
  }
}, 30000);

The 30-second delay is deliberate: it lets position providers come up first, so the spoken alert can say "2.3 nautical miles northwest" instead of reading out raw coordinates.

Voice-sized message vs. full log detail

The notification message gets spoken by a voice pipeline, so it's deliberately minimal — type, vessel, situation, range and direction from own position, action, and nothing else:

DSC distress alert: vessel Wind Chaser, sinking, 2.3 nautical miles
northwest. Monitor channel 16.

Note what's not spoken: the MMSI. Text-to-speech reads 366123456 as "three hundred sixty-six million…", which is useless and slow on a safety alert. (The plugin never speaks an MMSI — a small but real design rule.) The full detail lands in the call log and a GMDSS-style logbook entry instead:

[DSC] DISTRESS alert from Wind Chaser (MMSI 338040079): sinking.
position 48°47.700′N 123°12.300′W at 20:19 UTC, 2.3 NM northwest of us. via nmea0183

The vessel name, when present, comes from AIS static data already in the data model — not from the DSC sentence, which only carries the MMSI.

Why a log, specifically

Capturing the alert and alarming on it is the operational case. The reason to also persist it as a log entry is older than SignalK by about a century.

Recording distress traffic is the long-standing radio-station regulatory standard. The cleanest US statement is 47 CFR § 80.409 (FCC station logs). The radiotelegraph-log subsection, (d)(4):

All distress calls, automatic-alarm signals, urgency and safety signals made or intercepted, the complete text, if possible, of distress messages and distress communications, and any incidents or occurrences which may appear to be of importance to safety of life or property at sea, must be entered, together with the time of such observation or occurrence and the position of the ship or other mobile unit in need of assistance.

The load-bearing phrase is "made or intercepted." The rule isn't only about the distress you declare — it explicitly covers the traffic you receive. That's exactly what a DSC receiver does: it intercepts. The required fields — text of the distress, the time, and the position of the station in need of assistance — are precisely what a DSC burst (plus its DSE refinement) carries, which is why the plugin stores all three. The radiotelephone-log equivalent is subsection (e).

The honest caveat, because a knowledgeable reader will poke at an overstated claim: applicability is subsection (f), and the log mandate binds compulsorily-equipped / GMDSS / SOLAS-class / Great Lakes / Bridge-to-Bridge stations — not voluntary recreational stations. A private sailor is generally not legally required to keep this log. Internationally the same duty flows from SOLAS Chapter IV and the ITU Radio Regulations; Canada's equivalent is TP 1539 (Ship Station Radio Technical Regulations), which is the relevant one for a boat working BC waters.

So the accurate framing is narrow and worth getting right: the law doesn't force a recreational station to keep a distress log — but the standard it sets for stations that are required to is a good one, and the data to meet it is already arriving on your network. signalk-dsc gives you that same SOLAS-grade record automatically. (For the practical side of receiving DSC distress alerts, the USCG NavCen DSC Distress page is the reference.)

The shape of it

$--DSC ─┐
$--DSE ─┼─→ canonical DSC event ─┬─→ JSONL log  (/resources/dsc-calls)
PGN 129808 ─┘                    ├─→ notifications.dsc.<category>  (alarm chain)
                                 ├─→ voice-sized spoken message
                                 ├─→ remote-vessel position delta  (chartplotter)
                                 └─→ GMDSS-style logbook entry  (signalk-logbook)

Two wire formats, three things stock SignalK drops, one canonical event, five sinks. A received distress alert no longer vanishes the moment you look away.

This is one piece of an all-electric charter-catamaran ops stack — the radio should keep the log the regulations describe whether or not anyone's watching the screen. Code's here: signalk-dsc.