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

maptorium-gps-gate

v0.1.0

Published

USB/serial → TCP GPS NMEA gateway (Maptorium)

Readme

Maptorium GPS Gate

GitHub Release GitHub Issues License npm version

USB/serial/TCP → TCP gateway for raw GPS NMEA data.

Repository: small TypeScript utility that reads raw NMEA sentences from a serial/USB/TCP GPS device and broadcasts them to any connected TCP client(s).

Files:

Quick overview

  • Supports two inlet modes:
    • serial (default): open a local USB/serial GPS device and use it as the data source.
    • tcp: connect to a remote TCP GPS server and use that stream as the data source.
  • Starts a local TCP server and forwards every received raw byte chunk to all connected TCP clients.
  • Multiple clients are supported; data is forwarded to every connected socket.

Requirements

  • Node.js 18+ recommended
  • Unix: permission to open the serial device (e.g. /dev/ttyAcm0) — adjust udev rules or run with appropriate permissions.

Install

cd maptorium-gps-gate
npm install

Configuration Edit maptorium-gps-gate/config.js to change device path, serial options, inlet mode and TCP settings. Example keys:

  • inlet'serial' or 'tcp'. When 'serial' the gateway opens usb_device. When 'tcp' it connects to remote_host:remote_port as the data source.
  • usb_device — serial device path (e.g. /dev/ttyAcm0 or COM3).
  • options — serial port options, e.g. baudRate, dataBits, stopBits, parity.
  • port — local TCP port to listen on for downstream clients.
  • host — IP to bind (default 0.0.0.0).
  • remote_host / remote_port — when inlet is tcp, connect to this remote server to receive NMEA.

Default config See the file: maptorium-gps-gate/config.js

Development Run the TypeScript file directly (fast iteration):

npm run dev

Build + Run (production)

npm run build
npm start

Connecting a TCP client You can use nc or telnet to test:

nc localhost 5000
# or
telnet localhost 5000

Any raw NMEA bytes received from the serial device will appear in the TCP client session.

Behavior & notes

  • This gateway forwards raw bytes as received; it does not parse or alter NMEA sentences.
  • If no TCP clients are connected the bytes are read but not buffered — they are discarded (no persistent replay). -- Serial disconnect/reconnect behavior: the gateway logs serial errors. Automatic reconnect is not implemented in the current version.
  • When inlet is tcp the gateway connects to the configured remote server and forwards received bytes to local clients.
  • The gateway will automatically attempt to reconnect to the remote TCP inlet every 5000 ms by default when the connection drops. You can change this delay with remote_reconnect_ms in config.js.

Troubleshooting

  • Permission denied opening /dev/ttyAcm0: add your user to the dialout (or equivalent) group or create a udev rule.
  • Wrong device path on Linux: find the device via ls /dev/tty* after plugging the GPS/USB.
  • If the TCP server fails to start, ensure the configured port is free and the host binding is correct.

Dependencies

  • serialport — low-level serial port access

Example topologies

  • Single-network (USB host): run with inlet: 'serial' and other devices connect directly to this instance's TCP server.
  • Two-network (bridge): run one instance with inlet: 'serial' on network A; run another instance on network B with inlet: 'tcp' pointing to network A instance; local clients on network B connect to the second instance's TCP server.

License & Contact MIT-ish (same as the project). For questions contact the author in the repository.