Hi, I’ve bought these 433MHz Transmitter and Receiver modules. from AliExpress but can’t seem to get them to work with ESP32s. There are plenty of tutorials out there but to be honest they confuse the hell out of me. Some seem pretty straight forward when using an Arduino Uno but I want two way communication between 2x ESP32s. Even if I could work out one way comms between 2x ESP32s I’d be able to work out the rest.
This is what I’ve tried for the receiver but it gets an error in the Serial Monitor
#include <RH_ASK.h>
#include <SPI.h> // Not actualy used but needed to compile
#define RadTX 22
#define RadRX 21
RH_ASK driver(2000, RadTX, RadRX);
void setup()
{
Serial.begin(9600); // Debugging only
if (!driver.init())
Serial.println("init failed");
}
void loop()
{
uint8_t buf[12];
uint8_t buflen = sizeof(buf);
if (driver.recv(buf, &buflen)) // Non-blocking
{
int i;
// Message with a good checksum received, dump it.
Serial.print("Message: ");
Serial.println((char*)buf);
}
}
It just keeps looping through this in the serial monitor-
mode:DIO, clock div:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
[ 1][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x400d509c
[ 12][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x400d506c
[ 26][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x400d503c
[ 39][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x400d500c
[ 53][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x400d509c
[ 66][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x400d506c
[ 80][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x400d503c
[ 93][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x400d500c
[ 107][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x400d509c
[ 120][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x400d506c
[ 133][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x400d503c
[ 147][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x400d500c
[ 163][D][esp32-hal-cpu.c:276] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 177][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 3 successfully set to type UART_RX (2) with bus 0x3ffbdba4
[ 188][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 1 successfully set to type UART_TX (3) with bus 0x3ffbdba4
=========== Before Setup Start ===========
Chip Info:
------------------------------------------
Model : ESP32
Package : D0WD-Q5
Revision : 3.01
Cores : 2
CPU Frequency : 240 MHz
XTAL Frequency : 40 MHz
Features Bitfield : 0x00000032
Embedded Flash : No
Embedded PSRAM : No
2.4GHz WiFi : Yes
Classic BT : Yes
BT Low Energy : Yes
IEEE 802.15.4 : No
------------------------------------------
INTERNAL Memory Info:
------------------------------------------
Total Size : 377064 B ( 368.2 KB)
Free Bytes : 336192 B ( 328.3 KB)
Allocated Bytes : 33676 B ( 32.9 KB)
Minimum Free Bytes: 330404 B ( 322.7 KB)
Largest Free Block: 110580 B ( 108.0 KB)
------------------------------------------
Flash Info:
------------------------------------------
Chip Size : 4194304 B (4 MB)
Block Size : 65536 B ( 64.0 KB)
Sector Size : 4096 B ( 4.0 KB)
Page Size : 256 B ( 0.2 KB)
Bus Speed : 80 MHz
Bus Mode : QIO
------------------------------------------
Partitions Info:
------------------------------------------
nvs : addr: 0x00009000, size: 20.0 KB, type: DATA, subtype: NVS
otadata : addr: 0x0000E000, size: 8.0 KB, type: DATA, subtype: OTA
app0 : addr: 0x00010000, size: 3072.0 KB, type: APP, subtype: OTA_0
spiffs : addr: 0x00310000, size: 896.0 KB, type: DATA, subtype: SPIFFS
coredump : addr: 0x003F0000, size: 64.0 KB, type: DATA, subtype: COREDUMP
------------------------------------------
Software Info:
------------------------------------------
Compile Date/Time : Oct 3 2025 02:04:04
Compile Host OS : macosx
ESP-IDF Version : v5.5.1-1-g129cd0d247
Arduino Version : 3.3.0
------------------------------------------
Board Info:
------------------------------------------
Arduino Board : ESP32_DEV
Arduino Variant : esp32
Arduino FQBN : esp32:esp32:esp32:UploadSpeed=115200,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=huge_app,DebugLevel=verbose,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=all,JTAGAdapter=default,ZigbeeMode=default
============ Before Setup End ============
[ 680][V][esp32-hal-uart.c:707] uartBegin(): UART0 baud(9600) Mode(800001c) rxPin(3) txPin(1)
[ 689][V][esp32-hal-uart.c:805] uartBegin(): UART0 not installed. Starting installation
[ 699][V][esp32-hal-uart.c:815] uartBegin(): UART0 RX FIFO full threshold set to 120 (value requested: 120 || FIFO Max = 128)
[ 712][V][esp32-hal-uart.c:845] uartBegin(): Setting UART0 to use REF_TICK clock
Can anyone help me?