Skip to main content

RockBLOCK message sending and receiving tools

Project description

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

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

rockblock-tools-0.0.4.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

rockblock_tools-0.0.4-py2.py3-none-any.whl (8.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file rockblock-tools-0.0.4.tar.gz.

File metadata

  • Download URL: rockblock-tools-0.0.4.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for rockblock-tools-0.0.4.tar.gz
Algorithm Hash digest
SHA256 9e9d07fae5a8116e211fb56f627b08aa5dbf2b4804967fd8b54acf00186aaff5
MD5 f4d73ba6140c5d93d93465bab48197f7
BLAKE2b-256 959348467052b76038c0a79cd467ea5862c3243eaaa0f9c4299e1e6a87eef9da

See more details on using hashes here.

File details

Details for the file rockblock_tools-0.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: rockblock_tools-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for rockblock_tools-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 48bde4dffbd9f95ceefab79d02c59e379e8f10c798d6c3a2f557b97e647d06a1
MD5 e8fb533cc9c052cec3d64611ee8d81f8
BLAKE2b-256 4b8eb22280f958e3082b003813765f7280cec450493a69af393a34a76b3a8d2c

See more details on using hashes here.

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