npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

netrigctl-node

v1.0.0

Published

A Node.js client for rigctld, the Hamlib TCP server for controlling amateur radio transceivers.

Readme

netrigctl-node

This project is a Node.js class designed to interface with rigctld, the Hamlib TCP server for controlling amateur radio transceivers.

Features

  • TCP connection to rigctld.
  • Command queuing mechanism to handle sequential commands.
  • Support for various rigctld commands (get_freq, set_freq, get_mode, set_mode, get_level, set_level, etc.).
  • Event emitters for connection status (connect, end, close, error) and successful dump state parsing (dumpStateParsed).

Installation

npm install netrigctl-node

Then, in your code:

const { RigClient } = require('netrigctl-node'); // Adjust the path as needed

Make sure you have rigctld running and accessible from the host where your Node.js application is running.

Usage

  1. Instantiate the client:

    const rigClient = new RigClient('your_rigctld_host', 4532); // Replace with your host and port
  2. Set up event listeners:

    Listen for the dumpStateParsed event before sending commands that rely on rig capabilities.

    rigClient.on('dumpStateParsed', async (dumpState) => {
        //console.log('Dump State Parsing Complete:', dumpState);
        // Now you can access and use the parsed data in the dumpState object
        // e.g., console.log(dumpState.rxRanges);
       
        try {
            const freq = await rigClient.get_freq();
            console.log('Current Frequency:', freq);
       
            const pttStatus = await rigClient.get_ptt();
            console.log('Current PTT Status:', pttStatus);
       
            await rigClient.set_freq(14270000);
            console.log('Set frequency to 14.27 MHz');
       
            const newFreq = await rigClient.get_freq();
            console.log('New Frequency:', newFreq);
       
            await rigClient.set_mode('USB', 3000);
            console.log('Set mode to USB 3000');
       
            const { mode, passband } = await rigClient.get_mode();
            console.log('Current Mode:', mode, 'Passband:', passband);
       
            const  nr  = await rigClient.get_level('NR');
            console.log('Current NR:', nr);
       
       
        } catch (error) {
            console.error('Command execution error:', error);
        } finally {
             rigClient.disconnect(); // Disconnect when done
        }
    });
       
    rigClient.on('error', (err) => {
        console.error('RigClient Error:', err);
    });
       
    rigClient.on('close', (hadError) => {
        console.log('RigClient connection closed.');
    });
  3. Connect to rigctld:

    rigClient.connect()
        .then(() => console.log('Connected to rigctld'))
        .catch(err => console.error('Connection failed:', err));
  4. Disconnect:

    rigClient.disconnect();

Command Timeout

Commands queued via queueCommand have a default timeout of 10 seconds. If a response is not received within this time, the command's Promise will be rejected with a timeout error. You can specify a different timeout when calling queueCommand (although the public methods like get_freq do not currently expose this option, it's available internally).

Dump State Parsing

The RigClient automatically parses the \dump_state output into a structured object available via rigClient.getDumpStateData() after the dumpStateParsed event. This data includes supported frequency ranges, modes, filters, and capability bitmasks, which are used internally for the checkCapability method.

Error Handling

Errors (connection errors, rigctld errors, command timeouts) are emitted via the 'error' event and also cause the specific command's Promise to be rejected.