sOnOff Basic R2 v1.0 2017-10-11 : Cant flash it

6,746 views
Skip to first unread message

xMad

unread,
Mar 28, 2018, 9:34:57 AM3/28/18
to SonoffUsers
Hi,
I can flash sOnOff TH16 on a Rasp Pi 3B with esptool.py  from arendst/Sonoff-Tasmota.
BUT
on a sOnOff Basic R2 V1.0 2017-10-11 I can't. Looks it don't enter in flash mode.

Do someone manage to flash on these ?

Thanks

Andy Maddick

unread,
Mar 28, 2018, 10:00:10 AM3/28/18
to SonoffUsers
Looks it don't enter in flash mode.
So when you hold down the button & apply power, what does the LED do ?
What version firmware ? eWeLink
There maybe an option to OTA

xMad

unread,
Mar 28, 2018, 10:07:58 AM3/28/18
to SonoffUsers
Device is Ok with eWelink
No led are blinking before flash.

For TH16 I flash it with last release of tasmota (Sonoff-Tasmota) and with standard sonoff.bin (I then use button (4 click) to enable wifi and change it through web)
For Basic R2 I can't connect to esp (try DOUT ....)

Andy Maddick

unread,
Mar 28, 2018, 10:22:38 AM3/28/18
to SonoffUsers
Tried to help you on github...
I solved 3 others flashing problems..
Gave up because I need information, so ask questions..
Ask yourself... Did you answer my questions ?

I will repeat & add more..
It may have PUYA on the flash chip, can you see those letters ?
So when you hold down the button & apply power, (to flash) what does the LED do ?
What does the LED do when you turn it on, without trying to flash ?
Does it work in eWelink ?
What version of eWeLink firmware is installed on the device ? eWeLink App will tell you...

Andy

Andy Maddick

unread,
Mar 28, 2018, 11:04:54 AM3/28/18
to SonoffUsers
Also put it into flash mode
use esptool.py read_mac
do you get a response ?

xMad

unread,
Mar 28, 2018, 3:17:51 PM3/28/18
to SonoffUsers
Hi,
It may have PUYA on the flash chip, can you see those letters ?
=> No (on ESP chip)
So when you hold down the button & apply power, (to flash) what does the LED do ?
=> No LED (connected to Rasp Pi)
Does it work in eWelink ?
=> Yes
What version of eWeLink firmware is installed on the device ? eWeLink App will tell you...
=>1.6.0
Xavier

xMad

unread,
Mar 28, 2018, 3:30:47 PM3/28/18
to SonoffUsers
pi@X_Pi:~/sonoff/Sonoff-Tasmota $ esptool.py --port /dev/ttyAMA0 read_mac
esptool.py v2.3.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

Note : I swap RX/TX, same result
Note2 : Same config Ok for sOnOff TH16

Andy Maddick

unread,
Mar 28, 2018, 6:28:45 PM3/28/18
to SonoffUsers
It may have PUYA on the flash chip, can you see those letters ?
=> No (on ESP chip)
No the memory chip, not the ESP8266 chip, anyway does not matter, you can not even connect via serial cable..
This is the first step which you must get past..

Have you every flashed older Sonoff Basic modules ?
Can you show a picture of your soldering ?
Where are you connecting the 4 leads, 
Power pin is closest to 'button', followed by 2 coms wires (RX<TX) then GND..

Andy Maddick

unread,
Mar 28, 2018, 6:29:15 PM3/28/18
to SonoffUsers
It may have PUYA on the flash chip, can you see those letters ?
=> No (on ESP chip)
No the memory chip, not the ESP8266 chip, anyway does not matter, you can not even connect via serial cable..
This is the first step which you must get past..

xMad

unread,
Mar 29, 2018, 4:03:53 AM3/29/18
to SonoffUsers
No can't read PUYA elsewhere

For sure a I have to connect via serial first...

I've flashed several "old" sOnOf previously and a TH16 recently. Never had this issue
2018-03-10 11 20 282018-03-10 11 20 09
I respect tuto : Vcc (close to the button), TX, RX (or swap), GND, Not used
I've 4 of those Basic R2

