Sonoff PN25F08B: Same problem like PUYA

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
Micha_he
Normal user
Posts: 373
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Sonoff PN25F08B: Same problem like PUYA

#1 Post by Micha_he » 07 Feb 2018, 19:31

My Sonoff Basic/S20 arrived today. Both have a flash PN25F08B from XTX.

Flash the new ESPEasy V2.x on it, produce the same problem like the PUYA-flash.
Flashmode DOUT doesn't change anything...

ESPEasy (V1.x) R148 works fine (like on my PUYA-ESP-01)

Regards,
Micha

TD-er
Core team member
Posts: 9903
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: Sonoff PN25F08B: Same problem like PUYA

#2 Post by TD-er » 07 Feb 2018, 19:48

It seems these flash chips were causing issues about 7 months ago: viewtopic.php?t=3071
But flashing using Dout doesn't fix it, like you said?

Also when you select DOUT as profile in Arduino IDE, build it and then flash it?

There is a difference in flashing using the flash tool and how the firmware itself will use the flash.
I am not entirely sure how it is being stored in the firmware, so correct me if I'm wrong.
If I remember correctly, somewhere in the first 4 bytes of the firmware, the flash size, speed and IO-mode is being set.
And since the firmware is written starting at address 0, I would expect the firmware itself should contain some information on how the flash should be used by the firmware.
The pre-built firmware files are probably built using DIO and not DOUT.

Micha_he
Normal user
Posts: 373
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff PN25F08B: Same problem like PUYA

#3 Post by Micha_he » 07 Feb 2018, 20:40

You mean, setup DOUT here....
dout.jpg
does not work !?

Can I download somewhere a DOUT-compiled ESPEasy firmware ?
Until now, I have flashed only binary firmwarefiles. Otherwise, I'll have to install an environment for a test.
You do not have the required permissions to view the files attached to this post.

TD-er
Core team member
Posts: 9903
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: Sonoff PN25F08B: Same problem like PUYA

#4 Post by TD-er » 07 Feb 2018, 20:51

I have never used that programmer myself.
So I don't know if that programmer also does something to the firmware.

The only thing I know is that the internal functions, defined in the ESP8266 core libraries try to read some bits from the first 4 bytes of the flash and based on those bits decide how to interface to the flash.
Using those function, the flash information on the info page in ESPeasy is collected.

TD-er
Core team member
Posts: 9903
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: Sonoff PN25F08B: Same problem like PUYA

#5 Post by TD-er » 07 Feb 2018, 21:03

I was just looking into the code to do so.

I could try to add something like this to the firmware, to force the flash speed to DOUT:
https://github.com/arendst/Sonoff-Tasmo ... #L174-L194

Then it will permanently set the flash to DOUT mode, which is a little slower (in theory)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden

Re: Sonoff PN25F08B: Same problem like PUYA

#6 Post by grovkillen » 07 Feb 2018, 21:03

You can flash it with the ESP8285 version.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Micha_he
Normal user
Posts: 373
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff PN25F08B: Same problem like PUYA

#7 Post by Micha_he » 08 Feb 2018, 20:07

Yes, it works with the actual 8285-firmware

But only, when I flash the 8285-(DOUT)-firmware, with a flash-tool like 'NodeMCU ESP8266Flasher', which flash the firmware in DOUT-Mode.
The 'FlashESP8266.exe'-tool that include with ESPEasy doesn't work !

A additional test with my PUYA-ESP-01 unfortunately shows no improvement with this way/firmware :cry:

Thanks,...

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden

Re: Sonoff PN25F08B: Same problem like PUYA

#8 Post by grovkillen » 08 Feb 2018, 21:23

Micha_he wrote: 08 Feb 2018, 20:07 Yes, it works with the actual 8285-firmware

But only, when I flash the 8285-(DOUT)-firmware, with a flash-tool like 'NodeMCU ESP8266Flasher', which flash the firmware in DOUT-Mode.
The 'FlashESP8266.exe'-tool that include with ESPEasy doesn't work !

A additional test with my PUYA-ESP-01 unfortunately shows no improvement with this way/firmware :cry:

