Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ineiti/hilinkmodem
Ruby-library for interfacing with Huawei Hilink web-interface
https://github.com/ineiti/hilinkmodem
Last synced: about 2 months ago
JSON representation
Ruby-library for interfacing with Huawei Hilink web-interface
- Host: GitHub
- URL: https://github.com/ineiti/hilinkmodem
- Owner: ineiti
- Created: 2014-05-21T10:53:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-12-16T09:27:47.000Z (about 7 years ago)
- Last Synced: 2024-10-18T08:40:23.241Z (2 months ago)
- Language: Ruby
- Size: 24.4 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hilink - ruby interface for Huawei Hilink web-frontend
## Usage
The code supposes that the modem is connected and has the IP
192.168.1.1. Then you can do:````
require 'hilink'
puts Hilink::Monitoring::status.inspect
````which will return a hash of all variables that the stick can return.
Please also see the much more complete PhP-implementation on
[BlackyPanther/Huawei-HiLink](https://github.com/BlackyPanther/Huawei-HiLink).If you have the newer version which connects to 192.168.8.1, this library
won't work for you, sorry.## Commands
Each command is a module inside of Hilink. There are different modules:
- Monitoring - return different status of the modem
- Network - change 2g / 3g network
- SMS - send, receive and list
- Dialup - (dis)connect from network
- Modem - useful only when it is in modem-mode
- USSD - *Doesn't work due to Huawei restriction*The Hilink-module itself has three methods:
- `send_request( path, request = {} )` - generates a valid XML-request and return
the result as a hash
- `switch_to_modem` - sends the command so the key behaves as a modem
- `switch_to_debug` - according to web-interface, no difference visible### Monitoring
You can monitor different things:
- `traffic_statistics` - per-connection and total usage
- `traffic_reset` - set all to 0
- `status` - shows whether connected or not
- `check_notifications`### Network
- `set_connection_type( mode = 'auto', band = '-1599903692' )` - mode
can be 'auto', '2g' or '3g'
- `current_plnm` - get actual connection### SMS
- `list`