Skip to content

nopnop2002/esp-idf-cc1101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp-idf-cc1101

CC1101 Low-Power Sub-1 GHz RF Transceiver driver for esp-idf.

I based it on this.

  • 433MHz module(2.54mm pitch) CC1101-433MHz-2 54mm-1

  • 433MHz module(2.54mm pitch) CC1101-433MHz-2 54mm-2 CC1101-433MHz-2 54mm-2-pinout

  • 433MHz module(1.27mm pitch) CC1101-433MHz-1 27mm

  • 868MHz module(2mm pitch) CC1101-868MHz CC1101-868MHz-pinout

Changes from the original

  • The 918MHz setting has been abolished.
  • Added 355MHz setting.
  • TX power setting was changed.

Software requirements

ESP-IDF V4.4/V5.x.
ESP-IDF V5.0 is required when using ESP32-C2.
ESP-IDF V5.1 is required when using ESP32-C6.

Installation

git clone https://github.com/nopnop2002/esp-idf-cc1101
cd esp-idf-cc1101/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.

Configuration for Transceiver

config-cc1101-1 config-cc1101-2

Frequency selection

config-cc1101-3

Modulation speed selection

config-cc1101-4

Output power Selection

config-cc1101-6

Default power level.

315MHz 433MHz 868MHz 915MHz
Output Power 8.5dBm 7.8dBm 8.5dBm 7.2dBm
Current Consumption 24.4mA 25.2mA 29.5mA 27.4mA

Minimum power level is -30dBm.

315MHz 433MHz 868MHz 915MHz
Current Consumption 10.9mA 11.9mA 12.1mA 12.0mA

Power lebel is 0dBm.

315MHz 433MHz 868MHz 915MHz
Current Consumption 15.0mA 15.9mA 16.9mA 16.7mA

Maximum power level is 10dBm.

315MHz 433MHz 868MHz 915MHz
Current Consumption 26.9mA 29.1mA 32.4mA 31.8mA

SPI BUS selection

config-cc1101-5

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.

Wirering

CC1101 ESP32 ESP32-S2/S3 ESP32-C2/C3/C6
MISO -- GPIO19 GPIO37 GPIO4
SCK -- GPIO18 GPIO36 GPIO3
MOSI -- GPIO23 GPIO35 GPIO2
CSN -- GPIO5 GPIO34 GPIO1
GDO0 -- GPIO15 GPIO33 GPIO0
GDO2 -- N/C N/C N/C
GND -- GND GND GND
VCC -- 3.3V 3.3V 3.3V

You can change it to any pin using menuconfig.

GDO0 needs to be able to use interrupts.
Some GPIOs cannot use interrupts.

Communication with another library

Basically, communication between applications with different register values is not guaranteed.
These settings may differ.

  • Base frequency and channel spacing frequency
  • Packet format configuration
  • Manchester encoding configuration
  • Wireless modulation method
  • The data rate used when transmitting
  • The data rate expected in receive

You need to use this when communicating with the Arduino environment.
Communication with other libraries is not guaranteed.

Comparison of cc2500 and cc1101

cc2500 cc1101
Manufacturer Texas Instrument Texas Instrument
Frequency 2.4GHz 315/433/868/915MHz
Maximum Payload 64Byte 64Byte
FiFo for reception 64Byte*1 64Byte*1
FiFo for transmission 64Byte*1 64Byte*1
CRC Length 16bits 16bits
Acknowledgement Payload No No
Available Modulation format 2-FSK/GFSK/OOK/MSK 2-FSK/4-FSK/GFSK/ASK/OOK/MSK

Comparison of nRF905, cc1101 and si4432

nRF905 cc1101 si4432
Manufacturer Nordic Semiconductor Texas Instrument Silicon Labs
Frequency 433/868/915MHz 315/433/868/915MHz 315/433/868/915MHz
Maximum Payload 32Byte 64Byte 64Byte
FiFo for reception 32Byte*1 64Byte*1 64Byte*1
FiFo for transmission 32Byte*1 64Byte*1 64Byte*1
CRC Length 8/16bits 16bits 8/16bits
Acknowledgement Payload No No No
Available Modulation format GFSK 2-FSK/4-FSK/GFSK/ASK/OOK/MSK FSK/GFSK/OOK
  • GFSK : Gaussian shaped Frequency Shift Keying
  • FSK : Frequency Shift Keying
  • 2-FSK : Binary Frequency Shift Keying
  • 4-FSK : Quaternary Frequency Shift Keying
  • ASK : Amplitude Shift Keying
  • OOK : On-Off Keying
  • MSI : Minimum Shift Keying

About

CC1101 Low-Power Sub-1 GHz RF Transceiver driver for esp-idf

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published