This repo contains test code for LoRa SX1272 radios connected to Raspberry Pis.
- 2 x Raspberry Pi 2 Model B
- 2 x Raspberry Pi to Arduino shields connection bridge
- 2 x LoRa Module SX1272 (868/900MHz)
git clone https://github.com/mngiess/lora-sx1272-test.git
cd raspberrypi_2.0
./compile_rpi2
cd ..
g++ -I./raspberrypi_2.0/ardupi2.0 -c SX1272.cpp -o SX1272.o
g++ -I./raspberrypi_2.0/ardupi2.0 -lpthread -lrt transmitter.cpp SX1272.o ./raspberrypi_2.0/ardupi2.0/arduPi.o -o transmitter
g++ -I./raspberrypi_2.0/ardupi2.0 -lpthread -lrt receiver.cpp SX1272.o ./raspberrypi_2.0/ardupi2.0/arduPi.o -o receiver
./receiver
./transmitter
root@raspberrypi:/usr/src/lora-sx1272-test# ./transmitter
SX1272 module and Raspberry Pi: send packets with ACK and retries
Setting power ON: state 0
Setting Mode: state 0
Setting Header ON: state 0
Setting Channel: state 0
Setting CRC ON: state 0
Setting Power: state 0
Setting Node address: state 0
SX1272 successfully configured
Packet sent, state 0
Packet sent, state 0
Packet sent, state 0
root@raspberrypi:/usr/src/lora-sx1272-test# ./receiver
SX1272 module and Raspberry Pi: receive packets with ACK and retries
Setting power ON: state 0
Setting Mode: state 0
Setting Header ON: state 0
Setting Channel: state 0
Setting CRC ON: state 0
Setting Power: state 0
Setting Node address: state 0
SX1272 successfully configured
Receive packet with ACK and retries, state 1
Receive packet with ACK and retries, state 0
Message: Packet 1, wanting to see if received packet is the same as sent packet
Receive packet with ACK and retries, state 0
Message: Packet 2, broadcast test
Receive packet with ACK and retries, state 0
Message: Packet 1, wanting to see if received packet is the same as sent packet
Receive packet with ACK and retries, state 0
Message: Packet 2, broadcast test
Receive packet with ACK and retries, state 0
Message: Packet 1, wanting to see if received packet is the same as sent packet
Receive packet with ACK and retries, state 0
Message: Packet 2, broadcast test