0.3.19 • Published 10 years ago

gsm-modem v0.3.19

Weekly downloads
84
License
-
Repository
github
Last release
10 years ago

node-gsm-modem

NodeJS module to control GSM modem connected to serial port.

Thanks to

Emil Sedgh for PDU.js. I had to change it though.

Chris Williams for node-serialport

Usage

Install using npm:

npm install --save gsm-modem

Require the module:

var Modem = require('gsm-modem');

Connect to the modem:

var modem1 = new Modem({
    ports : ['/dev/ttyUSB0', '/dev/ttyUSB1', '/dev/ttyUSB2']
});
modem1.connect(function (err) {
    if (err) {
        console.error('Error connecting modem: ', err);
        return;
    }
    // Start giving commands here...
}

Connect options

ports: Array of serial ports to search for a modem. The module will try to connect to every ports specified and send AT command. The first port modem answers to will be used as data/command port, others will be used for listening only. Default: /dev/ttyUSB0,/dev/ttyUSB1,/dev/ttyUSB2

debug: boolean if the module should output all data it sends/receives. Default: false

auto_hangup: boolean indicating whether modem should send ATH (hangup) command when incoming call is received. Default: false

commandTimeout: milliseconds, how long to wait for response on any AT command. Default: 15000

ussdTimeout: milliseconds, how long to wait for USSD after sending the command. Default: 15000

forever: boolean, indicated whether module should run in daemon mode automatically handling modem connects and disconnects. Default: false

API

See wiki page.

Checked on modems

  • Huawei 3121S
  • Huawei E171 / E173
  • Huawei E1550
  • Huawei K3765
  • ZTE MF656A
  • ZTE MF180
  • Wavecom WISMO2C

TODO

  • 8bit encoding
  • Text mode
0.3.19

10 years ago

0.3.17

10 years ago

0.3.16

10 years ago

0.3.15

10 years ago

0.3.14

10 years ago

0.3.13

10 years ago

0.3.12

10 years ago

0.3.11

10 years ago

0.3.10

10 years ago

0.3.9

10 years ago

0.3.8

10 years ago

0.3.7

10 years ago

0.3.6

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.7

10 years ago

0.2.6

11 years ago

0.2.5

11 years ago

0.2.4

11 years ago

0.2.3

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.0

11 years ago