Github Upload Boards Devices Community Docs Blog

ESP32/ESP8266 fail to send RF signal

Hi guys,

I got 3 boards(2 ESP32 & 1 nodemcu) flashed OMG 0.9.6(uploaded from PlatformIO with some config modifications). several days ago I tried to flash 2 of them(1esp32 & nodemcu) with the new release 0.9.7 code base, after that I kept failing to send RF signal.

Have you guys encountered this problem? I’m aware of that the RCSwitch lib got an update with the 0.9.7 release, is it the cause?

My boards keep shutting down and restart( sometimes they don’t) with 0.9.6, so I want to try the 0.9.7 release.

With same wire connection, the Nodemcu board failed to send RF( I tested this by switch on/off my 433 RF light) with the 0.9.7 firmware( downloaded from the release page on github), while all things work well with the 0.9.6 firmware.

Here is the log output with the 0.9.7 firmware:

(null)(null)(null)(null)(null)(null){"mqtt_server":"ha.cn","mqtt_port":"1883","mqtt_user":"your_username","mqtt_pass":"your_password","mqtt_topic":"home/","gateway_name":"OpenMQTTGateway_ESP8266_RF"}*WM: [1] getCoreVersion():          2_7_4
*WM: [1] system_get_sdk_version():  2.2.2-dev(38a443e)
*WM: [1] system_get_boot_version(): 31
*WM: [1] getFreeHeap():             41808
*WM: [3] allocating params bytes: 20
*WM: [2] Added Parameter: server
*WM: [2] Added Parameter: port
*WM: [2] Added Parameter: user
*WM: [2] Added Parameter: pass
*WM: [2] Added Parameter: secure
*WM: [3] Updated _max_params: 10
*WM: [3] re-allocating params bytes: 40
*WM: [2] Added Parameter: cert
*WM: [2] Added Parameter: name
*WM: [2] Added Parameter: topic
N: RF_EMITTER_GPIO: 3 
N: RF_RECEIVER_GPIO: 0 
N: Switching to RF Receiver
N: OpenMQTTGateway modules: ["RF"]
N: ************** Setup OpenMQTTGateway end **************
W: MQTT connection...
N: Connected to broker
N: Received json : ["RF"]
N: Received json : ["RF"]
N: Received json : ["RF"]
N: Received json : ["RF"]
N: Received json : ["RF"]
N: Received json : ["RF"]
N: Received json : ["RF"]
N: Received json : ["RF"]
N: Received json : ["RF"]
N: Subject: /SYStoMQTT
N: Received json : {"uptime":7,"version":"v0.9.7","freemem":35272,"rssi":-45,"SSID":"HOME","ip":"192.168.3.154","mac":"C4:5B:BE:6D:66:83","actRec":2,"modules":["RF"]}
N: Received json : {"value":1786498,"protocol":1,"length":24}
N: RF Protocol:1
N: RF Pulse Lgth: 350
N: Bits nb: 24
N: MQTTtoRF OK
N: Subject: /433toMQTT
N: Received json : {"value":1786498,"protocol":1,"length":24}
N: Switching to RF Receiver
N: Received json : {"value":1786498,"protocol":1,"length":24}
N: Received json : {"value":16432257,"protocol":1,"length":24,"delay":300}
N: Received json : {"value":16432257,"protocol":1,"length":24,"delay":300}
N: no pub. dupl
N: Received json : {"value":16432257,"protocol":1,"length":24,"delay":300}

Hi,

It may be due to new parameters introduced with wifimanager. Could you try to erase the flash memory of the boards and upload them again.
So as to erase the flash you can use the espressif download tools.
https://www.espressif.com/sites/default/files/tools/flash_download_tool_v3.8.8_0.zip
If it is not working you can share your configuration so that we take a look to it.

Hi,

Thanks for reply.
I did try to erase the flash memory with the tool you mentioned, and do the wifi setting all over again(on the ESP32 board). I may not mention earlier, all other “receiving” function worked well while the “sending” function doesn’t work.

I just use Nodemcu Pyflasher to flash the board like this, the wifi configuration is normal, mqtt server no secure, same result.

Would it be possible to share your configuration parameters, user_config.h and config_rf.h
Or the env if you are using platformio.

@NorthernMan54 any ideas here ?
Do we have to activate the sender now :
Example: mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTto433" -m '{"active":true}'
Before sending ?

@1technophile With a single module enabled, it is always enabled so no need to activate.

with the ESP8266 board, I was using the release firmware downloaded from github, so no configuration changed.As you can see in the screenshot, it’s nodemcuv2-rf-firmware.bin

And FYI, the “sending” action I took is by sending msg directly to mqtt through mqtt client, so the root cause here may not be the wifi setting ?

Any logs from the device while you are sending ?

Also are you able to monitor the transmission with a RTL-SDR ? I find it is tricky to get the correct signal and takes a few tries comparing the signal from openmqttgateway with the actual remote/device.

I reproduce the issue, let me dig into it

Found it,
mySwitch.enableTransmit(RF_EMITTER_GPIO);
is activated for CC1101 only. I will publish a PR soon and a release after

Bravo, I will try your diff

Release done:

Thanks for pointing this bug!