Skip to main content

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.

PyPI - Format PyPI - Python Version PyPI - License

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pysequansutils-1.0.3.17-py3-none-any.whl (3.6 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page