trbo-data-svc
This is a collection of multiple different libraries and programs that interface with MotoTRBO digital radios.
Currently supported:
- ARS
- TMS
- LRRP (50%)
In the works:
- Job Tickets
- Impres OTA Battery Management (low priority, weird format)
Basic Layout
Most of the basic data services can be set up as such:
from TrboDataSvc import ars
def callback(rid, data):
print("Got a message from radio id {}".format(rid))
return True
listener = ars.ARS()
listener.register_callback(callback)
listener.listen()
That's all you need!
Further Documentation
The callbacks
The callback function definition should be in the following format:
def callback_name(rid, data)
Obviously the name can be whatever you want, but the arguments must be rid and data, in that order. The type of data and what it passes will differ between the different functions. It can be either an int, string, or dictionary.
Additionally, the callback must return True on successful processing and False on unsuccessful processing. Returning true means an ACK gets sent to the radio when necessary. Examples of failed processing might be an exception, upstream server offline, etc.
Listen function
The listen function creates a separate process to process the incoming data. This creates a new Process for each listener. This shouldn't be a huge deal but on embedded systems it might be something to consider as a new Process creates an entirely new memory space.
Other tools
The util class offers a few utilities such as id2ip and ip2id that convert the OTA IP to a radio ID. In case you are not familiar, the DMR radio ID gets mapped to an IP address for data transmission over the air. These functions let you easily convert between OTA IPs and RIDs.
Release files for TrboDataSvc 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| TrboDataSvc-0.0.8.tar.gz | 8.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| TrboDataSvc-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.9 kB
Release files / TrboDataSvc-0.0.8.tar.gz
| Download URL | TrboDataSvc-0.0.8.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06ebb58624694a69b4824852738fc3d0aa5522e8e61c99ec182a335f9448b991
|
|
BLAKE2b-256 checksum How to use checksums |
e502aae858c56d77441690f985c21d63f0c25ca8d377055148881e4df08632f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Release files / TrboDataSvc-0.0.8-py3-none-any.whl
| Download URL | TrboDataSvc-0.0.8-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16d9e05b2f0ae1f7ff48c85690fb424a854efd8dc2bcbf9c920c1543a03ed715
|
|
BLAKE2b-256 checksum How to use checksums |
bf43ba32f5c97ae658e83f2b557a13c55d00d9a28c9d06a57952a4cfae510f9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|