Colin Law

unread,
Mar 29, 2018, 4:09:49 AM3/29/18
to xMad, SonoffUsers
On 29 March 2018 at 09:03, xMad <xavier....@gmail.com> wrote:
No can't read PUYA elsewhere

For sure a I have to connect via serial first...

I've flashed several "old" sOnOf previously and a TH16 recently. Never had this issue
2018-03-10 11 20 282018-03-10 11 20 09
I respect tuto : Vcc (close to the button), TX, RX (or swap), GND, Not used
I've 4 of those Basic R2

Well if the others all work and that one doesn't I suspect a hardware issue.  I guess you have already checked that you haven't got a solder bridge on one of the header pins you soldered in.  Other than that in your situation I would probably bin it (well metaphorically at least) and get another one.  It is not worth spending hours trying to analyse the problem on something that costs so little.

Colin

Message has been deleted

Andy Maddick

unread,
Mar 29, 2018, 9:00:31 AM3/29/18
to SonoffUsers
do you still have older Sonoff, can you connect serial cable with sonoff off, power up & using monitor and view serial output ?
Soldering looks fine
@Collin he has just purchased 4 of these new Sonoff Basic modules, can not flash one..
It will get harder for us all to find older stocks of Sonoff modules, the cause needs to be investigated..
The Sonoff Basic modules I own are TH_V1.1, 2017-5-5
these new ones are R2 V1.0 Sonoff Basic 2017-10-11

xMad can you try esptool.py and hold button down, not for a moment.. but hold down and keep holding down while you power, is there any serial output at all ?
esptool.py READ_MAC will not work while something else is already using the serial connection..So turn other programs off..

Colin Law

unread,
Mar 29, 2018, 10:05:27 AM3/29/18
to Andy Maddick, SonoffUsers
On 29 March 2018 at 14:00, Andy Maddick <oxy...@gmail.com> wrote:
> ...
> @Collin he has just purchased 4 of these new Sonoff Basic modules, can not
> flash one..

Oh, I misunderstood, I thought the others were ok. If all are failing
then it is obviously something more serious.

Colin
Message has been deleted

Andy Maddick

unread,
Mar 29, 2018, 4:33:13 PM3/29/18
to SonoffUsers
xMAD, 
you need to confirm that your serial interface still works OK on older Sonoff hardware that you have, 
you do not need to change anything on that device if is already perfectly operating,
but you must confirm at least you can get a read...
Do you use any form of serial monitor ?
I use the one internal to platformIO inside Atom, without a serial monitor things become guess work..
If you have never used a Serial Monitor, it is time you learnt
Your PC is Windows or Linux ?

xMad

unread,
Mar 30, 2018, 8:22:25 AM3/30/18
to SonoffUsers
Hi Andy,

I'm flashing through Rasp Pi 3 B.

I don't use any serial monitor thus I flash old/recent (but NOT sOnOff Basic R2) without any issues....
Recently my RaspPi/ miniterm.py can see data from a sOnOff TH16.
=>So I need to have a look to platform IO

Keep you inform. But I think that Basic R2 have something new....

Xavier

Andy Maddick

unread,
Mar 30, 2018, 3:26:10 PM3/30/18
to SonoffUsers
So if you connect your 'R2 Sonoff Basic' with power OFF to a "Serial Monitor Program" with your serial cable connected...
Power ON Sonoff, baud 115200 or maybe 74880, do not put in flash mode.
Just turn on, do you see any output in the "Serial Monitor Program" at all ?
Can you even make a screenshot ?

Andy Maddick

unread,
Mar 30, 2018, 3:30:02 PM3/30/18
to SonoffUsers
Just to clarify, you should also specify the port too
esptool.py /dev/ttyAMA0 read_mac



Andy Maddick

unread,
Mar 30, 2018, 4:31:01 PM3/30/18
to SonoffUsers
Avoid the new post on Github, there are better ways than that, 
just get a USB to TTL UART adapter which supports 3.3V logic lines & has a 3.3V regulator on board..
Much easier & less messy

