Skip to main content

A Python32 implementation of the RP1210C standard.

Project description

RP1210 for Python

pip install rp1210

A Python module for interacting with RP1210 adapter drivers, following the RP1210C standard. Contributions welcome!

Note from the author: I no longer work with RP1210 regularly (or at all) and have no need to work with and no access to RP1210 adapters. As such, I'm not actively updating this package anymore. Contributions and bug reports are still welcome.

This module is considered 'complete', mostly by dint of me not updating it anymore.

Some documentation and examples are available in this repo's wiki and the Examples folder.

This module was written and tested with Python 3.9 and 3.10, 32-bit. Older (and newer) Python versions have not been tested and may not be supported.
32-bit Python is required because RP1210 drivers are all 32-bit, and can thus only be loaded with 32-bit Python. A 64-bit implementation via MSL-LoadLib is possible and may be released as a separate module sometime in the future.

Not all aspects of the RP1210C standard are fully implemented as independent features. Currently, my focus is on J1939 communication. Other protocols have significantly less support, but you can still access all the low-level commands via the RP1210API class.

While I try to provide adequate documentation, the RP1210C standard is owned by TMC, not me, and is not reproduced here. For a complete understanding of the RP1210 standard, you must purchase and read the official RP1210C documentation from TMC.

Official RP1210C documentation can be purchased from TMC at this link ($37.50 at time of writing): https://www.atabusinesssolutions.com/Shopping/Product/viewproduct/2675472/TMC-Individual-RP

Getting Started

from RP1210 import RP1210Client, translateErrorCode

# init client
client = RP1210Client()

# select vendor and device
client.setVendor("NULN2R32") # Nexiq USB-Link 2 in this case
client.setDevice(1) # wired USB-Link 2

# connect to adapter w/ specified protocol
clientID = client.connect(b'J1939:Baud=Auto') # will return clientID or error code
error_msg = translateErrorCode(clientID)
if error_msg != "NO_ERRORS": # failed to connect
   print("Connection failed:", error_msg)

# read all messages (no filter)
client.setAllFiltersToPass()

# send a message
msg = b'message contents'
err_code = client.tx(msg)
print("Tx Result:", translateErrorCode(err_code))

# read messages
while True:
   msg = client.rx()
   if msg: # message was received
      print(msg)

Coverage Status PyPI Downloads

Project details


Download files

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

Source Distribution

rp1210-1.0.1.tar.gz (82.0 kB view details)

Uploaded Source

Built Distribution

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

rp1210-1.0.1-py3-none-any.whl (99.1 kB view details)

Uploaded Python 3

File details

Details for the file rp1210-1.0.1.tar.gz.

File metadata

  • Download URL: rp1210-1.0.1.tar.gz
  • Upload date:
  • Size: 82.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rp1210-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e30198b0768d87aa52689c011f4cefaee5ab13f2ce5d23c4a27d0e3e37496e0a
MD5 65d79813befacf75f079bba5d8f54bee
BLAKE2b-256 534504c714c517dd486add79a9d27b234eb9f741498137d42117c32be2ca6282

See more details on using hashes here.

Provenance

The following attestation bundles were made for rp1210-1.0.1.tar.gz:

Publisher: python-publish.yml on dfieschko/RP1210

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rp1210-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: rp1210-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 99.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rp1210-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41aa4646e4bc037deb731135cafb82c18898e7fb300beb3e5cb30c47909a0df7
MD5 7d8e3f7accd9d59442f1e71cdff17f78
BLAKE2b-256 84428d789a980ff135e13954f9486b31c417891d95aaf21951b446dd07fe3451

See more details on using hashes here.

Provenance

The following attestation bundles were made for rp1210-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on dfieschko/RP1210

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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