Skip to main content

spmtool

Read/write Kelly SPM brushed motor controller configuration over serial connection. Tested with:

  • SPM24121

Usage

Test serial connection:

$ spmtool

Show help:

$ spmtool -h
usage: spmtool [-h] [-r | -w | -c] [-v] [-d DEVICE] [-s SETTINGS] [file]

positional arguments:
  file           config file

options:
  -h, --help     show this help message and exit
  -r, --read     read controller memory to file
  -w, --write    write config to controller
  -c, --check    check and compare controller config
  -v, --verbose  show debug log
  -d DEVICE      serial port device
  -s SETTINGS    settings schema preset or file

Read Memory

Connect to controller, read memory, optionally mask settings and then save to nominated file.

Read controller settings into conf.bin using SPM24121 preset:

$ spmtool -r -s SPM24121 conf.bin

Write Memory

Load config from nominated file, connect to controller, update any settings listed in settings schema on controller and save. A settings schema file or preset is mandatory in this mode, see "Settings Schema" below for details.

Write settings from conf.bin to controller using SPM24121 preset:

$ spmtool -w -s SPM24121 conf.bin

Check Memory

Load config file, connect to controller and then list any differences between config and controller memory. Optionally mask config and memory with a settings schema.

Compare controller memory with contents of conf.bin using SPM24121 preset:

$ spmtool -c -s SPM24121 conf.bin

Settings Schema

Controller settings are listed in the settings schema one per line with the whitespace delimited columns:

offset mask description

Where offset is a hexadecimal byte offset in the memory, mask limits the bits that are set/cleared and description is a text description for the setting. See included file SPM24121.txt for an example.

To use a defined preset, use preset name as the schema, eg:

$ spmtool -s SPM24121

Installation

Install with pip, or run script file directly:

$ python3 spmtool.py

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spmtool-1.0.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spmtool-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file spmtool-1.0.0.tar.gz.

File metadata

  • Download URL: spmtool-1.0.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for spmtool-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2d0cdf00fed727afb6672f9377fd40cf0045993a3a8152debd5ad10eb67503a8
MD5 6aba8519da97afae9f49c7d18ca113ad
BLAKE2b-256 3e464d42ad07256ca0bbd6848c907acda5f80f95457eb98db1b9e8a24a170ad5

See more details on using hashes here.

File details

Details for the file spmtool-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: spmtool-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for spmtool-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f0dbd169451e2c34204fd9e1850bd51018d6ddb69d3713d5b47ebd002c581d1
MD5 674b483c2dd5397b40bb625f5c14c94f
BLAKE2b-256 851a9d151e8412bc2e9988192a4c0e5f72821526ee1c078b85d2c9a54937168b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page