Andy Maddick

unread,
Mar 30, 2018, 6:26:29 PM3/30/18
to SonoffUsers
For example CH340G


xMad

unread,
Apr 3, 2018, 12:19:53 PM4/3/18
to SonoffUsers
HI,
I use this adapter
I use puTTy on W10 (connect on port given when I plug adapter : COM4 )

NOTHING on the console (try baud 115200 and 74880, swap TX, RX )
Note : My adapter is blinking (litle green light) when I strike key
Note :  No light on the sOnOff R2 even if I just put VCC and GND


Le samedi 31 mars 2018 00:26:29 UTC+2, Andy Maddick a écrit :
For example CH340G


xMad

unread,
Apr 3, 2018, 12:21:36 PM4/3/18
to SonoffUsers
And I have check voltage : 3.3v for all

Andy Maddick

unread,
Apr 4, 2018, 7:46:36 AM4/4/18
to SonoffUsers
I use this adapter

I use puTTy on W10 (connect on port given when I plug adapter : COM4 

That looks like a FTDI  chip adapter, I see no 3.3V regulator, only switchable TTL logic voltage 'jumper'.
I can not see the labels for the "Output Pins", if it has a 3.3V output pin (not TTL) then it may not be able to supply enough current.
I have used the 5V pin on FTDI adapter with no issues to supply power to the Sonoffs, with around 40 Sonoff basic units connected this way..

If you have Arduino Board which has 3.3V you could use that as a power supply, 
only connect RX, TX & GND from your adapter & 3.3V & GND from your other power source..

If you use 3.3V from adapter, after it is connected to Sonoff does the voltage drop.. Use a Multimeter ?

xMad

unread,
Apr 4, 2018, 12:11:32 PM4/4/18
to SonoffUsers
So

I use an external power supply : ywRobot (voltage could be 3.3V and 5 V)
I've connected RX, TX & GND from your adapter & 3.3V (or 5V)  & GND from your other power source..
Voltage are not dropping while sOnOff is powered on.
While not in flash mode :
Terminal is empty (use Win10 Terminal/1.9.3b from br@y++)
If I test adapter with it (connectionf TX and RX) it works.
I do the test on 3  sOnOff R2 V1
Of course i can't flash it !

Any ideas ?

Andy Maddick

unread,
Apr 4, 2018, 7:27:39 PM4/4/18
to SonoffUsers

xMad

unread,
Apr 5, 2018, 1:18:06 AM4/5/18
to SonoffUsers
It is connected
Just a perspective issue with the image
Again i've flash 2 "old " Basic sonoff (don't have access to them) and recently 2 TH16 with no issues.
My problem is with those new R2
Is there something else I can do ?
- No led blinking if I power sonoff (with no adpater) (TH16 was blinking)
- Nothing on serial (not in flash mode)

I can read some issues on github for R2.

Thanks



Le jeudi 5 avril 2018 01:27:39 UTC+2, Andy Maddick a écrit :

Andy Maddick

unread,
Apr 5, 2018, 9:15:33 AM4/5/18
to SonoffUsers
Is there something else I can do ?
So when you power the Sonoff with Main power, led blinks ?

xMad

unread,
Apr 5, 2018, 1:19:00 PM4/5/18
to SonoffUsers


Yes, it's fully operable with eWelink
Regarding your experience I've buy the same adapater as yours
But result is the same 
Test with 3.3 V (voltage checked wit multimeter)
(of course I try swapping TX RX)


CONNECT BAUD: 115200
============
....._____....._____....._____....._____....._____....._____....._____....._____....._____....._____[2018-04-05 19:08:47,424][ESP8266Loader_spi[1]][espDownloader.pyo][line:351][ERROR]: Chip sync error: Failed to connect to ESP8266: Timed out waiting for packet header
[2018-04-05 19:08:47,424][ESP8266Loader_spi[1]][espDownloader.pyo][line:439][ERROR]: ESP8266 Chip sync error esp_sync_blocking.

