matthias-bs / BresserWeatherSensorReceiver

Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver for Arduino based on CC1101, SX1276/RFM95W or SX1262
MIT License
121 stars 23 forks source link

ESP32 / CC1101 wiring #160

Closed matthias-bs closed 6 months ago

matthias-bs commented 7 months ago

Good morning I am looking for the wiring to use BresserWeatherSensorReceiver it with an ESP32 and a CC1101. Here are the pins of my CC1101 1 GND 2 3.3V 3 GDO0 4 CKN 5 SCK 6 MOSI 7 MISO/GDO1 8 GDO2

can you help me connect my ESP32 and my CC1101 Thank you

Ursprünglich gepostet von @Piratejim13 in https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/14#issuecomment-2078997770

matthias-bs commented 7 months ago

@piratejim13 Please ignore my previous posts...

Which board are you using?

Did you read https://github.com/matthias-bs/BresserWeatherSensorReceiver?tab=readme-ov-file#manual-configuration?

You can use the section starting at https://github.com/matthias-bs/BresserWeatherSensorReceiver/blob/4b19519aa1ac30daf6b9cd71a07b50f255f97358/src/WeatherSensorCfg.h#L559C5-L559C50 as a template - use any free GPIO pins of your board - and use the default SPI pins of your board.

Set Debug Level to "Debug" before compiling and check which pins are actually used in the output.

Piratejim13 commented 7 months ago

Good morning

I use an ESP32 Dev Module in IDE and a CC1101. I have read the documents cited but I cannot find the pin equivalences. Here are the pins of my CC1101: 1 GND 2 3.3V 3 GDO0 4 CKN 5 SCK 6 MOSI 7 MISO/GDO1 8 GDO2

Best Regard

Le ven. 26 avr. 2024 à 12:34, Matthias Prinke @.***> a écrit :

@Piratejim13 https://github.com/Piratejim13 Which board are you using?

Did you read https://github.com/matthias-bs/BresserWeatherSensorReceiver?tab=readme-ov-file#configuration? If you use any of the predefined boards, you just have to select in in the Arduino IDE and do not have to change the code.

Otherwise you can use the section starting at https://github.com/matthias-bs/BresserWeatherSensorReceiver/blob/4b19519aa1ac30daf6b9cd71a07b50f255f97358/src/WeatherSensorCfg.h#L559C5-L559C50 as a template and use the default SPI pins of your board.

— Reply to this email directly, view it on GitHub https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/160#issuecomment-2079126224, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZAU3DIVSLE3BF66URIY3DY7IUSXAVCNFSM6AAAAABG2QVROWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZZGEZDMMRSGQ . You are receiving this because you were mentioned.Message ID: @.*** com>

matthias-bs commented 7 months ago

Hi,

please find the connections from ESP32 GPIO pins in the comments below:

#elif defined(ESP32)
    // Generic pinning for ESP32 development boards
    #define PIN_RECEIVER_CS   27 // connect to CKN (this is unusual, should actually be CSN)

    // CC1101: GDO0 / RFM95W/SX127x: G0
    #define PIN_RECEIVER_IRQ  21 // connect to GDO0

    // CC1101: GDO2 / RFM95W/SX127x: G1
    #define PIN_RECEIVER_GPIO 33 // connect to GDO2

    // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
    #define PIN_RECEIVER_RST  32 // leave unconnected

For that matter, we assume that your board has those pins and that they are available. You did not provide any information about your ESP32 board.

The SPI pins SCK, MISO and MOSI should be marked on your ESP32 board as well - connect those 1:1 to your board. There is no guarantee, but the assignment SCK - GPIO18, MOSI - GPIO23 and MISO - GPIO19 seems to be common.

The remaining pins 3.3V and GND should also be marked on the ESP32 board and have to be connected 1:1 to the CC1101 module.

If things are still unclear, please provide some information about your ESP32 board. If nothing else is available, a photo with the pin markings (and maybe a hint about manufacturer/model) could help.

Cheers, Matthias

Piratejim13 commented 6 months ago

Good morning Excuse me for bothering you again but I have problems with the management program for a Bresser 7_in_1. the WS.Begin command cancels all printing on my serial monitor so I cannot debug the program

could you guide me on the problem? thanks in advance

best regard

Le sam. 27 avr. 2024 à 20:30, Matthias Prinke @.***> a écrit :

Hi,

please find the connections from ESP32 GPIO pins in the comments below:

elif defined(ESP32)

// Generic pinning for ESP32 development boards
#define PIN_RECEIVER_CS   27 // connect to CKN (this is unusual, should actually be CSN)

// CC1101: GDO0 / RFM95W/SX127x: G0
#define PIN_RECEIVER_IRQ  21 // connect to GDO0

// CC1101: GDO2 / RFM95W/SX127x: G1
#define PIN_RECEIVER_GPIO 33 // connect to GDO2

// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST  32 // leave unconnected

For that matter, we assume that your board has those pins and that they are available. You did not provide any information about your ESP32 board.

The SPI pins SCK, MISO and MOSI should be marked on your ESP32 board as well - connect those 1:1 to your board. There is no guarantee, but the assignment SCK - GPIO18, MOSI - GPIO23 and MISO - GPIO19 seems to be common.

