zte-cpe
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

ZTE-CPE ROUTER/MODEM API

Usage

const ZTECPE = require('zte-cpe');
const myRouter = new ZTECPE('192.168.1.1');

if(!await myRouter.isLogged()) await myRouter.login('<your password>');

const rawSMS = await myRouter.getSMS();
const parsedSMS = rawSMS.map(sms => `${sms.number}: ${sms.content}`);

console.log(parsedSMS);

Notes

  • Every function related to the router/modem connection is async
  • Some features require to login to be functional
    • You can check if you're logged or not using .isLogged()
  • If an API error occurres, the returned object is { error: true }
  • Since there are lots of methods, check out the typings
  • I'm not fully sure if this is compatible with other ZTE-CPE router/modems

Tested on

[
  // SPECKY
  {
    cr_version: 'CR_VODACOM_ZA_MF253V1.0.0B04',
    wa_version: 'BD_ZM8620V1.0.0B15',
    hardware_version: 'PCBMF253V1.0.0',
  },
]

Readme

Keywords

Package Sidebar

Install

npm i zte-cpe

Weekly Downloads

1

Version

0.0.3

License

GPL-3.0

Unpacked Size

16.9 kB

Total Files

6

Last publish

Collaborators

  • specky