New Sonoff RF Bridge Board - Need Flashing Help

Hello dear team, I may need your help with a situation that I see got solved above, How did you manage to Flash tasmota on a Sonoff RF BridgeR2 – ESP8285 ( Board Version: R2 v2.2) ( Board date: 2021.01.19). After I connect the board to a windows machine and try to use this link: Install Tasmota or tasmotizer-1.2.exe I am receiving this error message: “failed to connect to esp8266 timed out waiting for packet header” I have tried pressing the “Pairing button” for 3/6/10 secconds while inserting the Prolific USB-to-Serial (Driver version: 3.3.2.120 - Date: 2008.9.24) Thank you in advance for any suggestion that you may have.

I don’t remember having problems with this.

  • Is the serial adapter jumper set at 3.3v?
  • Are the serial datalines crossed? (Rx to Tx, Tx to Rx)
  • micro usb port not connected to anything, right?
  • The header pins solidly connected?

If the answer to all of these is true, it is worth checking that the serial converter works by trying it with another esp chip. That’s all I got :confused:

Thanks @mateine for this information !
Thanks to your help I’ve successfully flashed my R2 v2.2 with ESPhome, then I tried Tasmota and finally I build my own firmware based on RFlink32, write a documentation, made a flash script (for Windows) and posted it on github. I really recommend to try this firmware on the Sonoff RF Bridge !

There is an already compiled firmware in my github repo :

Also I propose alternative way to cut the USB data lines on the back of the board :

5 Likes

Wow, I have to try this!
BTW, my sonoff died last week. I had added a thermometer so it may be that, but it is also possible that not cutting the transmitter and receiver lines of the dedicated en/decoder chip is a bad idea. You may want to fint them out and cut them too

Update: I reflashed it and it is fine again. Still worth cutting the transmission lines as you did.

Good to know, mine works since few days in continue but let’s make it more securely :
we replace the wires by resistors, as Tinkerman from espurna said : " resistor : anything in the range 180-680 ohms, 1/4 or 1/8 W will do. The advantage of using a resistor is that if you inadvertently solder the wrong pins, the resistor will prevent any damage to the semiconductors."

Then we isolate the en/decoder chip by cutting these lines :
The emitter at the back :
image

The receiver near the “RST” point :

Like that it should have a long life :slight_smile:

5 Likes

Wow @schmurtz, you really took the mod to the next level.
I actually moved on to a custom d1-mini esp board with 3 cc1101 chips to work in 3 frequencies at the same time, but I’ll still try to fix my broken sonoff just to apply your extra moddings.

I want to share my happiness on seeing how you picked this up and improved it way further, my respects! :slight_smile:

I have been watching this thread for a while and you guys are awesome! I have been able to flash tasmota, esphome, and rflink to this board because of you all. The only issue I am having is I don’t think the RF fan controller I am using is sending signals that either tasmota or esphome can understand. I can tell that it is seeing the signals being sent out but from what little I know about reading mqtt data the part that should be unique isn’t. Do you have a way to see the signals that rflink software is seeing? I can’t seem to find anything that talks about how to see this information.

Haven’t tried RFLink directly, but with esphome you can do:

# ...rest of config...
remote_receiver:
  pin: GPIO04
  dump: raw

Then connect to it with the logger. The rest of the config is here.
If your fan uses the FSK modulation and Manchester encoding, you’ll get the “shape of the pulse” as a list of pairs of numbers. Something like [+500, -100] means that the signal is high for 500 microseconds and then low for 100.
It could well be that the fan uses some other kind of modulation, in which case it may not be possible to decode with the sonoff receiver.
If you are really curious, you can get an RTL-SDR (software defined radio) dongle, they are cheap. I got one recently and I’m having a lot of fun :slight_smile:

PS: yes, this crowd is awesome!

First off, again I have to say thank you. The ESPHome has much better documentation its just a little more manual when it comes to flashing and programing the device. Also the output is WAY more nosy, but with that said I was able to get it working with both seeing the signals and, more important for me, sending signals.

The odd thing was that all the signals looked something like this.

Received Raw: 393, -407, 395, -405, 393, -408, 394, -406, 375, -425, 391, -407, 393, -408, 394, -405, 395, -406, 392, -408, 392, -408, 394

But after I uploaded something like this to create the first button it starting seeing the other rf signals like this.

Received RCSwitch Raw: protocol=1 data='1101000000000100011101000110011111101111000000010001111111101110'

