mirko / SonOTA

Flashing Itead Sonoff devices with custom firmware via original OTA mechanism
GNU General Public License v2.0
719 stars 104 forks source link

Stuck ;( #91

Open tukestolo1 opened 6 years ago

tukestolo1 commented 6 years ago

Hello friends, I am stuck in this fase I don't know whats happen. I will describe the steps I have done.

1 - I have run sonota.py 2 - I put the only Ip that appear on console, them I put my wifi ssid and password of my hotspot that I created on my phone. 3 - I put the rf on ap mode and connect to it ... 4 - he do the things and automatic disconnect from the wifi. 5 - i connect again to my hotspot 6 - Always stuck on this step....

The Sonoff don't connect to my hotspot and I don't know why :/

Please help me ...

2018-01-04 23:30:34,982: INFO: IMPORTANT! 2018-01-04 23:30:34,982: INFO: AFTER the first download is COMPLETE, with in a minute or so you should connect to the new SSID "FinalStage" to finish the process. 2018-01-04 23:30:34,983: INFO: ONLY disconnect when the new "FinalStage" SSID is visible as an available WiFi network. 2018-01-04 23:30:34,983: INFO: This server should automatically be allocated the IP address: 192.168.4.2. 2018-01-04 23:30:34,983: INFO: If you have successfully connected to "FinalStage" and this is not the IP Address you were allocated, please ensure no other device has connected, and reboot your Sonoff. 2018-01-04 23:31:35,366: INFO: IMPORTANT! 2018-01-04 23:31:35,366: INFO: AFTER the first download is COMPLETE, with in a minute or so you should connect to the new SSID "FinalStage" to finish the process. 2018-01-04 23:31:35,366: INFO: ONLY disconnect when the new "FinalStage" SSID is visible as an available WiFi network. 2018-01-04 23:31:35,366: INFO: This server should automatically be allocated the IP address: 192.168.4.2. 2018-01-04 23:31:35,366: INFO: If you have successfully connected to "FinalStage" and this is not the IP Address you were allocated, please ensure no other device has connected, and reboot your Sonoff. 2018-01-04 23:32:35,762: INFO: IMPORTANT! 2018-01-04 23:32:35,762: INFO: AFTER the first download is COMPLETE, with in a minute or so you should connect to the new SSID "FinalStage" to finish the process. 2018-01-04 23:32:35,762: INFO: ONLY disconnect when the new "FinalStage" SSID is visible as an available WiFi network. 2018-01-04 23:32:35,762: INFO: This server should automatically be allocated the IP address: 192.168.4.2. 2018-01-04 23:32:35,762: INFO: If you have successfully connected to "FinalStage" and this is not the IP Address you were allocated, please ensure no other device has connected, and reboot your Sonoff.

sillyfrog commented 6 years ago

Can you please attach the full log file - it will be saved into the sonota folder after each run, it's earlier in the process that may help me.

Also be aware of the issue if it's running firmware v1.6, they have implemented certificate pinning so this process will no longer work if you have update :( See #58 for more details.

bachya commented 6 years ago

@sillyfrog Hopping around a few different issues, but would love your thoughts. I'm in a similar position: attempted to use SonOTA, got stuck at "Final Stage", and figured I had to go down the serial route (detailed here). That said, I'm having a heck of a time getting the manual flashing to work – does anything special have to be done, knowing that "Final Stage" occurred and something was transferred to the device?

For reference, my log file:

2018-04-02 21:53:01,588: DEBUG: Current IPs: ['192.168.1.109']
2018-04-02 21:53:09,766: INFO: Using the following configuration:
2018-04-02 21:53:09,766: INFO:  Server IP Address: 192.168.1.109
2018-04-02 21:53:09,767: INFO:  WiFi SSID: *****************
2018-04-02 21:53:09,767: INFO:  WiFi Password: *************************
2018-04-02 21:53:09,767: INFO: Platform: darwin
2018-04-02 21:53:09,779: INFO: ** Now connect via WiFi to your Sonoff device.
2018-04-02 21:53:09,779: INFO: ** Please change into the ITEAD WiFi network (ITEAD-100001XXXX). The default password is 12345678.
2018-04-02 21:53:09,779: INFO: To reset the Sonoff to defaults, press the button for 7 seconds and the light will start flashing rapidly.
2018-04-02 21:53:09,780: INFO: ** This application should be kept running and will wait until connected to the Sonoff...
2018-04-02 21:53:21,864: DEBUG: Current IPs: ['192.168.4.2']
2018-04-02 21:53:21,865: INFO: Appear to have connected to the final stage IP, moving to next stage.
2018-04-02 21:53:21,865: INFO: Starting stage2...
2018-04-02 21:53:21,869: INFO: ** The IP address of <serve_host> (192.168.1.109) is not assigned to any interface on this machine.
2018-04-02 21:53:21,869: INFO: ** Please change WiFi network to Phil? and make sure 192.168.1.109 is being assigned to your WiFi interface.
2018-04-02 21:53:21,869: INFO: ** This application should be kept running and will wait until connected to the WiFi...
2018-04-02 21:53:35,924: DEBUG: Current IPs: ['192.168.1.109']
2018-04-02 21:53:35,924: INFO: ~~ Starting web server (HTTP port: 8080, HTTPS port 8443)
2018-04-02 21:53:35,926: DEBUG: Using selector: KqueueSelector
2018-04-02 21:53:35,928: INFO: ~~ Waiting for device to connect
2018-04-02 21:53:35,931: INFO: *** IMPORTANT! ***
2018-04-02 21:53:35,931: INFO: ** AFTER the first download is COMPLETE, with in a minute or so you should connect to the new SSID "FinalStage" to finish the process.
2018-04-02 21:53:35,931: INFO: ** ONLY disconnect when the new "FinalStage" SSID is visible as an available WiFi network.
2018-04-02 21:53:35,931: INFO: This server should automatically be allocated the IP address: 192.168.4.2.
2018-04-02 21:53:35,931: INFO: If you have successfully connected to "FinalStage" and this is not the IP Address you were allocated, please ensure no other device has connected, and reboot your Sonoff.
2018-04-02 21:53:51,999: DEBUG: Current IPs: ['192.168.4.2']
2018-04-02 21:53:52,003: INFO: The "FinalStage" SSID will disappear when the device has been fully flashed and image_arduino.bin has been installed.
2018-04-02 21:53:52,003: INFO: If there is no "Sending file: /ota/image_arduino.bin" log entry, ensure all firewalls have been COMPLETELY disabled on your system.
2018-04-02 21:54:52,278: INFO: The "FinalStage" SSID will disappear when the device has been fully flashed and image_arduino.bin has been installed.
2018-04-02 21:54:52,279: INFO: If there is no "Sending file: /ota/image_arduino.bin" log entry, ensure all firewalls have been COMPLETELY disabled on your system.
2018-04-02 21:54:59,122: INFO: Quitting.
sillyfrog commented 6 years ago

Do you know what firmware version you are using? See the wiki as with the latest firmware from ITEAD it's not possible to using SonOTA any more :(