Failed to mount FS - sonoff bridge loses MQTT info - keeps wifi creds - esptool


#1

I flashed 0.8 with esptool on a sonoff bridge R2 V1.0

It goes in STA mode, I can connect, configure my Wifi settings and MQTT server settings.
Then it loses the MQTT info but still has the wifi creds.

This is an error I get:
Exception (0):
epc1=0x40243250 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0�␔�a��m�M�em�qEa��U�aEa��␁��␅␀]ii��>����mounting FS…
failed to mount FS

Seems there’s a problem with accessing parts of the stored config.

Here’s what I did:

root@hassbian:/home/pi# esptool.py --port /dev/ttyAMA0 erase_flash
esptool.py v2.5.1
Serial port /dev/ttyAMA0
Connecting…_____
Detecting chip type… ESP8266
Chip is ESP8285
Features: WiFi, Embedded Flash
MAC: 60:01:94:a3:9d:0d
Uploading stub…
Running stub…
Stub running…
Erasing flash (this may take a while)…
Chip erase completed successfully in 3.0s
Hard resetting via RTS pin…
root@hassbian:/home/pi# esptool.py --port /dev/ttyAMA0 write_flash 0x00000 ./SONOFF_RFBRIDGE_OpenMQTTGateway.ino.bin
esptool.py v2.5.1
Serial port /dev/ttyAMA0
Connecting…
Detecting chip type… ESP8266
Chip is ESP8285
Features: WiFi, Embedded Flash
MAC: 60:01:94:a3:9d:0d
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Auto-detected Flash size: 1MB
Compressed 384464 bytes to 271364…
Wrote 384464 bytes (271364 compressed) at 0x00000000 in 26.8 seconds (effective 115.0 kbit/s)…
Hash of data verified.

Leaving…
Hard resetting via RTS pin…
root@hassbian:/home/pi# miniterm.py /dev/ttyAMA0 19200 -e
— Miniterm on /dev/ttyAMA0 19200,8,N,1 —
— Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
␔�aŅ�m�L�em�qEa��U�aEa��␁�Mmounting FS…
failed to mount FS
*WM: Adding parameter
*WM: server
*WM: Adding parameter
*WM: port
*WM: Adding parameter
*WM: user
*WM: Adding parameter
*WM: pass

*WM:
*WM: AutoConnect
␔�a�Qz��"@�ai�&Aa��Q�aEa��␁��␔�a�Q␌�a�M�aa�qE�a��U�aEa��␅��mounting FS…
failed to mount FS
*WM: Adding parameter
*WM: server
*WM: Adding parameter
*WM: port
*WM: Adding parameter
*WM: user
*WM: Adding parameter
*WM: pass
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client…
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 0

Exception (0):
epc1=0x40243250 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0�␔�a��m�M�em�qEa��U�aEa��␁��␅␀]ii��>����mounting FS…
failed to mount FS
*WM: Adding parameter
*WM: server
*WM: Adding parameter
*WM: port
*WM: Adding parameter
*WM: user
*WM: Adding parameter
*WM: pass
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client…
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 0
*WM: SET AP STA
*WM:
*WM:
*WM: Configuring access point…
*WM: OpenMQTTGateway
*WM: your_password
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Info
*WM: Sent info page
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Scan done


Then I go and connect via wifi and configure it.

Then it says it saves the info. But then it lost the info.

Can give more cleaned info if required.

Will try to flash 0.7 and see if that’s the same.

For this:
Detecting chip type… ESP8266
Chip is ESP8285
I’m a n00b so don’t know a lot about flashing. Do I need to specify that it’s ESP8285 and not ESP8266?

I flashed the latest v081, same issue.
I couldn’t find a sonoffbridge file for 070 and I need to look into compiling my own with fixed values which might work but will give issues modifying any config I presume.

PS: didn’t see until now that I shouldn’t have create an issue on github, you can close it there and continue here. Sorry for the trouble.
Thanks!


#2

Hello,

If you can first to clean the ESP memory by doing an upload with “Erase flash” -> “All flash contents” maybe it could help.
If it is not working try to uncomment manual setup line and enter your parameters into user_config.h


#3

Hi,

this is what I did to start with…

How do I compile on a rasp?
That’s my primary way of flashing… I’d be happy to recompile debug but there’s no Makefile.

Thanks!
Beemster


#4

Hi,

you have to use the arduino ide to build OMG, download the ide, download OMG code.
Move your the content of lib/ to your sketchbook folder /libraries.
open OpenMQTTGateway.ino and launch upload following your board.