pyRadioHeadRF95
1.0.0
pyRadioHeadRF95 is a Python wrapper for the use of RH_RF95 class of the RadioHead library on a Raspberry Pi.
The library is developed and tested using a Dragino LoRa shield.
Move to the main directory and run:
make

import pyRadioHeadRF95 as RadioRF95 class: rf95 = Radio.RF95()rf95.init()rf95.setFrequency(<FREQ>)rf95.setTxPower(<dBm>, <useRFO>)Done via the method rf95.setSignalBandwidth(<BW>)
Possible values are listed in pyRadioHeadRF95.py
Done via the method rf95.setSpreadingFactor(<SF>)
Possible values are listed in pyRadioHeadRF95.py
Done via the method rf95.setCodingRate4(<CR_DEN>)
Possible values are listed in pyRadioHeadRF95.py
rf95.send(msg, len(msg))
rf95.waitPacketSent()
if rf95.available():
(msg, l) = rf95.recv()
RF95 class: rf95 = Radio.RF95() and initialize it as explained aboverf95.managerInit(<MY_ADDRESS>), where the address is an integerrf95.sendtoWait(msg, len(msg), destination)
if rf95.available():
(msg, l, source) = rf95.recvfromAck()
Once the package is compiled run:
sudo ./examples/rf_server.py
or
sudo ./examples/rf_reliable_server.py