Software Installation And Configuration; Installing The Strato Pi Utility; Installing The Strato Pi Kernel Module - Sferalabs Strato Pi Base SPMB30X User Manual

Hide thumbs Also See for Strato Pi Base SPMB30X:
Table of Contents

Advertisement

Software installation and configuration
All features of Strato Pi Base are controlled via dedicated GPIO, the I
serial RX/TX interface to the embedded micro-controller and can be used with most
operating systems and programming languages.
The following software installation notes are based on the Raspbian operating system.

Installing the Strato Pi utility

The Strato Pi utility is a simple command-line script to control Strato Pi's buzzer and
watchdog functions.
Run the following commands to download and install the Strato Pi utility:
$ cd /usr/local/bin
$ sudo wget http://sferalabs.cc/files/strato/strato
$ sudo chmod 755 strato
You can run the Strato Pi utility without arguments to print its options:
$ strato
Usage: strato beep on|off|length_millis|length_millis pause_millis repeats
strato watchdog enable|disable|heartbeat|timeout
strato shutdown
strato battery
All commands should be run as superuser, so always use sudo to run strato.

Installing the Strato Pi kernel module

The Strato Pi kernel module can be used to easily access Strato Pi's features via sysfs file
system.
Refer to the following instructions to download and install the module or go to:
https://github.com/sfera-labs/strato-pi-kernel-module
for updated instructions, usage details and examples.
Download and install:
$ sudo apt install git raspberrypi-kernel-headers
$ git clone --depth 1 --recursive https://github.com/sfera-labs/strato-pi-
kernel-module.git
$ cd strato-pi-kernel-module
$ make
$ sudo make install
$ dtc -@ -Hepapr -I dts -O dtb -o stratopi.dtbo stratopi.dts
$ sudo cp stratopi.dtbo /boot/overlays/
Add the following line to /boot/config.txt:
dtoverlay=stratopi
Optionally, to be able to use the sysfs files not as super user, create a new group "stratopi"
and set it as the module owner group by adding an udev rule:
$ sudo groupadd stratopi
$ sudo cp 99-stratopi.rules /etc/udev/rules.d/
16
2
C bus and a soft
Strato Pi Base User Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Strato Pi Base SPMB30X and is the answer not in the manual?

Table of Contents