CLI tool for managing the Motorola MB8611 series modem and maybe other Motorola devices.
Project description
MB8611 CLI
CLI tool and library for managing the Motorola MB8611 series modem and maybe other Motorola devices.
Installation
Poetry
poetry add mb8611
Pip
pip install mb8611
Command line usage
Usage: mb8611 [OPTIONS] {addr|address|clear-log|conn|connection|connection-
info|conninfo|down|downstream|lag|lag-
status|log|reboot|software|software-status|startup|startup-
sequence|up|upstream}
Main CLI.
Options:
-H, --host TEXT Host to connect to.
-d, --debug Enable debug level logging.
-j, --json Only output JSON. Encoded lists (tables) will still be
parsed.
-p, --password TEXT Administrator password.
-u, --username TEXT Administrator username.
--help Show this message and exit.
Library usage
Refer to mb8611.api
files for fields. Almost every field type is a string.
Actions
GetHomeAddress
GetHomeConnection
GetMotoLagStatus
GetMotoStatusConnectionInfo
GetMotoStatusDownstreamChannelInfo
GetMotoStatusLog
GetMotoStatusLogXXX
GetMotoStatusSecAccount
GetMotoStatusSecXXX
GetMotoStatusSoftware
GetMotoStatusStartupSequence
GetMotoStatusUpstreamChannelInfo
GetNetworkModeSettings
Some actions require a specific payload:
Login
—LoginPayload
SetMotoLagStatus
—SetMotoLagStatusPayload
SetMotoStatusDSTargetFreq
— seeSetMotoStatusDSTargetFreqPayload
SetStatusLogSettings
— seeClearLogPayload
SetStatusSecuritySettings
— seeRebootPayload
Example
import pprint
from mb8611.client import Client
with Client(the_password) as client:
addr = client.call_hnap('GetHomeAddress')
# Fully typed dictionary
assert addr['GetHomeAddressResponse']['GetHomeAddressResult'] == 'OK'
pprint.pprint(addr)
Client
implements a context manager. Calling Client.login
unnecessary when using it with the
with
statement.
{'GetHomeAddressResponse': {'GetHomeAddressResult': 'OK',
'MotoHomeIpAddress': '...',
'MotoHomeIpv6Address': '',
'MotoHomeMacAddress': '...',
'MotoHomeSfVer': '8611-19.2.18'}}
Examples
Check if the modem is online
mb8611 --output-json conn | jq -r .MotoHomeOnline
Connected
Display the modem's Upstream Bonded Channels
The output is a list of lists. Columns are:
- Channel
- Lock Status
- Channel Type
- Channel ID
- Symb. Rate (Ksym/sec)
- Freq. (MHz)
- Pwr (dBmV)
mb8611 up -j | jq -r '.MotoConnUpstreamChannel[]|@csv' | tr -d '"' | tabulate -s ','
- ------ ------ - ---- ---- --
1 Locked SC-QAM 1 5120 17.6 43
2 Locked SC-QAM 2 5120 24 47
3 Locked SC-QAM 3 5120 30.4 43
4 Locked SC-QAM 4 5120 36.8 44
- ------ ------ - ---- ---- --
Known issues
Note: The modem does not require any authentication for the currently working actions such as
addr
.
The following actions do not work as they require proper authentication (these return 'UN-AUTH'
at this time):
clear-log
/SetStatusLogSettings
SetStatusSecuritySettings
SetMotoLagStatus
SetMotoStatusDSTargetFreq
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mb8611-0.0.1.tar.gz
.
File metadata
- Download URL: mb8611-0.0.1.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.6.2-gentoo-limelight
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26a34f0bdc156de061c87c375613099124f9c366fa7f7beb0fe9ba3377719e84 |
|
MD5 | c0ac4172f7b3538ddf0fdac866731b51 |
|
BLAKE2b-256 | 853fcfba8015acf323ff5f0a8af99ed1e73b256fd650d6aba4a16d099e8ac4d0 |
File details
Details for the file mb8611-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: mb8611-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.6.2-gentoo-limelight
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea1c0334a065d524ff7693e8b421ad514edf118833f5630c42c400f2d2641d03 |
|
MD5 | c015d835d369a67d247787c88835bf9f |
|
BLAKE2b-256 | fe3c1afea5ffa6726cd775f963477f0e8dbae93541d3efaeba78f617ab3e0835 |