Rtl_433_esp fails to init CC1101 (code: -16)

Hi,
I’m trying to run the latest esp32dev-rtl_433 release binary with a LOLIN32 board and the CC1101 module (one marked E07-M1101D). It appears to fail to initialize the SPI interface, with the error code indicating a failed write of an SPI register.

I also compiled it myself to enable more logging in Radiolib, this gives the following output:

11:55:29.327 -> N: RF Config not found using default
11:55:29.327 -> T: enableActiveReceiver: 3
11:55:29.992 -> N: C1101 spi Connection OK
12:00:10.108 -> N: Enable RTL_433 Receiver: 433.92Mhz
12:00:10.108 -> rtl_433_ESP(6): CC1101 gpio receive pin: 12
12:00:10.108 -> rtl_433_ESP(6): CC1101 receive frequency: 433.920013
12:00:10.141 -> rtl_433_ESP(6): # of device(s) configured 157
12:00:10.141 -> rtl_433_ESP(6): ssizeof(r_device): 112
12:00:10.141 -> rtl_433_ESP(6): cfg->devices size: 17584
12:00:10.141 -> Registering protocol [0] "Amazon Basics Meat Thermometer"
12:00:10.141 -> Registering protocol [1] "Acurite 896 Rain Gauge"
...
12:00:10.939 -> Registering protocol [156] "Yale HSA (Home Security Alarm), YES-Alarmkit"
12:00:10.939 -> R	71	4	
12:00:10.939 -> M	CC1101
12:00:11.072 -> R	18	FF	
12:00:11.072 -> W	18	DF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.072 -> R	18	FF	
12:00:11.105 -> R	18	FF	
12:00:11.105 -> 
12:00:11.105 -> address:	0x18
12:00:11.105 -> bits:		5 4
12:00:11.105 -> value:		0b10000
12:00:11.105 -> current:	0b11111111
12:00:11.105 -> mask:		0b110000
12:00:11.105 -> new:		0b11011111
12:00:11.105 -> read:		0b11111111
12:00:11.105 -> 
12:00:11.105 -> rtl_433_ESP(3): CC1101 radio.begin() failed, code: -16

Any ideas what it could be? Is it likely to be a faulty CC1101 module or something else?

The module is connected according to the documented pinout for ESP32.

Hi @marcusb

Unfortunately not all CC1101s are the same particularly their pin-outs.

Could it be that you also have one of the big-hole version I mention here?

It actually is, completely over-read your E07-M1101D comment :wink:

Esp32 with cc1101 and connecting esp32 gpio2 to cc1101 gdo0 - #5 by DigiH

Yes, it’s that one. I used the pinout from your post. It agrees with the diagram from the seller on Aliexpress, but I guess there is a possibility that it’s inaccurate. Not sure what I should change, as it looks like it’s successfully reading but not writing registers.

Then I’m afraid I’m also stumped :frowning:

Did you build with the sopurce for the 1.7.0 release, or the development versions? You should also try with the alternative source.

You might also want to try the following build flags

'-DRF_MODULE_GDO0=13'   ; CC1101 pin GDO0
'-DRF_MODULE_GDO2=4'   ; CC1101 pin GDO2

which I had also seen nicely running in the past with a same E07-M1101D.

All the best with this.

Turned out it was a faulty CC1101 module. Must have fried it.