What else would I try ?

Andy Maddick

unread,
Apr 5, 2018, 1:26:06 PM4/5/18
to SonoffUsers
5 pins on header
Closest to long button, is power then - rx, tx, then GND then GPIO14
Does this new adapter if only used to supply power, do not enter flash mode, just as power source make green light come on ?

Next ?
First connect RX, TX & GND only - no power
Connect mains... Be an adult be careful...
Read Serial...... Putty ?

xMad

unread,
Apr 5, 2018, 3:56:28 PM4/5/18
to SonoffUsers
Coud you explain
“Does this new adapter if only used to supply power, do not enter flash mode, just as power source make green light come on ?”

Phil

unread,
Apr 5, 2018, 5:08:14 PM4/5/18
to SonoffUsers
Fwiw i also use the same usb programmer with the gold edge, mine is able to supply enough power to flash sonoff basic, rf,pow,th-x, 4ch-pro and other devices without additional power needed,

how many of these V2 devices do you have?  do they all exhibit the same behaviour?  sonoff-rfs ordered direct from itead within the last 3 months arrived and flashed ok??

The only other thing i can think of is trawling the web for pics of the soc with gpio0 etc clearly indicated and attempt to trace the relevant tracks back to the gpio pin header and push button to confirm its the same animal.

However there have been no changes to the itead wiki page https://www.itead.cc/wiki/Sonoff since the exciting release of the ip68 box..

Perhaps its a faulty module?  is the factoty flashing done post assembly via pogo pins and the gpio header or if perhaps at an earlier stage or thru a different interface then a tracking/component fault from the user header and soc may exhibit the behaviour your experiencing?   

ask the official itead support list? 

Andy Maddick

unread,
Apr 5, 2018, 7:41:48 PM4/5/18
to SonoffUsers
Using new adapter to supply power,
not entering flash mode, 
just as a power source 
Does green light come on ?”


On Friday, April 6, 2018 at 5:56:28 AM UTC+10, xMad wrote:
Coud you explain
“Does this new adapter if only used to supply power, do not enter flash mode, just as power source make green light come on ?”

New question, 
When using Mains AC power, (carefully) measure voltage between 
power VCC pin (first pin, closest to long push button) on Sonoff
GND pin (fourth pin) on programming header..
How much ?

xMad

unread,
Apr 6, 2018, 4:26:49 AM4/6/18
to SonoffUsers
I have 4 of those SonOff Basic R2 V1.0 2017-01-11
All have the same issue with tasmota flashing (can't enter flash mode) but are all fully fonctionnal with eWelink.
I can't find any specific pics for this new R2 ! 
Will try to ask to iTead...

Thanks

Phil

unread,
Apr 6, 2018, 10:36:28 AM4/6/18
to SonoffUsers
Please keep us up to date with any progress..  if it wasnt for the photos you posted of the device in question with sonoff clearly visible on the pcb i would suspect they were clones or copies ??  

AS its pulling gpio0 to gnd at startup that puts the device into flashing mode and you dont seem to be able to get the device into flashing mode...  its a fair bet that the problem may lie in that area so i would try to identify the gpio0 leg on the soc and ground it directly..

this pic in the wiki  indicates its usually an esp8266EX component employed.
(not gpio0 connected to in the pic btw..)
 If yours is the same here is the data sheet for that component that will tell you the leg gpio0 is connected to.

There are pics on the tasmota wiki of some devices like the B1 bulb? indicating the gpio0 leg of the smd soc component tho thats using a 8265 iirc,  have a hunt about and if soldering onto a tiny leg is a problem i would suggest trying a lump of blu-tak as a moveable wire holder ;) 

cant promise this will help/work, but it seems like the next thing to try ??

xMad

unread,
Apr 6, 2018, 12:07:23 PM4/6/18
to SonoffUsers
I have some undreadable data in putty (115200 or 74880, databits 8, stop bits 1, parity noneflow xon/xoff)

xMad