I mean it makes my life more easy but just some strange thing I noticed while starting to use ESPHome. Thanks again!!

Your triple device is awesome :star_struck:
For information RFlink32 can work with ESP32 and RFM69. I use it in 868mhz and raw mode (called “debug mode” and “RFsend” in RFlink) to control my old halogen light :: the approch was similar to yours (but with only one transceiver).
Today I’ve made a little mod for the fun : I have added a serial to USB directly inside the Sonoff RF Bridge. Like this I can close the box and I have only one plug to monitor or flash it (and I don’t look for my FTDI anymore :smiley: )

Soon I will update the sources of RFLink32-For-Sonoff-RF-Bridge to be able to launch the AP when the button is pressed like the re-configuration is easier.
++!

3 Likes

Great work on this!

I have a V2 flashed with Tasmota that’s been working great and now need to order another one for our new vacation home. I was dismayed to read the hardware was recently changed and people couldn’t make it work anymore.

You all are heroes!

1 Like

Cool! I repeated your work, everything works fine, I got the raw code. Now I would like to figure out how to make a binary sensor from this code…
And unfortunately I can’t send the code to the relay in any way. How can I check the functionality of the transmitter?

The RF433 recive chip is SYN470R or WS490F,i think it is SYN470R 8 pin package

Really convenient! Did you managed to enable ota?

You may like this tiny usb<->serial

€ 0,69 10%OFF | CH340N CH340E Sop8 USB to TTL Module Pro Mini Download Replacement CH340g CH340E
https://a.aliexpress.com/_vMIKJy

Hi. Im using your RFLink32-for-Sonoff-RF-Bridge firmware and HA RFLink integration. With this Hard mod work only receive as a sensor. But when i try send data from switch i get this resonse in MQTT topic - 20;3B;CMD UNKNOWN;
and in home-assistant.log
2021-12-10 04:59:14 DEBUG (MainThread) [homeassistant.components.rflink] Sending command: off to Rflink device: ev1527_08a0e5_01
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] sending command: {‘protocol’: ‘ev1527’, ‘id’: ‘08a0e5’, ‘switch’: ‘01’, ‘command’: ‘off’}
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] writing data: ‘10;ev1527;08a0e5;01;off;\r\n’
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] waiting for acknowledgement
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] received data: e[2K
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] received data: Message arrived [Ser2Net]:
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] received data: 10;ev1527;08a0e5;01;off;
2021-12-10 04:59:14 WARNING (MainThread) [rflink.protocol] dropping invalid data: e[2K
Message arrived [Ser2Net]:10;ev1527;08a0e5;01;off;
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] received data: 20;3B;CMD UNKNOWN;
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] got packet: 20;3B;CMD UNKNOWN;
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] decoded packet: {‘node’: ‘gateway’, ‘protocol’: ‘unknown’, ‘response’: ‘command_unknown’, ‘ok’: False}
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] command response: {‘node’: ‘gateway’, ‘protocol’: ‘unknown’, ‘response’: ‘command_unknown’, ‘ok’: False}
2021-12-10 04:59:14 DEBUG (MainThread) [rflink.protocol] packet acknowledged

Hi Maxico, the ev1527 protocol of RFLink32 is only in reception for the moment.
To explain : RFlink32 is based on official RFlink sources which are old, very incomplete and compatible only with arduino mega. RFlink official project is not open source anymore so we have to create every protocol by our self.

So RFlink32 still in development and each developer/user can create is own protocols. For example Newkaku protocol has been added in reception and emission by coin3. Harvesting protocol has been implemented by us too on some builds (for buttons without battery). Somfy shutters protocols has been implemented too. So if we want more protocols we need more contributors to this great project :slight_smile:

You can come to discuss with us on our RFlink discord (just here) , don’t be afraid, we discuss in french sometime but we can switch to English easily :slight_smile:

Did you manage to flash it? I ran into the same problem, looked up the ESP chip and how to put it into flash mode (as I assumed it didn’t go into flashmode automatically). You have to connect GPI0 to ground.


Source:

I used a jumper cable, put all the wires in where they’re supposed to go except for the 3v and than connect gpio0 to ground and insert 3.3v pin. (after this you can let go of the gpio0 connection) and your Sonoff bridge should be in flash mode and you should be able to flash it.

Press the pairing button and then connect the usb.

I have a questions about your mod, as I am in the process of converting my Sonoff Bridge.
Why are the DATA+ and DATA- pins of the FTDI module (PC-side) connected to the cut D+/D- traces?
Thanks!