-
Hi, I'm trying to get a CC1101 (868/900MHz) working with an ESP32 WROOM-32 (pinout) over SPI. I'm fairly new to all of this. Here's how I've currently wired things:
And here's my RadioLib related code: #include <Arduino.h>
#include <RadioLib.h>
SPIClass newSPI(VSPI);
CC1101 radio = new Module(5, 2, RADIOLIB_NC, 4, newSPI, SPISettings(2000000, MSBFIRST, SPI_MODE0));
void setup()
{
Serial.begin(9600);
Serial.println("Start Setup");
newSPI.begin();
const int state = radio.begin();
if (state == RADIOLIB_ERR_NONE)
{
Serial.println("C1101 initialized successfully");
}
else
{
Serial.print("C1101 initialization failed, code ");
Serial.println(state);
while (true)
{
delay(10);
}
}
}
void loop()
{
} When I flash the ESP32 with the same code, I get a return code of -2. I've checked my wiring with a multimeter and everything seems fine. What am I overlooking here? Thanks. EDIT 1:I've tested the CC1101 board with my Flipper Zero and it gets instantly recognized as external device and I can send data through it. The only difference concerning the wiring is that the GBO2 doesn't get wired to the GPIO. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
You can start by enabling the debug mode, you will most likely see that the device isn't returning any data, pointing to an issue with the SPI. You should double-check the SPI pins; you haven't provided any pin numbers for |
Beta Was this translation helpful? Give feedback.
You can start by enabling the debug mode, you will most likely see that the device isn't returning any data, pointing to an issue with the SPI. You should double-check the SPI pins; you haven't provided any pin numbers for
newSPI.begin();
, so I'm guessing it will use some defaults - are you sure they are the ones you expect?