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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dngl

v0.0.4

Published

use a 3g/4g usb data dongle to log mobile network data

Downloads

14

Readme

dngl

Use a 3g/4g USB data dongle to log mobile network data. Works with Huawei 3g-modems e173 and e220 with somewhat recent firmware, not tested with any other.

install

npm install dngl

usage

var dngl = require("dngl");

var device = new dngl("/dev/cu.HUAWEIMobile-Modem"); // put your device here

device.on("data", function(data){
	console.log(data);
});

device.on("error", function(err){
	console.error("error:", err);
});

device.on("close", function(){
	console.log("device is gone.");
});

data

The data object looks like

{
	imsi: 262075211009024,
	imei: 865633017939267,
	signal: -83,
	cell: { 
		stat: 1, 
		lac: 21934, 
		cell: 12831, 
		act: null 
	},
	service: { 
		operator: '26207', 
		mode: 2
	},
	time: 328659477
}

imsi and imei

The International Mobile Subscriber Identity imsi and International Mobile Equipment Identity imei.

signal

signal is the received signal strength in dBm; According to the spec, this is somewhere bewtween -113 (worst) and -51 (best) or -Infinity (no signal);

cell

stat indicates the network registration status.

  • 0 not registered, not searching new operator
  • 1 registered, home network
  • 2 not registered, searching new operator
  • 3 registration denied
  • 4 unknown (probably no service)
  • 5 registered, roaming
  • 6 registered, home network, sms only (only for lte/4g)
  • 7 registered, roaming, sms only (only for lte/4g)
  • 8 emergency services only
  • 9 registered, home network (only for lte/4g)
  • 10 registered, roaming (only for lte/4g)

(this is very brief, if interested, read the specs.)

lac Location Area Code in decimal notation

cell Cell ID in decimal notation

act is the access technology (as obtained by AT+CREG?). this is optional and seems never to be provided. use service.mode instead.

  • 0 GSM
  • 1 GSM Compact (this does not exist)
  • 2 UTRAN (what normal people call "3g" or "UMTS")
  • 3 GSM w/EGPRS (also known as EDGE)
  • 4 UTRAN w/HSDPA (3g with download-booster)
  • 5 UTRAN w/HSUPA (3g with upload-booster)
  • 6 UTRAN w/HSDPA and HSUPA (3g with up- and download-booster)
  • 7 E-UTRAN (what is known as "4g" or "LTE")

service

operator the Mobile Country Code and Mobile Network Code tuple.

service is the access technology (as obtained by AT+COPS?).

  • 0 GSM
  • 1 GSM Compact (this does not exist)
  • 2 UTRAN (what normal people call "3g" or "UMTS")
  • 3 GSM w/EGPRS (also known as EDGE)
  • 4 UTRAN w/HSDPA (3g with download-booster)
  • 5 UTRAN w/HSUPA (3g with upload-booster)
  • 6 UTRAN w/HSDPA and HSUPA (3g with up- and download-booster)
  • 7 E-UTRAN (what is known as "4g" or "LTE")

time

time the current time on the clock of the SIM as a unix timestamp. be aware that this most certainly does not give you the current time.

license

Public Domain

contributions

contributions welcome, send pull requests. if you want your device supported, send me one.

Flattr this git repo