A Raspberry Pi or similar Single Board Computer (SBC) can also be used, as long it has a serial port for talking to the RockBLOCK. If you want to use the CircuitPython library, you'll also want to use a SBC that has Blinka support.

You can use any Raspberry Pi. However, since the remote location will likely not have WiFi and power will probably be a premium, the Pi Zero is a good option.

Angled shot of Raspberry Pi Zero computer
NOTE: Due to stock limitations we may only be able to offer refunds or store credit for Pis that are defective, damaged or lost in transit.At first glance,...
Out of Stock
Rock BLOCK 9603 Accessory Cable
The RockBLOCK 9603 Accessory Cable is terminated with a simple 10-pin Molex-style connector at one end and male jumper wires at the other.This accessory cable...
$4.95
In Stock

Wiring

Here's the wiring diagram. If you use the accessory cable, you should be able to match the colors. But it's also best to verify actual pin location on the RockBLOCK.

  • 5V to VIN
  • GND to GND
  • TX to TXD*
  • RX to RXD*

* Yep, TX to TX and RX to RX. The RockBLOCK uses backwards nomenclature for its TX/RX pins.

Enable Serial

Follow these steps to enable serial on the Pi's GPIO header. The general process is to enable the serial hardware AND remove the default login shell that would otherwise use it.

You can do all this via raspi-config.

sudo raspi-config
  • Select 5 Interfacing Options
  • Select P6 Serial
  • Answer NO to "Would you like a login shell to be accessible over serial?"
  • Answer YES to "Would you like the serial port hardware to be enabled?"
  • Select OK
  • Exit and reboot

Install CircuitPython Library

See here for information on how to install Blinka to allow using CircuitPython libraries with Python on the Raspberry Pi:

and make sure you have passed the Blinka Test.

Then, install the RockBLOCK library with:

pip3 install adafruit-circuitpython-rockblock

Run Simpletest Check

As a quick test to make sure you are connected and talking to the RockBLOCK, use the simpletest example from the library. Here's the code.

# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

# pylint: disable=wrong-import-position
# CircuitPython / Blinka
import board

uart = board.UART()
uart.baudrate = 19200

# via USB cable
# import serial
# uart = serial.Serial("/dev/ttyUSB0", 19200)

from adafruit_rockblock import RockBlock

rb = RockBlock(uart)

print(rb.model)

We need to make some changes first.

Comment out these lines:

uart = board.UART()
uart.baudrate = 19200

so they look like this:

# uart = board.UART()
# uart.baudrate = 19200

and add these new lines:

import serial
uart = serial.Serial("/dev/serial0", 19200)

and now your UART is talking on the Pi's GPIO header.

Try running the example:

and you should see the model information text printed out as shown above.

Additional Examples

The only change that should be needed for running other examples is to make the changes for configuring the UART. Once you've done that and passed that UART to the CircuitPython RockBLOCK library, the rest should just work.

Check out the other examples in the library repo.

This guide was first published on Apr 08, 2020. It was last updated on Mar 16, 2020.

This page (Raspberry Pi Example) was last updated on Mar 05, 2023.

Text editor powered by tinymce.