Thanks,...
My flash wrapper (link in my signature below) have an option to force DOUT. If I manage to get it a bit more stable with many different systems we might add it to the official release.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 9903
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: Sonoff PN25F08B: Same problem like PUYA

#9 Post by TD-er » 08 Feb 2018, 23:42

If you add "board_flash_mode = dout" to the section you wish to build in PlatformIO, you get a firmware version that is set to operate on DOUT mode.
Also for reading/writing the flash during operations.

For example:

Code: Select all

[env:normal_ESP8266_1024]
platform = espressif8266@1.5.0
board_flash_mode = dout
framework = arduino
board = esp12e
upload_speed=460800
build_flags = ${common.build_flags} -Wl,-Tesp8266.flash.1m128.ld
# upload_port = /dev/ttyUSB0
I just created a build to test: https://www.dropbox.com/s/5soy1jhoul991 ... T.rar?dl=0

In the info screen the flash speed should show DOUT.

Micha_he
Normal user
Posts: 373
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff PN25F08B: Same problem like PUYA

#10 Post by Micha_he » 09 Feb 2018, 07:31

TD-er wrote: 08 Feb 2018, 23:42 I just created a build to test: https://www.dropbox.com/s/5soy1jhoul991 ... T.rar?dl=0
Thanks for that test-image... But what is then the difference to the 8285-image from release-package ?
Is it better for my 8266 on the Sonoff Basic ?
TD-er wrote: 08 Feb 2018, 23:42 In the info screen the flash speed should show DOUT.
You're speaking in riddles. Which 'info screen' ? From Atom-PlatformIO ?
I'll take a look on PlatformIO on the weekend, when I've more time...

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden

Re: Sonoff PN25F08B: Same problem like PUYA

#11 Post by grovkillen » 09 Feb 2018, 07:57

Micha_he wrote: 09 Feb 2018, 07:31 You're speaking in riddles. Which 'info screen' ? From Atom-PlatformIO ?
I'll take a look on PlatformIO on the weekend, when I've more time...
No, info found under the tools tab.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Micha_he
Normal user
Posts: 373
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff PN25F08B: Same problem like PUYA

#12 Post by Micha_he » 09 Feb 2018, 08:24

grovkillen wrote: 09 Feb 2018, 07:57 No, info found under the tools tab.
Aha, you're mean on ESPEasy-Web-Interface... ;)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden

Re: Sonoff PN25F08B: Same problem like PUYA

#13 Post by grovkillen » 09 Feb 2018, 10:03

Micha_he wrote: 09 Feb 2018, 08:24
grovkillen wrote: 09 Feb 2018, 07:57 No, info found under the tools tab.
Aha, you're mean on ESPEasy-Web-Interface... ;)
Yes :P
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 9903
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: Sonoff PN25F08B: Same problem like PUYA

#14 Post by TD-er » 09 Feb 2018, 13:25

In ESPeasy web interface:
Tools => info

If I remember correctly, the flash information is located at the bottom of the page for the v2.0 branch.

Ah, should look better, there was a next page ;)

Micha_he
Normal user
Posts: 373
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff PN25F08B: Same problem like PUYA

#15 Post by Micha_he » 09 Feb 2018, 15:18

@TD-er:

Yes, your image works (tested with esptool.exe from commndline with option '-bm dout' !!) and displays "Flash IDE mode: DOUT" in the last line of Tools/Info :D

TD-er
Core team member
Posts: 9903
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: Sonoff PN25F08B: Same problem like PUYA

#16 Post by TD-er » 09 Feb 2018, 20:57

Micha_he wrote: 09 Feb 2018, 15:18 @TD-er:

Yes, your image works (tested with esptool.exe from commndline with option '-bm dout' !!) and displays "Flash IDE mode: DOUT" in the last line of Tools/Info :D
Nice to hear :)

I've made an issue for it: https://github.com/letscontrolit/ESPEasy/issues/831
And a pull request: https://github.com/letscontrolit/ESPEasy/pull/834

So next release (when the PR is merged) will have one pre-built image with "normal" + 1MB + DOUT

Who is online

Users browsing this forum: Anthropic Claude Bot [bot] and 14 guests