Tools for the Sequans Monarch 2 platform.
Project description
pysequansutils
pysequansutils provides tools for the Sequans Monarch 2 platform which is used on Microchip cellular IoT development boards.
Usage
pysequansutils can be used as a command-line interface or a library
pysequansutils comes bundled with a dup file for a full upgrade of the Sequans Monarch 2 platform. This dup file can be found in the fw folder of the package.
Command-line interface
pysequansutils is a multi-layered command-line interface meaning that there are several commands each with its own actions and options.
Getting help:
pysequans --help
Getting help for specific command (in this example the upgrade
command):
pysequans upgrade --help
The amount of logging is controlled by the -v/--verbose option:
pysequans -v info
Possible log levels are debug
, info
, warning
, error
, critical
. Default is info
.
Print version info and exit:
pysequans -V
Print release info and exit:
pysequans -R
Commands for upgrading the firmware of a Sequans Monarch2 platform
Do a full upgrade of Sequans Monarch 2 platform using the bundled firmware. This will only upgrade the firmware if the bundled firmware is newer than the current firmware of the Monarch2 platform.
pysequans upgrade full
Do a forced full upgrade/downgrade of Sequans Monarch 2 platform, disregarding the version check
pysequans upgrade full --force
Do a full upgrade with a specified firmware file. Note that this command will not do any version checking of the provided firmware vs the current active firmware, i.e. the provided firmware will always be programmed in the Sequans Monarch 2 platform.
pysequans upgrade full --fw myfirmware.dup
Read out current firmware version of Sequans Monarch 2 platform and print together with the bundled firmware version
pysequans upgrade report
Library
pysequansutils is a collection of utilities and it can be used as a library by accessing the individual modules.
Logging
This package uses the Python logging module for publishing log messages to library users. A basic configuration can be used (see example below), but for best results a more thorough configuration is recommended in order to control the verbosity of output from dependencies in the stack which also use logging. See logging.yaml which is included in the package (although only used for CLI).
# pysequansutils uses the Python logging module
import logging
logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.WARNING)
Do a full upgrade with bundled firmware
The upgrade
module contains functions to do full firmware upgrades. For example:
from pysequansutils.upgrade import full_upgrade
upgraded, active_version = full_upgrade()
if upgraded:
print(f"Successfully upgraded firmware to version '{active_version}'")
else:
print(f"Upgrade skipped. Current version is '{active_version}'")
Notes for Linux® systems
This package uses pyedbglib and other libraries for USB transport and some udev rules are required. For details see the pyedbglib package: https://pypi.org/project/pyedbglib
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for pysequansutils-1.0.3.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b00de70a2bfa3ad1f6a69c697205aad1b1b5cbe401cedb55be88c2785166364e |
|
MD5 | e6751fbb0c271b6d1a857fd8b2e77e6b |
|
BLAKE2b-256 | ee197686d61a5bf99251dc825098e088ab23584c94df35ca902a2b482a943629 |