@liamcottle/huawei-e8372h.js

0.0.1 • Public • Published

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

  • [x] Listing SMS from Inbox/Outbox.
  • [x] Sending SMS to multiple phone numbers.
  • [x] Marking SMS on the modem as read.
  • [x] 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

Package Sidebar

Install

npm i @liamcottle/huawei-e8372h.js

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

12.9 kB

Total Files

6

Last publish

Collaborators

  • liamcottle