0.0.4 • Published 10 years ago

dngl v0.0.4

Weekly downloads
1
License
Public Domain
Repository
github
Last release
10 years ago

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

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago