m2m-status
v1.0.2
Published
Check status of your m2mdataglobal sims
Downloads
6
Readme
m2m-status
Check status of your m2mdataglobal sims
Installation
npm i -S m2m-status
Use
const M2M = require('m2m-status')
const user = 'your-user'
const password = 'your-password'
const sim = '+569XXXXXXXX'
const client = new M2M({user: user, password: password})
client.checkSim(sim).then(console.log).catch(console.error)
/*
{
icc: 'XXXXXXXXXXXXXXXXXXX',
sim: '+569XXXXXXXX',
imei: 'XXXXXXXXXXXXXXX',
device: 'SIM840W',
country: 'Chile',
type: 'Local',
plan: 'GPS_CL_20M_BAS_CH',
customs: [ '', '' ],
provider: {
state: 'ACTIVE',
ip: 'XXX.XXX.XXX.XXX',
apn: 'm2m.movistar.cl',
country: 'Chile',
operator: 'Movistar Chile',
gprs: 'Activos'
},
traffic: {
monthly: {voice: '238', data: '15933440', sms: '0'},
daily: {voice: '0', data: '1162240', sms: '0'}
},
enterprise: null,
status: {admin: true, gsm: true, gprs: true}
}
*/
client.checkIcc(icc).then(console.log).catch(console.error);
/*
{
icc: 'XXXXXXXXXXXXXXXXXXX',
sim: '+569XXXXXXXX',
imei: 'XXXXXXXXXXXXXXX',
device: 'SIM840W',
country: 'Chile',
type: 'Local',
plan: 'GPS_CL_20M_BAS_CH',
customs: [ '', '' ],
provider: {
state: 'ACTIVE',
ip: 'XXX.XXX.XXX.XXX',
apn: 'm2m.movistar.cl',
country: 'Chile',
operator: 'Movistar Chile',
gprs: 'Activos'
},
traffic: {
monthly: {voice: '238', data: '15933440', sms: '0'},
daily: {voice: '0', data: '1162240', sms: '0'}
},
enterprise: null,
status: {admin: true, gsm: true, gprs: true}
}
*/
client.listSims().then(console.log).catch(console.error);
/*
[{
icc: 'XXXXXXXXXXXXXXXXXXX',
sim: '+569XXXXXXXX',
imei: 'XXXXXXXXXXXXXXX',
device: 'SIM840W',
country: 'Chile',
type: 'Local',
plan: 'GPS_CL_20M_BAS_CH',
customs: [ '', '' ],
provider: {
state: 'ACTIVE',
ip: 'XXX.XXX.XXX.XXX',
apn: 'm2m.movistar.cl',
country: 'Chile',
operator: 'Movistar Chile',
gprs: 'Activos'
},
traffic: {
monthly: {voice: '238', data: '15933440', sms: '0'},
daily: {voice: '0', data: '1162240', sms: '0'}
},
enterprise: null
}]
*/