0.0.1 • Published 2 years ago

@liamcottle/huawei-e8372h.js v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Huawei E8372H

This is a NodeJS library for interacting with the Huawei E8372H LTE USB modem.

Install

To use this library in your own NodeJS app, you can install it via npm.

npm install @liamcottle/huawei-e8372h.js

Example

const Modem = require('@liamcottle/huawei-e8372h.js');
const modem = new Modem('192.168.8.1', 'admin', 'admin');

// log in to modem before using any features
modem.login().then(async () => {

    // list sms messages
    const messages = await modem.api.sms.list();
    console.log(messages);

    // send an sms
    // await modem.api.sms.send('+64210000000', 'message content');
    
    // logout of modem
    await modem.logout();
    
});

Supported Features

  • Listing SMS from Inbox/Outbox.
  • Sending SMS to multiple phone numbers.
  • Marking SMS on the modem as read.
  • Deleting SMS from the modem.
modem.api.sms.list();
modem.api.sms.send();
modem.api.sms.markAsRead();
modem.api.sms.delete();

Password Types

  • password_type=3: password is base64 encoded.
  • password_type=4: username, password and token are base64 and hex encoded.

References