# ESP32-WROOM und CC1101 - empfange keine Daten

**URL:** <https://forum.arduino.cc/t/esp32-wroom-und-cc1101-empfange-keine-daten/1190290>\
**Category:** Deutsch\
**Created:** [November 17, 2023, 2:08pm UTC](https://forum.arduino.cc/t/esp32-wroom-und-cc1101-empfange-keine-daten/1190290 "2023-11-17T14:08:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ms476](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ms476/32/1013044_2.png) [@ms476](https://forum.arduino.cc/u/ms476)\
**Post date:** [November 17, 2023, 2:08pm UTC](https://forum.arduino.cc/t/esp32-wroom-und-cc1101-empfange-keine-daten/1190290/1 "2023-11-17T14:08:25Z")

</div>

Hallo,

ich wollte mal den Einstieg wagen und mit einem ESP32-WROOM32 und einem 433MHz Modul (CC1101) das Signal eines Tasters empfangen.

Ich habe mir dazu [ein Beispiel von SmartRC-CC1101-Driver-Lib](https://github.com/LSatan/SmartRC-CC1101-Driver-Lib/blob/master/examples/Rc-Switch%20examples%20cc1101/ReceiveDemo_Simple_cc1101/ReceiveDemo_Simple_cc1101.ino) rausgesucht und die Verkabelung wie folgt durchgeführt (links ESP32, rechts CC1101):

- D2 -- GDO00
- D4 -- GDO02
- D5 -- CSN
- D18 -- SCK
- D19 -- MISO
- D23 -- MOSI
- 3v3 -- VCC
- GND -- GND

Leider wird nichts empfangen, nicht das Signal des Tasters oder auch die Signale der Wetterstation werden nicht ausgegeben.

Senden mit Hilfes des [Beispiels von SmartRC-CC1101-Driver-Lib](https://github.com/LSatan/SmartRC-CC1101-Driver-Lib/blob/master/examples/Rc-Switch%20examples%20cc1101/SendDemo_cc1101/SendDemo_cc1101.ino) funktioniert und wird mir bei meiner Sonoff Bridge angezeigt.

Hat jemand einen guten Rat für mich?

Vielen Dank vorab.

---

<div class="post-metadata">

**Author:** ![HotSystems](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hotsystems/32/219785_2.png) [@HotSystems](https://forum.arduino.cc/u/HotSystems)\
**Post date:** [November 17, 2023, 2:12pm UTC](https://forum.arduino.cc/t/esp32-wroom-und-cc1101-empfange-keine-daten/1190290/2 "2023-11-17T14:12:48Z")

</div>

> [@ms476](#):
>
> Hat jemand einen guten Rat für mich?

Ja, ganz einfach:  
Ohne deine Sketche (Sender und Empfänger) können wir nichts sehen, also auch nicht helfen.

---

<div class="post-metadata">

**Author:** ![ms476](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ms476/32/1013044_2.png) [@ms476](https://forum.arduino.cc/u/ms476)\
**Post date:** [November 17, 2023, 2:22pm UTC](https://forum.arduino.cc/t/esp32-wroom-und-cc1101-empfange-keine-daten/1190290/3 "2023-11-17T14:22:34Z")

</div>

Die Sketche hatte ich nur verlinkt, hier das Empfangen

```arduino
#include <ELECHOUSE_CC1101_SRC_DRV.h>
#include <RCSwitch.h>

int pin; // int for Receive pin.

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  pin = 4; // for esp32! Receiver on GPIO pin 4. 

  if (ELECHOUSE_cc1101.getCC1101()){
    Serial.println("Connection OK");
  }else{
    Serial.println("Connection Error");
  }

  ELECHOUSE_cc1101.Init();
  ELECHOUSE_cc1101.setMHZ(433.92);

  mySwitch.enableReceive(pin);

  ELECHOUSE_cc1101.SetRx();  
}

void loop() {
 
  if (mySwitch.available()){
    
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}

```

Die Meldung "Connection OK" wird mir in der Console ausgegeben.

Hier das Senden:

```arduino
#include <ELECHOUSE_CC1101_SRC_DRV.h>
#include <RCSwitch.h>

int pin;

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  pin = 2; // for esp32! Transmit on GPIO pin 2.

  if (ELECHOUSE_cc1101.getCC1101()){
    Serial.println("Connection OK");
  }else{
    Serial.println("Connection Error");
  }

  ELECHOUSE_cc1101.Init();
  ELECHOUSE_cc1101.setMHZ(433.92);
 
  mySwitch.enableTransmit(pin);

  ELECHOUSE_cc1101.SetTx();
}

void loop() {

  /* See Example: TypeA_WithDIPSwitches */
  mySwitch.switchOn("11111", "00010");
  delay(1000);
  mySwitch.switchOff("11111", "00010");
  delay(1000);

  /* Same switch as above, but using decimal code */
  mySwitch.send(5393, 24);
  delay(1000);  
  mySwitch.send(5396, 24);
  delay(1000);  

  /* Same switch as above, but using binary code */
  mySwitch.send("000000000001010100010001");
  delay(1000);  
  mySwitch.send("000000000001010100010100");
  delay(1000);

  /* Same switch as above, but tri-state code */ 
  mySwitch.sendTriState("00000FFF0F0F");
  delay(1000);  
  mySwitch.sendTriState("00000FFF0FF0");
  delay(1000);

  delay(20000);
}

```

---

<div class="post-metadata">

**Author:** ![ms476](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ms476/32/1013044_2.png) [@ms476](https://forum.arduino.cc/u/ms476)\
**Post date:** [November 17, 2023, 3:05pm UTC](https://forum.arduino.cc/t/esp32-wroom-und-cc1101-empfange-keine-daten/1190290/4 "2023-11-17T15:05:44Z")

</div>

🤦‍♂️  
Au man, da probiere ich das immer wieder aus, nichts geht.  
Dann stelle ich die Frage in dem Forum und versuche es anschließend mit folgender Zeile nach dem setzen der MHZ und dann klappt es

```arduino
ELECHOUSE_cc1101.setModulation(2); // ASK

```

---

<div class="post-metadata">

**Author:** ![HotSystems](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hotsystems/32/219785_2.png) [@HotSystems](https://forum.arduino.cc/u/HotSystems)\
**Post date:** [November 17, 2023, 3:17pm UTC](https://forum.arduino.cc/t/esp32-wroom-und-cc1101-empfange-keine-daten/1190290/5 "2023-11-17T15:17:47Z")

</div>

Das ist die Aura des Forums 😉  
Ne im Ernst, es ist doch gut wenn man den Fehler selbst findet. Das zeigt, man hat sein Projekt im Griff.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 15, 2024, 3:18pm UTC](https://forum.arduino.cc/t/esp32-wroom-und-cc1101-empfange-keine-daten/1190290/6 "2024-05-15T15:18:39Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
