Node.js application to send sms from Huawei routers/modems. Tested with latest software for Huawei E5573s-320, details:
- Device name: E5573s-320
- Hardware version: CL1E5573SM01
- Software version: 21.326.62.00.264
Module should work with other devices compatible with Huawei Hilink software.
$ npm install
Provide login
and hash of your password
to router/modem acount (192.168.8.1) in file config.js
const config = {
password: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX4ca700b295aaa3a24",//<- sha256("PASSWORD")
login: "admin"
}
Log into router and if login is successful send sms
authenticate().then(()=>{
sms("sms 1", "600700800");
sms("sms 2", "600700800");
sms("sms 3", "600700800");
})
function sms(param1, param2)
parameter | Description | type |
---|---|---|
param1 |
SMS text | String |
param2 |
phone number / numbers | String / Array of Strings |
After first authentication, router respond with 30 auth tokens. It means that for next 30 sms there is no need to do authentication again. When all tokens are used, next call of sms
function will perform authentication automaticly.
HUAWEI HILINK is trademark of Huawei Technologies Co., Ltd.