![pi-gate ®](https://camo.githubusercontent.com/3c1b00d0dedc6fe987d5b846445d66f2fb7928cf866f32384ba58239f94fea08/68747470733a2f2f65782d73746f72652e64652f696d616765732f70692d676174652f6c6f5f70692d676174652e706e67)
RadioHead Packet Radio library for 433MHz/868MHz
pi-gate® board
Version 1.67
This is a fork of the original RadioHead Packet Radio library for embedded microprocessors. It provides a complete object-oriented library for sending and receiving packetized messages via Semtech SX1276 chip on a range of embedded microprocessors.
Please read the full documentation and licensing from the original author site
features added with this fork
=================================
- Added driver for pi-gate® board
- Added samples for pi-gate® board
Driver code is located under /RH_PI-GATE.cpp and /RH_PI-GATE.h.
Sample code for Raspberry PI is located under /examples/raspi/pi-gate folder.
Installation on Raspberry PI
================================
You need install bcm2835 library
This library consists of a single non-shared library and header file, which will be installed in the usual places by make install
For Raspberry 2 - 3 change the line
#define BCM2835_PERI_BASE 0x20000000
to
//#define BCM2835_PERI_BASE 0x20000000
#define BCM2835_PERI_BASE 0x3F00000000
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.55.tar.gz
tar zxvf bcm2835-1.55.tar.gz
cd bcm2835-1.xx
./configure
make
sudo make check
sudo make install
Clone repository
cd
sudo apt update
sudo apt install git
git clone https://github.com/gerrylenz/pi-gate
Problems
The bcm2835 library hang/crash with kernel 4.14.xx - 4.14.54
Latest stable firmware with kernel 4.9.80 is raspbian-2018-03-14 download
Solved
Add "dtoverlay=gpio-no-irq" in /boot/config.txt
Coding
================================
Connection and pins definition
Boards pins (Chip Select, IRQ line, Reset and TXE) definition are set in the /examples/raspi/pi-gate/GateDefinitions.h file. In your code, you need to include the file definition like this
#include "GateDefinitions.h"
Create an instance of a driver for 2 modules
//for 433Mhz Gate
RH_SX1276 rf433(RF433_CS_PIN, RF433_IRQ_PIN, RF433_RST_PIN);
//for 868Mhz Gate
RH_SX1276 rf868(RF868_CS_PIN, RF868_IRQ_PIN, RF868_RST_PIN, RF868_TXE_PIN);
Create samples
cd pi-gate/examples/raspi/pi-gate/
make
sudo ./multiserver