unread,
Apr 6, 2018, 12:11:02 PM4/6/18
to SonoffUsers

Input is 250 AC
Voltage is at 0.25 V DC

Andy Maddick

unread,
Apr 6, 2018, 5:08:21 PM4/6/18
to SonoffUsers
On the R2 picture you supplied there are changes in the power circuits...
I will measure the voltage on these pins and report back later, just woke...

have you tried to FLASH, while it is connected this way ?
Give it a go ;)

I have never connected serial output while running original sonoff firmware, so not sure if garble is expected..
and I do not have a Sonoff handy with original firmware to test..

Andy Maddick

unread,
Apr 6, 2018, 5:16:49 PM4/6/18
to SonoffUsers
XMAD
Can you confirm
The LED only glows while connected to mains...
The LED never glows while using the normal 'programming header pins' to supply power
0.25V seems like the main problem, they have changed the power circuit, I can see that in pictures you showed of the circuit board

Andy Maddick

unread,
Apr 6, 2018, 5:45:43 PM4/6/18
to SonoffUsers



On Saturday, April 7, 2018 at 2:11:02 AM UTC+10, xMad wrote:

Andy Maddick

unread,
Apr 6, 2018, 6:45:52 PM4/6/18
to SonoffUsers
So you can flash now ;)
This is the problem, without modifying the board, the first pin closest to the 'long button' is no longer able to supply power..
Choices are connect: 
  1. USB to TTL ------ to RX, TX & GND, do not connect power low voltage power, use AC mains
  2. or supply low voltage to board, will require soldering.. likely 5V zener diode on the board, or 3.3V to regulator..
I would love to see existing firmware

esptool.py.exe --port /dev/ttyAMA0 -b 230400 read_flash 0x0 0x100000 Original_Sonoff_Basic_R2_Firmware_1M_10002E5EEF.bin

This command will back-up / copy the Original Firmware

Andy Maddick

unread,
Apr 6, 2018, 6:51:51 PM4/6/18
to SonoffUsers

Original_Sonoff_Basic_R2_Firmware_1M_10002E5EEF.bin

xMad

unread,
Apr 7, 2018, 5:22:05 AM4/7/18
to SonoffUsers
Hi Andy
I confirm
LED only glows while connect to main power
LED never glows while connected to pin (3.0v or 5v)

Andy Maddick

unread,
Apr 7, 2018, 5:25:13 AM4/7/18
to SonoffUsers
Ready to flash ?

xMad

unread,
Apr 7, 2018, 5:31:19 AM4/7/18
to SonoffUsers
Andy,
My 2 others have different labels.


Le samedi 7 avril 2018 00:51:51 UTC+2, Andy Maddick a écrit :

will export you the firmware this we

Xavier

 

Original_Sonoff_Basic_R2_Firmware_1M_10002E5EEF.bin

xMad

unread,
Apr 7, 2018, 7:04:27 AM4/7/18
to SonoffUsers
Ready but not flash

RX, TX & GND (of RasPi), do not connect power low voltage power, use AC mains

Put Main power while holding down button (no LED glowing on sOnOff) (If I only put without holding button, sOnOff is online with LED glowing)
=>
pi@X_Pi:~/sonoff/Sonoff-Tasmota $ sudo esptool.py --port /dev/ttyAMA0 -b 230400 read_flash 0x0 0x100000 Original_Sonoff_Basic_R2_Firmware_1M_10002E5EEF.bin
esptool.py v2.3.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet ('\xe0')

Andy Maddick

unread,
Apr 7, 2018, 8:56:57 PM4/7/18
to SonoffUsers
Sounds great !
have you tried swap RX, TX <--> TX, RX ??

Andy Maddick

unread,
Apr 7, 2018, 8:57:55 PM4/7/18
to SonoffUsers
Or use windows and USB TTL ?
looks ready

Andy Maddick

unread,
Apr 8, 2018, 12:07:48 AM4/8/18
to SonoffUsers
Original_Sonoff_Basic_R2_Firmware_1M_10002E5EEF.bin
Original_Sonoff_Basic_R2_Firmware_1M_10002E2738.bin
Original_Sonoff_Basic_R2_Firmware_1M_10002E9BE1.bin

 yes, change to match each device's serial, the firmware only works on original device

