Skip to content

Commit 2459e1c

Browse files
authored
[RF] Change ESP8266 default RF_RECEIVER_GPIO from 0 to 4 (#2240) (#2323)
GPIO0 (D3) is the ESP8266 boot strapping pin: an RF receiver holding the data line low at reset forces the board into flash mode, so a stock nodemcuv2-rf build never starts after a restart with the receiver wired to the documented default pin. Default to GPIO4 (D2) instead, which the docs already recommend as the workaround. Environments that need other pins (srfb-direct, sonoff-rfr3, rf-wifi-gateway) already override the value explicitly and are unaffected.
1 parent 9f5bf3e commit 2459e1c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/setitup/rf.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Heltec LORA V3 is not compatible with RTL_433 library as it is based on an SX126
3232
### SRX STX Pinout
3333
|Board| Receiver Pin| Emitter Pin|
3434
|-|:-:|:-:|
35-
|ESP8266|D2/**D3**/D1/D8|**RX**/D2|
35+
|ESP8266|**D2**/D1/D8|**RX**/D2|
3636
|ESP32|**27**/26|12|
3737
|RF BRIDGE|-|-|
3838
|RF BRIDGE [DIRECT HACK](https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack)|4|5|
@@ -48,7 +48,7 @@ With SRX882S receiver connect the CS pin to 3.3V
4848
### CC1101 Pinout
4949
|Board|Receiver Pin(GDO2)|Emitter Pin(GDO0)|SCK|VCC|MOSI|MISO|CSN|GND
5050
|-|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
51-
|ESP8266|D2/**D3**/D1/D8|**RX**/D2|D5|**3V3**|D7|D6|D8|GND
51+
|ESP8266|**D2**/D1/D8|**RX**/D2|D5|**3V3**|D7|D6|D8|GND
5252
|ESP32|**D27**|D12|D18|**3V3**|D23|D19|D5|GND
5353

5454
To use the CC1101 module, `ZradioCC1101` must be uncomment in the `User_config.h` or added to the `build_flags`.
@@ -72,9 +72,9 @@ When **all** these variables are defined, OpenMQTTGateway will use your custom p
7272
![Addon_RF](../img/OpenMQTTgateway_ESP32_Addon_RF.png)
7373

7474
## ESP8266 Hardware setup
75-
If the gateway works only when serial monitor is connected don't use D3 use D2 instead (gpio 4) and modify config_RF.h accordingly.
75+
The default receiver pin is D2 (gpio 4). Avoid D3 (gpio 0): it is a boot strapping pin, a receiver holding it low at reset forces the ESP8266 into flash mode and the board never starts.
7676

77-
With SRX882 some users reported that D3 is not working use D1 instead in this case and modify config_RF.h accordingly.
77+
With SRX882 some users reported issues on D2, use D1 instead in this case and modify config_RF.h accordingly.
7878

7979
![Addon_RF](../img/OpenMQTTgateway_ESP8266_Addon_RF.png)
8080

main/config_RF.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ extern RFConfiguration iRFConfig;
230230
/*-------------------PIN DEFINITIONS----------------------*/
231231
#ifndef RF_RECEIVER_GPIO
232232
# ifdef ESP8266
233-
# define RF_RECEIVER_GPIO 0 // D3 on nodemcu // put 4 with rf bridge direct mod
233+
# define RF_RECEIVER_GPIO 4 // D2 on nodemcu, don't use 0 (D3): a receiver holding it low at reset forces the ESP8266 into flash mode
234234
# elif defined(ESP32)
235235
# define RF_RECEIVER_GPIO 27 // D27 on DOIT ESP32
236236
# endif

0 commit comments

Comments
 (0)