UNPKG
simcom
Version:
latest (0.3.0)
0.3.0
0.2.1
0.2.0
Talk to GSM modem SIMCOM via Node
github.com/vittee/simcom
vittee/simcom
simcom
/
example
/
all_sms.js
13 lines
(11 loc)
•
241 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
var
SimCom
=
require
(
'../'
).
SimCom
, pdu =
require
(
'pdu'
);
var
simcom =
new
SimCom
(
'/dev/ttyAMA0'
); simcom.
on
(
'open'
,
function
(
) {
this
.
listSMS
(
4
).
then
(
function
(
res
) {
console
.
log
(res); }) .
done
(
function
(
) { simcom.
close
(); }); });