Page 1 of 1

Sonoff PN25F08B: Same problem like PUYA

Posted: 07 Feb 2018, 19:31
by Micha_he
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

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 07 Feb 2018, 19:48
by TD-er
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.

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 07 Feb 2018, 20:40
by Micha_he
You mean, setup DOUT here....
dout.jpg
dout.jpg (29.21 KiB) Viewed 14236 times
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.

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 07 Feb 2018, 20:51
by TD-er
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.

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 07 Feb 2018, 21:03
by TD-er
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)

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 07 Feb 2018, 21:03
by grovkillen
You can flash it with the ESP8285 version.

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 08 Feb 2018, 20:07
by Micha_he
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,...

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 08 Feb 2018, 21:23
by grovkillen
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.

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 08 Feb 2018, 23:42
by TD-er
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.

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 09 Feb 2018, 07:31
by Micha_he
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...

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 09 Feb 2018, 07:57
by grovkillen
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.

Re: Sonoff PN25F08B: Same problem like PUYA

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

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 09 Feb 2018, 10:03
by grovkillen
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

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 09 Feb 2018, 13:25
by TD-er
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 ;)

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 09 Feb 2018, 15:18
by Micha_he
@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

Re: Sonoff PN25F08B: Same problem like PUYA

Posted: 09 Feb 2018, 20:57
by TD-er
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