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.

Files for rockblock-tools, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size rockblock_tools-0.0.3-py2.py3-none-any.whl (8.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size rockblock-tools-0.0.3.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page