Start a new topic

protocol for Sonoff Dual to replace original firmware

With the following information it should be possible to replace the original firmware.


Details from my protocol analyzer (attached to ERX/ETX:


19230,8,N,1


Sampled from pushing the button on the internet

0xA0

0x04

0xxx

0xA1


where 0xxx seems to be:

0x00 both off

0x01 relay one on

0x02 relay two on

0x03 both relays on


2 people have this question

I received my Sonoff POW 1.0 today but I can't seem to program it. I believe the button may not be connected to GPIO0.


Anyone know how I can program my sonoff pow?

Hello, 


first:

i have Replaced my Firmewa of my Sonoff Dual. All Working fine now. Perfect Work. Thank's.


but i have an Question: 
i have flashed my Sonoff 4ch Wireless Module on this Module i can with your Code get working the first both relays. But the ther a cant get working. 

i think teh Adresse Protocol i need. Can you tell me How you had Logging the Protocol on yout Sonoff Dual ? 


i have tested:

 

0xA2

0x04

0xxx

0xA4


0x00 both off

0x01 relay one on

0x02 relay two on

0x03 both relays on


but with no Luck.

Thank you. 

Marcel

@marcel

I used a logic analyzer. They can be bought for less than 10 dollars.

@Markus


ok but my Problem is that i dont have the Original firmware on my module. 

i have seen the same PSB Module https://www.itead.cc/smart-home/psb-04.html


This even on an SIL F330 controlled. Your code works fine on this: https://www.itead.cc/smart-home/4-channel-wifi-wireless-switch.html


but i only can switch 2 of 4 relais. 

For Programming mode, should the horizontal connector GND (Button 1 and Button2) be connected to the short wire at Pin15?  Also, should the button be pressed while connecting via USB to trigger the Serial connection?

Which are the pins for button 0 and 1. From the schematics it looks like 13 and 12, but I saw in one of the sketches published in this thread that LED is on pin 13. Which one is correct?

Hi, can the extra pins  C2K, C2D, BUTTON 0 and  BUTTON 1 be used for adding any sensor? Please help me. 

Many thanks in advance.

@nobee: I think those headers are not connected to ESP8266 - so it is not possible.


I soldered a thin wire to esp8266 pin4 and 5 directly to get 2 extra inputs/outputs. It requires some precise work but I think this is the only way to get some I/Os.


It would be great if ITEAD would revise this board and add this as default.


2 people like this

Many thanks Matej Klun. Did u try to poke any holes on the PCB to see if any of those holes are broken out to use as input/output. Do you mind to post a pic of your set-up?

I did't try to probe any holes, but from what  I see on the PCB those extra pins are not connected anywhere. 

I did a quick photo of my setup, but the lighting was terrible so you cannot see much (red wire is soldered to the leftmost pin of the ESP8255EX chip - corresponds to pin4)

fhdlmo_c-FWxob9rRh7r41M1u5m3IH9NZw.jpg


Thank you so much Matej Klun. I assume that pin 4 is VDD3P3, which means it cant be acted as a analogue sensor. Let me know if I am wrong.


http://espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf

Maybe I was unclear in previous post. I was talking about GPIOs. So the pin is actualy pin24 but GPIO5 (before I made a mistake and wrote pin4). I hope I did not make to much confusion.

see page 5 of http://espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf for details.


Thanks for the detailed answer. Yes, I understand now the pin number. But I would like to know, did you connect an analog sensor such as a temperature sensor. I don't know which pin to connect a analog sensor. Could you please help me with that.

Tout has an ADC (pin6). It is also not connected anywhere on the PCB. The pin is on the opposite side of the chip from where I soldered my wire (see the pdf that I posted before). Its a bit more awkward to solder there because its not a corner pin.  I hope this helps.

@Matej Klun - What pin are you grounding to program esp8266.  I saw someone earlier posted picture where they had grounded Pin 15.  From your pic, it doesn't look like you are doing the same?


Thanks!


Rob

Login or Signup to post a comment