Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when flashing ROM3 #5

Open
StSimmons opened this issue Jul 11, 2017 · 8 comments
Open

Issues when flashing ROM3 #5

StSimmons opened this issue Jul 11, 2017 · 8 comments
Assignees
Labels

Comments

@StSimmons
Copy link

As raised in mirko/SonOTA#11

I think i know what may be wrong - i was testing a slightly different configuration and noticed that sometimes the buffer downloading the new images doesn't fill up - and when it doesn't fill up in multiples of 4 bytes bad things happen (the flash doesn't write correctly). I have a fix in the works but for now you will have to flash it with serial cable sorry.
@khcnz
Copy link
Owner

khcnz commented Jul 11, 2017

Should be fixed..

@khcnz khcnz closed this as completed Jul 11, 2017
@StSimmons
Copy link
Author

Some interesting findings after I tried to flash a new device:

  • The new device got the E2A firmware as expected
  • It attempted to download the new firmware (not 100% sure if it completed, I did see an error on the host, but python didn't tell me what the error was - I suspect timeout)
  • The device is now just flashing (unlike the previous version where it just fails to boot)
  • It fails to connect to my network.

Is it possible that the new version somehow loses the wifi credentials?

@khcnz
Copy link
Owner

khcnz commented Jul 11, 2017

Are you sure it didn't actually flash Tasmota? The wifi credentials don't carry over to tasmota. If you push the button does it turn the relay on and off?

@StSimmons
Copy link
Author

Pressing the button does nothing. No relay firing, nor any other press combo triggering other tasmota functionality.

@khcnz khcnz reopened this Jul 12, 2017
@khcnz
Copy link
Owner

khcnz commented Jul 12, 2017

If it's still flashing then probably still running e2a. I didn't make any changes that specifically effect the wifi credentials - however whereas previously a failed flash would have corrupted the bootloader (and prevented booting) now the bootloader is written last only once the entire rest of new rom is flashed in place. Which E2A image did it download last (before trying the tasmota one)?

@khcnz
Copy link
Owner

khcnz commented Jul 12, 2017

I read wifi creds from 0x79000 -> 0x79066.

However when flashing to rom slot 1 first it erases/wipes 0x01000->0x80000 - so yes if it fails wifi creds will be gone.. I'll think about how to solve this (store to rtc? store at end of flash?)- i'd also like the wifi creds to migrate over to tasmota.

@StSimmons
Copy link
Author

It didn’t download any - I installed the E2A user2 (0x08100) image first using SonOTA. E2A then successfully booted and grabbed the Tasmota image.

Note: these are all manual builds for the Sonoff Touch. E2A was built off of HEAD for Sonoff Touch, and I build Tasmota 5.x.x with the No SPIFFS option (as they suggest for v5 images)

One thing to note - it did try to grab the 8266 image - which I assume means that it was trying to flash a Touch in QIO. I did think it should use DOUT, no?

@khcnz
Copy link
Owner

khcnz commented Jul 12, 2017

DIO normally (but I think DOUT also works?). If its flashing (but its not running tasmota) then I would think it must still be E2A. I'd wager its as per above, I wiped the rom including the wifi creds. It should try 3 times to install - if all three times fail it will reboot (and therefore no wifi creds anymore..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants