RFM69 ISM Transceiver driver for esp-idf.
The RFM69 is a highly integrated RF transceiver capable of operation over a wide frequency range, including the 433, 868 and 915 MHz license-free ISM (Industry Scientific and Medical) frequency bands.
I ported from this.
I tested with these.
RFM69W/RFM69CW has +13 dBm Power Output Capability.
RFM69HW/RFM69HCW has +20 dBm Power Output Capability.
RFM69CW/HCW has the same foot pattern as ESP12.
Therefore, a pitch conversion PCB for ESP12 can be used.
RFM69W/HW does not have the same foot pattern as ESP12.
ESP-IDF V5.0 or later.
ESP-IDF V4.4 release branch reached EOL in July 2024.
ESP-IDF V5.1 is required when using ESP32-C6.
git clone https://github.com/nopnop2002/esp-idf-rf69
cd esp-idf-rf69/basic
idf.py set-target {esp32/esp32s2/esp32s3/esp32c2/esp32c3/esp32c6}
idf.py menuconfig
idf.py flash
Note for ESP32C3
For some reason, there are development boards that cannot use GPIO06, GPIO08, GPIO09, GPIO19 for SPI clock pins.
According to the ESP32C3 specifications, these pins can also be used as SPI clocks.
I used a raw ESP-C3-13 to verify that these pins could be used as SPI clocks.
- Set TX power high
If you are using a high power RF69 such as the RFM69HW/RFM69HCW, you must to set the TX power high.
If you are using a not high power RF69 such as the RFM6W/RFM69CW, you don't need to set the TX power high.
The ESP32 series has three SPI BUSs.
SPI1_HOST is used for communication with Flash memory.
You can use SPI2_HOST and SPI3_HOST freely.
When you use SDSPI(SD Card via SPI), SDSPI uses SPI2_HOST BUS.
When using this module at the same time as SDSPI or other SPI device using SPI2_HOST, it needs to be changed to SPI3_HOST.
When you don't use SDSPI, both SPI2_HOST and SPI3_HOST will work.
Previously it was called HSPI_HOST / VSPI_HOST, but now it is called SPI2_HOST / SPI3_HOST.
RFM69 | ESP32 | ESP32-S2/S3 | ESP32-C2/C3/C6 | |
---|---|---|---|---|
MISO | -- | GPIO19 | GPIO37 | GPIO4 |
SCK | -- | GPIO18 | GPIO36 | GPIO3 |
MOSI | -- | GPIO23 | GPIO35 | GPIO2 |
NSS | -- | GPIO5 | GPIO34 | GPIO1 |
RESET | -- | GPIO16 | GPIO38 | GPIO0 |
GND | -- | GND | GND | GND |
VCC | -- | 3.3V | 3.3V | 3.3V |
You can change it to any pin using menuconfig.
The pinout of RFM69 is different for each model.
http://www.airspayce.com/mikem/arduino/RadioHead/classRH__RF69.html
Interrupts are not used in this project.
RF69 | cc1101 | |
---|---|---|
Manufacturer | Hope Microelectronics | Texas Instrument |
Frequency | 433/868/915MHz | 315/433/868/915MHz |
Maximum Payload | 64Byte(AES Enable)/255Byte(AES Disable) | 64Byte |
CRC Length | 16bits | 16bits |
Acknowledgement Payload | No | No |
Available Modulation format | FSK/GFSK/MSK/GMSJ/OOK | 2-FSK/4-FSK/GFSK/ASK/OOK/MSK |
AES is AES-128 encryption/decryption.
This project uses AES-128 encryption/decryption option.