Andy Maddick

unread,
Apr 8, 2018, 10:46:33 PM4/8/18
to SonoffUsers
Any luck Xavier ??

xMad

unread,
Apr 9, 2018, 1:37:21 AM4/9/18
to SonoffUsers
I have to build the Win10 environnement to flash
Currently I only flash with RaspPi / esptool.py
Note : I've try to swp RX/TX : Same results
Keep you inform

Andy Maddick

unread,
Apr 9, 2018, 4:51:39 AM4/9/18
to SonoffUsers
On Sonoff
pin 1 power (closest to long button)
pin 2 RX goes to TX on USB TTL device (Also GPIO 3)
pin 3 TX goes to RX on USB TTL device (Also GPIO 1)
pin 4 GND
pin 5 GPIO 14
This is absolutely correct, keep for reference ;)
Even try basic read in flash mode
like READ_MAC

esptool.py /dev/ttyAMA0 read_mac

Windows
esptool.py --port COM5 read_mac

End this ! Hurry up and flash already :)

Andy Maddick

unread,
Apr 9, 2018, 4:53:14 AM4/9/18
to SonoffUsers
COM5 as above, of course change to suit your device's USB port.

xMad

unread,
Apr 9, 2018, 11:04:36 AM4/9/18
to SonoffUsers
So
Main Power from sOnOff
Adapater
GND => Pin4
TX => Pin 2
RX=> Pin3
VCC not connected

Connect Adpater to sOnOff (COM5)
Hold button down while putting Main power on sOnOff (LED not blinking on sOnOff)
....


................
T:\sOnOff\esptoolPY>esptool.py.exe --port COM5 read_mac
esptool.py v2.3.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (b'\x01')
..............
T:\sOnOff\esptoolPY>esptool.py.exe --port COM5 read_flash 0x0 0x100000 Original_Sonoff_Basic_R2_Firmware_1M_10002E5EEF.bin
esptool.py v2.3.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (b'\x90')

Note tried with several --baud options : always same result

=> Looks like not entering in flash mode

xMad

