MySensors RFM69 & NRF24L Gateway for Raspberry Pi (zero & B)
see https://www.mysensors.org/build/raspberry
revision:
v1
v2
v3
RFM69HW is connected to SPI0
Download dev branch
git clone https://github.com/mysensors/MySensors.git --branch development
cd MySensors
configure (Ethernet gateway)
./configure --my-transport=rfm69 --my-rfm69-frequency=868 --my-is-rfm69hw --my-port=5003 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
make
running
sudo ./bin/mysgw
install
sudo make install
Download master branch
git clone https://github.com/mysensors/MySensors.git --branch master
cd MySensors
configure (Ethernet gateway)
./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-port=5003 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
make
running
sudo ./bin/mysgw
install
sudo make install
It's experimental, see https://forum.mysensors.org/topic/7702/double-spi-radio-raspberry-pi
in /boot/config.txt
add
//*** uncomment for pi3 ***
//dtoverlay=pi3-disable-bt
dtparam=spi=on
//change spi1 cs0 to gpio16 pin 36
dtoverlay=spi1-1cs,cs0_pin=16
reboot the PI
sudo reboot
copy the source
cp -r MySensors MySensorsSecond
cd MySensorsSecond
edit file Makefile
: replace the string mysgw
by mysgwSecond
(in nano use Ctrl + \ )
copy file initscripts/mysgw.systemd
and initscripts/mysgwSecond.sysvinit
to initscripts/mysgwSecond.systemd
and initscripts/mysgwSecond.sysvinit
cp initscripts/mysgw.systemd initscripts/mysgwSecond.systemd
cp initscripts/mysgwSecond.sysvinit initscripts/mysgwSecond.sysvinit
edit file initscripts/mysgwSecond.systemd
and initscripts/mysgwSecond.sysvinit
: replace the string mysgw
by mysgwSecond
(in nano use Ctrl + \ ) and replace the string MySensors Gateway
by MySensors Gateway 2
copy file mysgw.cpp to mysgwSecond.cpp
cp examples_linux/mysgw.cpp examples_linux/mysgwSecond.cpp
configure the second instance
./configure --my-transport=nrf24 --my-rf24-irq-pin=33 --my-rf24-ce-pin=37 --my-rf24-cs-pin=36 --spi-spidev-device=/dev/spidev1.0 --spi-driver=SPIDEV --my-port=5004 --my-leds-err-pin=29 --my-leds-rx-pin=31 --my-leds-tx-pin=32
make
running
sudo ./bin/mysgwSecond
install
sudo make install
Parts | Qty | Don't Put Opt | Value | Package | Description | MPN |
---|---|---|---|---|---|---|
D1 | 1 | Red LED | 0805 | LED err | ||
D2 | 1 | Yellow LED | 0805 | LED rx | ||
D3 | 1 | Green LED | 0805 | LED tx | ||
D4 | 1 | X | Red LED | 0805 | LED err | |
D5 | 1 | X | Yellow LED | 0805 | LED rx | |
D6 | 1 | X | Green LED | 0805 | LED tx | |
R1, R2, R3 | 3 | 1k | 0805 | Resistor | ||
R4, R5, R6 | 3 | X | 1k | 0805 | Resistor | |
R7 | 1 | X | 0R | 0805 | Resistor | |
C1, C3 | 2 | 10u | 0805 | capacitor | ||
C2, C4 | 2 | 100n | 0805 | capacitor | ||
C5 | 1 | X | 10u | 0805 | capacitor | |
C6 | 1 | X | 100n | 0805 | capacitor | |
U1 | 1 | RFM69HW | RFM69HW | Hoperf radio | ||
R1, R2, R3 | 3 | 1k | 0805 | Resistor | ||
U2, U4 | 1 | X | NRF24L01 | NRF24L01 | 2.4ghz radio | |
U3 | 1 | AP1117 | 3.3v | sot23 | 3.3v regulator | |
J1 | 1 | SMA connector | SMA connector | |||
J2 | 1 | 2x20 pinheader | Female header 2.54mm | |||
J3 | 1 | X | Antenna |
Name | Size | # Downloads |
---|---|---|
COPYRIGHT.txt | 408 B | 333 |
LICENSE.txt | 8.91 kB | 364 |
MySensorsPiGw.gbl | 71.79 kB | 551 |
MySensorsPiGw.gbo | 185.83 kB | 560 |
MySensorsPiGw.gbs | 2.23 kB | 607 |
MySensorsPiGw.gml | 1.55 kB | 523 |
MySensorsPiGw.gtl | 83.18 kB | 571 |
MySensorsPiGw.gto | 168.4 kB | 539 |
MySensorsPiGw.gts | 4.01 kB | 605 |
MySensorsPiGw.kicad_pcb | 316.41 kB | 566 |
MySensorsPiGw.net | 18.27 kB | 1875 |
MySensorsPiGw.sch | 16.79 kB | 578 |
MySensorsPiGw.txt | 2.08 kB | 401 |