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

@serialpilot/driver-at

v0.1.0

Published

AT-command framework for serialpilot — cellular modems (SIMCom, Quectel, u-blox), LoRa modems, ESP-AT firmware, any AT-speaking device.

Readme

@serialpilot/driver-at

Generic AT-command framework for SerialPilot. Drives any device speaking the AT command protocol — cellular modems (SIMCom SIM800/SIM7600, Quectel BG95/EC25, u-blox SARA-R5), LoRa modems (RN2483, Murata), and WiFi-via-AT firmware (ESP-AT).

Provides a tiny sendCommand() core, multi-line response handling, automatic dispatch of unsolicited result codes (URCs), and 5 standard 3GPP helpers. Builds on @serialpilot/driver-kit's Device + LineBuffer primitives.

Install

npm install serialpilot @serialpilot/driver-at

Quick start

import { SerialPilot } from 'serialpilot'
import { AtModem } from '@serialpilot/driver-at'

const port = new SerialPilot({ path: '/dev/ttyUSB0', baudRate: 115200 })
const modem = new AtModem({ transport: port, echo: false })

modem.on('urc', ({ line }) => console.log('URC:', line))

await modem.open()

console.log('Identity:    ', await modem.getIdentity())
console.log('IMEI:        ', await modem.getImei())
console.log('ICCID:       ', await modem.getIccid())
console.log('Signal:      ', await modem.getSignalStrength())
console.log('Registration:', await modem.getNetworkRegistration())

// Send any AT command directly:
const r = await modem.sendCommand('AT+CFUN?')
console.log(r.lines, r.finalResult)

await modem.close()

API

class AtModem extends Device

| Method | AT verb | Returns | | --- | --- | --- | | sendCommand(cmd, opts?) | (verbatim) | Promise<AtResponse> | | getIdentity() | ATI | Promise<string> | | getImei() | AT+CGSN | Promise<string> | | getIccid() | AT+CCID | Promise<string> | | getSignalStrength() | AT+CSQ | Promise<SignalStrength> | | getNetworkRegistration() | AT+CREG? | Promise<NetworkRegistration> |

Constructor options

new AtModem({
  transport: Transport,    // any @serialpilot/driver-kit-compatible transport
  echo?: boolean,          // true = strip echoed command lines (default false)
})

Events

| Event | Payload | Notes | | --- | --- | --- | | 'urc' | {line: string} | One per inbound line received while no command is in flight | | Inherited | 'open' \| 'close' \| 'state' \| 'error' \| 'data' | From Device |

Errors

sendCommand() and the helpers reject with a typed AtError (Error with .code):

| Code | Meaning | | --- | --- | | ERROR | Modem responded with ERROR | | CME:<n> | Modem responded with +CME ERROR: <n> (extended equipment error) | | CMS:<n> | Modem responded with +CMS ERROR: <n> (SMS error) | | TIMEOUT | No final result within timeoutMs (default 1000) | | CLOSED | Device was closed while the command was in flight | | WRITE_FAILED | Transport write failed mid-command | | PARSE_FAILED | Helper could not extract the expected value from the response (e.g. getImei() saw no IMEI line) |

Limitations (v0.1)

  • No SMS, no PDP/PPP, no built-in GPS. Send the relevant AT commands via sendCommand() for now; dedicated minors will add typed helpers.
  • URC heuristic. Lines while idle are URCs; lines while a command is in flight accumulate as the response. URCs interleaved mid-response will be misclassified — rare but possible. v0.2 will accept an optional URC-pattern list.
  • Echo is caller-declared. Pass echo: true if your modem echoes commands; v0.1 doesn't auto-detect.
  • Vendor quirks. Custom URCs and vendor-specific commands (e.g. AT+QCFG) are sent via sendCommand(); their responses come back as AtResponse.lines for you to parse.

License

MIT