unread,
Apr 9, 2018, 11:09:19 AM4/9/18
to SonoffUsers
Trace if it can help
Connecting...TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=b'\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: b'\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.008 Read 1 bytes: b'\xc0'
TRACE +0.001 Read 11 bytes: b'\xf9\xcez\xfc\x07\x07\x92>x\xfc\xfe'
TRACE +0.005 Read 1 bytes: b'\x90'
TRACE +0.000 Read 31 bytes: b'\x04\x02\x00\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x00\x00\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x00\x00\xc0\xc0\x01\x08'
TRACE +0.001 Full packet: b'\xf9\xcez\xfc\x07\x07\x92>x\xfc\xfe\x90\x04\x02\x00'
TRACE +0.002 Full packet: b'\x01\x08\x02\x00\x07\x07\x12 \x00\x00'
TRACE +0.010 Full packet: b'\x01\x08\x02\x00\x07\x07\x12 \x00\x00'
TRACE +0.010 Read 123 bytes: b'\x02\x00\x07\x07\x12$@!\xc0\xc0\xf1\xcf\xe5\xff\xfe\xf9\xef\xfa\xfe\xe7\xe7\xba\xeb\xe5\xef\xff\xfd\xef\xfb\xfc\xff\xc0\xc0\xc8\x00\xff\xc0\xff\xc0\xff\xf8\x02\x00\x07\x90 \x01\xfd\xc0\xc0\x01\x08\x02\x00\xff\xff\xfe \x01\xf5\xc0\xc0\x01h\x00\xe7\xff\x12?|A\xfd\x8c\xf3\xfe\xc7\x07\x12>\xfd\x85\xfe\xff\xf1\xce\xfa\xfe\x87\x07\x12\xf8\x04\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0'
TRACE +0.001 Full packet: b'\x01\x08\x02\x00\x07\x07\x12$@!'
TRACE +0.011 Full packet: b'\xf1\xcf\xe5\xff\xfe\xf9\xef\xfa\xfe\xe7\xe7\xba\xeb\xe5\xef\xff\xfd\xef\xfb\xfc\xff'
TRACE +0.000 Full packet: b'\xc8\x00\xff'
TRACE +0.001 Read invalid data: b'\x02\x00\x07\x07\x12$@!\xc0\xc0\xf1\xcf\xe5\xff\xfe\xf9\xef\xfa\xfe\xe7\xe7\xba\xeb\xe5\xef\xff\xfd\xef\xfb\xfc\xff\xc0\xc0\xc8\x00\xff\xc0\xff\xc0\xff\xf8\x02\x00\x07\x90 \x01\xfd\xc0\xc0\x01\x08\x02\x00\xff\xff\xfe \x01\xf5\xc0\xc0\x01h\x00\xe7\xff\x12?|A\xfd\x8c\xf3\xfe\xc7\x07\x12>\xfd\x85\xfe\xff\xf1\xce\xfa\xfe\x87\x07\x12\xf8\x04\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0'
TRACE +0.001 Remaining data in serial buffer: b'\xc0\x01\x08\x02\x00\x07\x07\x12"AE\xfe\xff\xde\x9f\xe6\xeb\xe5\xff\xf9\xcf\xfa\xff\xf7g\x9f\xbf\xfd\xe5\xff\xff\xe1\xf0\xc0\xff\xf8\xff\xff\xfc\xfe\xf0\xe0\xff\x1f\xfd\xc0\xf8\xf0\x90 \x01\xf7\xc0\xff\xe8\x03\xf8\xff\xff\xf2?\xf1\xe5\xff\xfe\xf9\x0f\x02\xf8\x07\x07\x1a\xbc\xfd\xe5\xff\xfe\xf1\x8e\xfa\xfe\xc7\xe7'
.TRACE +0.060 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=b'\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: b'\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.003 Read 20 bytes: b'\xf2\xfe\xe7\xc7\x9a\xbf\xf1\xe5\xfc\xc0\x01\x88\xf2\xfe\xe7\xe7\x13/\xe1\xf5'
TRACE +0.002 Read invalid data: b'\xf2\xfe\xe7\xc7\x9a\xbf\xf1\xe5\xfc\xc0\x01\x88\xf2\xfe\xe7\xe7\x13/\xe1\xf5'
TRACE +0.001 Remaining data in serial buffer: b':\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01'
.TRACE +0.062 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=b'\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: b'\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.002 Read 63 bytes: b'\x10\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x03\x88\xd0\xff\xff\xfd\x8e\xf3\xfc\xe7\xe7\x93?\xf9\xf9\xfe\xfd\xce\xfb\x07\xf7\xdb\xff'
TRACE +0.001 Read invalid data: b'\x10\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x02\x00\x07\x07\x12 \x01\x05\xc0\xc0\x01\x08\x03\x88\xd0\xff\xff\xfd\x8e\xf3\xfc\xe7\xe7\x93?\xf9\xf9\xfe\xfd\xce\xfb\x07\xf7\xdb\xff'
TRACE +0.000 Remaining data in serial buffer: b''
......

Andy Maddick

unread,
Apr 9, 2018, 6:01:29 PM4/9/18
to SonoffUsers
your device's USB port really is COM **5** , not com1, com2  etc?