The remaining pins 3.3V and GND should also be marked on the ESP32 board and have to be connected 1:1 to the CC1101 module.

If things are still unclear, please provide some information about your ESP32 board. If nothing else is available, a photo with the pin markings (and maybe a hint about manufacturer/model) could help.

Cheers, Matthias

— Reply to this email directly, view it on GitHub https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/160#issuecomment-2081122972, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZAU3H7HE4DBGEZDOVQRMDY7PVCVAVCNFSM6AAAAABG2QVROWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGEZDEOJXGI . You are receiving this because you were mentioned.Message ID: @.*** com>

matthias-bs commented 6 months ago

Good evening,

Most likely the program enters an endless loop, because the configuration of the CC1101 fails. This can be caused by a wrong wiring or (less likely) a defective CC1101.

Maybe I can help if you provide some information about your boards, your wiring and your SW config.

Best regards, Matthias

Piratejim13 commented 6 months ago

Good morning Here is attached my configuration, the photos of my cards and the wiring

thank you for your help

Sincerely

Le mer. 1 mai 2024 à 21:54, Matthias Prinke @.***> a écrit :

Good evening,

Most likely the program enters an endless loop, because the configuration of the CC1101 fails. This can be caused by a wrong wiring or (less likely) a defective CC1101.

Maybe I can help if you provide some information about your boards, your wiring and your SW config.

Best regards, Matthias

— Reply to this email directly, view it on GitHub https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/160#issuecomment-2089013524, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZAU3DSHTQ7WQPYPVT2ODLZAFB57AVCNFSM6AAAAABG2QVROWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBZGAYTGNJSGQ . You are receiving this because you were mentioned.Message ID: @.*** com>

matthias-bs commented 6 months ago

I don't see any attachment.

Piratejim13 commented 6 months ago

@.*** sent you documents pour debug

2 items, 774 KB in total ・ Expires on 9 May, 2024

Download link: https://wetransfer.com/downloads/35d958d9621b8b8dc5b382840348ab1e20240502094034/f63592c971312ce8c1a9d765ae4456bf20240502094117/16cee6?trk=TRN_TDL_01&utm_campaign=TRN_TDL_01&utm_medium=email&utm_source=sendgrid

2 items

WeatherSensorCfg.h - 23.2 KB cablage.pdf - 751 KB

Get more out of WeTransfer, get Pro

About WeTransfer: https://wetransfer.com/about Help: https://wetransfer.zendesk.com/hc/en-us Legal: https://wetransfer.com/legal/terms

To make sure our emails arrive, please add @.*** to your contacts.

Piratejim13 commented 6 months ago

Hi

I sent the documents on wetranfert

Le jeu. 2 mai 2024 à 10:16, Matthias Prinke @.***> a écrit :

I don't see any attachment.

— Reply to this email directly, view it on GitHub https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/160#issuecomment-2089872030, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZAU3GOIZQQQOOND32FV33ZAHY7TAVCNFSM6AAAAABG2QVROWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBZHA3TEMBTGA . You are receiving this because you were mentioned.Message ID: @.*** com>

matthias-bs commented 6 months ago

The preferred way is to attach/post information via the Github website in the issue.

Piratejim13 commented 6 months ago

the documents cablage.pdf WeatherSensorCfg.txt

matthias-bs commented 6 months ago

Hi,

as can bee seen on your photo, you are using a 433 MHz version of the CC1101 module. This will not work, you need an 868 MHz version.

see https://github.com/matthias-bs/BresserWeatherSensorReceiver?tab=readme-ov-file#cc1101

Cheers, Matthias

Piratejim13 commented 6 months ago

Hi

the CC1101 I use does both frequencies. moreover it already worked with a previous version of your application but it no longer works with the update.

[image: image.png] Best regard

Le ven. 3 mai 2024 à 06:48, Matthias Prinke @.***> a écrit :

Hi,

as can bee seen on your photo, you are using a 433 MHz version of the CC1101 module. This will not work, you need an 868 MHz version.

see https://github.com/matthias-bs/BresserWeatherSensorReceiver?tab=readme-ov-file#cc1101

Cheers, Matthias

— Reply to this email directly, view it on GitHub https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/160#issuecomment-2092115973, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZAU3BEMYPHC7Q6HDOFYODZAMJIHAVCNFSM6AAAAABG2QVROWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSGEYTKOJXGM . You are receiving this because you were mentioned.Message ID: @.*** com>

matthias-bs commented 6 months ago

Please make yourself familiar with posting images or code into Github issues. People are less willing to help if unnecessary effort is required on their side.

Can you please add your compile logfile and the output of the serial console (with debug enabled)?

matthias-bs commented 6 months ago

Please change the code section in BresserWeatherSensorCfg.h as shown below (i.e. comment out the second define):

#elif defined(ARDUINO_ESP32_DEV) || defined(ARDUINO_DFROBOT_FIREBEETLE_ESP32)
    //#define LORAWAN_NODE
    //#define FIREBEETLE_ESP32_COVER_LORA
Piratejim13 commented 6 months ago

Good morning thank you for your help I finally manage to transmit the values ​​of my 7_in_1 in mqtt Capture d’écran du 2024-05-06 10-57-47

best regard