Skip to main content

RockBLOCK Python Tools

Build Status

A python library and command line application for interfacing with the RockBLOCK web services.

Install

pip install rockblock-tools

Usage

Sending a Message

Simple:

rockblock send [imei] [user] [pass] "Hello, World"
rockblock send [imei] [user] [pass] "Hello, World" --data-format=raw

With hexadecimal encoding:

rockblock send [imei] [user] [pass] 48656c6c6f2c20576f726c6421 --data-format=hex

With base64 encoding:

rockblock send [imei] [user] [pass] SGVsbG8sIFdvcmxkIQ== --data-format=base64

Listening for Messages

To listen to messages from the RockBLOCK web service, you need to make sure that your listener is visible from the public internet. If you are setting up the listener on a home network, this will likely require port forwarding.

In the command examples below, the listener is running on the normal HTTP port (80) and accepting external inbound connections (binding to 0.0.0.0).

To connect your listener, add the web address of your listener (e.g. http://your-ip-here/) to a delivery group on the RockBLOCK admin portal. You can use the "Test Delivery Groups" page to test your listener without using credits.

Console Output

Command:

rockblock listen console 0.0.0.0 80

Example Output:

---------- MESSAGE ----------
Iridium Latitude  33.2938
Iridium Longitude 125.2902
Device Type       ROCKBLOCK
Transmit Time     2020-02-19 00:22:50
MOMSN             663
IMEI              300434063480220
Serial            16302
Data              Hello! This is a test message from RockBLOCK!
Iridium CEP       15.0
-----------------------------

CSV Output

Command:

rockblock listen csv 0.0.0.0 80 path/to/file.csv

Example Output:

Iridium Latitude,Iridium Longitude,Device Type,Transmit Time,MOMSN,IMEI,Serial,Data,Iridium CEP
75.5254,62.6541,ROCKBLOCK,2020-02-19 00:23:47,680,300434063480220,16302,There are 10 types of people who understand binary,9.0
46.4861,159.9892,ROCKBLOCK,2020-02-19 00:23:47,326,300434063480220,16302,Abcdefghijklmnopqrstuvwxyz1234567890,110.0

MQTT Output

Command (for an MQTT server running at localhost:1883):

rockblock listen mqtt 0.0.0.0 80 localhost 1883 my/mqtt/topic --mqtt-user=user --mqtt-pass=pass --mqtt-qos=0

Release files for rockblock-tools 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rockblock-tools 0.0.4
File Size Uploaded
rockblock-tools-0.0.4.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rockblock-tools 0.0.4
File Interpreter ABI Platform
rockblock_tools-0.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 15.5 kB

Release files / rockblock-tools-0.0.4.tar.gz

Download URL rockblock-tools-0.0.4.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9e9d07fae5a8116e211fb56f627b08aa5dbf2b4804967fd8b54acf00186aaff5
BLAKE2b-256 checksum
How to use checksums
959348467052b76038c0a79cd467ea5862c3243eaaa0f9c4299e1e6a87eef9da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

Release files / rockblock_tools-0.0.4-py2.py3-none-any.whl

Download URL rockblock_tools-0.0.4-py2.py3-none-any.whl
Size 8.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
48bde4dffbd9f95ceefab79d02c59e379e8f10c798d6c3a2f557b97e647d06a1
BLAKE2b-256 checksum
How to use checksums
4b8eb22280f958e3082b003813765f7280cec450493a69af393a34a76b3a8d2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page