Otherwise, I am not going to be online for a week..
I really thought 'power' / 'voltage' to first pin was only problem..
Looks like holding button down, device enters flash mode..
Have you tried a different circuit board this time ?
Starting to run out of ideas :(


You said you had garbage on serial output ?

xMad

unread,
Apr 10, 2018, 1:21:41 AM4/10/18
to SonoffUsers
Sure it's COM5.
I tried to flash with RasPi or Adapter on several sOnOff
It's looks like it's entering in something different that normal operation state since Green LED is not blinking.
But can't flash.

When i put esptool in --tracemode i have the above output. But can't understand it !

As it is serial what different --baut rates could I use ? Other parameters ?

Thanks for your time.
I will try this week to look at Phil solution (find another GPIO0)

Merci

Andy Maddick

unread,
Apr 14, 2018, 12:11:22 AM4/14/18
to SonoffUsers
Still no progress ?

Oxyandy

unread,
Apr 23, 2018, 6:35:31 PM4/23/18
to SonoffUsers
xMad you can not leave it hanging without a resolution..
Did you manage to flash ?
or
Have you stopped trying ?
Cheers
Andy

Mateusz Karbowski

unread,
Jan 23, 2019, 8:14:54 PM1/23/19
to SonoffUsers

Hello! My first post here and I am complete beginner. I hope that you will understand me bringing this topic up again. The problem is not solved. ;)

I have exactly the same device Sonoff RF R2 V1.0 with ESP8266 (Tasmota wiki on GitHub says "The R2 V1.0 version of the Sonoff RF uses an ESP8285" - not my case), the same problem, but a little bit more info.

When I am connecting to serial without button pressed, LED blinks - normal behaviour.
When I am connecting to serial with button pressed or K_P and GND shorted (procedure for Sonoff RF) LED is not blinking, and I can reach device with esptool:
~/Temp$ sudo esptool --port /dev/ttyUSB3 read_mac
esptool.py v2.1
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266
Enabling default SPI flash mode...
MAC: dc:4f:22:df:7b:23
Hard resetting...
But I can't perform read and write operations on flash:

~/Temp$ sudo esptool --port /dev/ttyUSB3 read_flash 0x00000 0x100000 sonoff-basic-stock.bin
esptool.py v2.1
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266
Enabling default SPI flash mode...

A fatal error occurred: ESP8266 ROM does not support function read_flash.
Any ideas?

Phil

unread,
Jan 24, 2019, 10:00:37 AM1/24/19
to SonoffUsers
Try nodemcuflasher??  though i would not hold my breath..  perhaps try holding the k-p gnd short a few seconds longer after startup?

I have flashed modules with esp8265 chips with tasmota (1 x bz01 21w led ceiling light, now discontinued.. and it died shortly after, due probably to my soldering to the chip legs) ..  and iirc some sv boards..

On Wednesday, 28 March 2018 14:34:57 UTC+1, xMad wrote:
Hi,
I can flash sOnOff TH16 on a Rasp Pi 3B with esptool.py  from arendst/Sonoff-Tasmota.
BUT
on a sOnOff Basic R2 V1.0 2017-10-11 I can't. Looks it don't enter in flash mode.

Do someone manage to flash on these ?

Thanks

George Ioakimedes

unread,
Jan 24, 2019, 11:27:06 AM1/24/19
to SonoffUsers
I actually keep GPIO0 grounded the whole time during flashing

Mateusz Karbowski

unread,
Jan 26, 2019, 2:56:19 PM1/26/19
to SonoffUsers
I have already tried to flash with button/K_P grounded constantly. Result is the same as with short hold.
I tried NodeMCU Flasher today. It detects chip model, but it doesn't show COM port on drop list. Same problem as with esptool i guess.

Norbert Maier

unread,
Mar 6, 2019, 10:40:43 AM3/6/19
to SonoffUsers
Hi!

I've just managed to flash the new board without soldering ... simply you need to press a second time the button leaving 2 sec pause between the two presses after connecting to USB .. it worked flawlessly.

yasmine lahrir

unread,
Jun 16, 2020, 1:30:18 PM6/16/20
to TasmotaUsers
hello, I'm new in the group and in the sonoff system, I falashe my sonoff on tasmota without saving the original firmware !!! now i want to flash it on the original firmware, is it possible to send me the original firmaware? thank you group

Laurentp

unread,
Jun 17, 2020, 6:30:59 AM6/17/20
to TasmotaUsers
Here it is :)

Laurent
sonoff-basic_R2_original.bin
Reply all
Reply to author
Forward
0 new messages