-
Notifications
You must be signed in to change notification settings - Fork 105
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
Device answer: error 404 #10
Comments
You should use the linker scripts provided by https://github.com/khcnz/Espressif2Arduino as well as using images built from that sketch, to also replace the bootloader. |
Here they are: Please delete the .txt extension from the end of the file names. |
Looks good to me - does it also happen with images built from the Espressif2Arduino sketch? |
Ok. I used the original Tasmota files. I will replace them and try again. |
So, I check the linker script in the Espressif2Arduino sketch, and both are the same that I used. That's not the problem. |
There's still the potential issue of your images being too big, that's why I asked explicitly about trying it with Espressif2Arduino builds. |
Ok, I built an image width Espressif2Arduino linker script and its size is the same as before. 479.312 bite. |
I think it is meant to build two Espressif2Arduino binaries (just compile from this sketch) with the respective linker scripts out of that project. You need to set URL_ROM_1 and 2 according to your needs. The resulting image size is in my build 259379 Bytes. Need to see this evening if they are flashing once I am close to my S20 again. |
This sounds far too much for a single Espressif2Arduino image. |
In this thread: https://github.com/arendst/Sonoff-Tasmota/issues/476 the images are almost same size like mine: What is wrong? |
What images are you talking about? |
In that thread I am also having problems so I wouldn't go by my image sizes. I will be trying Espressif2Arduino now to see if that sheds any light on our problem. |
I want to flash Tasmota fw with SonOTA. It isn't possible? I use sonoff skatch. I downloaded it from https://github.com/arendst/Sonoff-Tasmota |
People, please read the README! |
Well it's not working so I'd try the suggestion given to do it differently.. Trying to get it done now. |
Ok, I understand it. I didn't read it carefully, sorry! |
I've not made any real progress.. But I've just noticed something that might be important.. esptool is being used on .elf images.. I would swear (but am not certain) that I have been doing so on .bin images.. If I have, that could be the problem. EDIT: I take that back.. looks like I was using .elf images.. |
Change the Build output folder in the Airduino. Watch this: After that the elf files will be there in the folder. |
I've got the images:
I presume now I use Sonata as I did previously? Let's see how it goes. |
There is none?! Rom 1 is fetched and flashed by the original Sonoff FW.
|
You wanna know what? It works! This is a triumph! |
Congrats! Glad to hear that - happy about any contribution! |
I do have one question though.. Is building Espressif2Arduino.ino-0x01000.bin totally redundant? The original Sonoff image is always at that location and thus only Espressif2Arduino.ino-0x81000.bin (and a TASMOTA or similar image) is actually required? |
I'm not sure I get your question: The Sonoff original FW might either ask for, fetch and flash a user_1 or user_2 image - we can't control which one the Sonoff asks for. So we need both. |
I think I erroneously made an assumption or two. Thanks for the step-by-step as it will be helpful when I try to design a way to automate this. There is a disconnect between the direct flashing described in the Espressif2Arduino documentation and what SonOTA is trying to achieve that can be somewhat confusing. |
Ok, I flash the Espressif2Arduino fw.
And what's the next step? My device led lightning continuously and nothing is happening. |
Ok. I'm stupid. It's WORKING! Thank you @mirko |
I get that the ideal is a transparent setup that can be audited for security, but the truth is, the default firmware installed on the Sonoffs is sketchy enough security-wise (especially since it phones home) that a precompiled alternative is probably safer for most of us, and certainly more convenient. |
OK. If anyone involved wants me to take this down I will do so immediately. Here's is the simplest way to get the latest version of Tasmota onto your sonoff.
Done. EDIT: Updated zip file to include all necessary files! |
Thanks a lot! I tried it with a new TH10, and am somehow stuck.
any idea?
|
Your IP address can't be "." Try this from a terminal:
For me the address is 192.168.1.41 That's the machine I am running this from and the IP address the Sonoff needs to download the firmware from. |
thanks! That got me one step further, now there is an error about the cert not being there. I can create it naturally, but was that not the point of the zip file, to have everything included? How about the flash binaries? |
Umm.. isn't all that in there? Sec. Sigh.. Rookie mistake 1: Don't read the zip man page. Rookie mistake 2: Don't check the file you created. I've updated the zip file in my original post. |
thanks, now I get it to here:
with
|
Has the device connected to your wifi access point? That's a prerequisite for it to continue to the next step. EDIT: Also.. Is this a Sonoff Basic? |
I dont really know. In point 7) you say to connect to indebuurt1, which I did with the PC, but nmap does not show me any device on port 80 on the network. Or should I be connecting to my real wifi, "cputoasters"? |
Can you not set your wifi access point to have a secondary SSID on the same subnet? That would be the easiest solution. |
I guess there is no difference if I just have my phone do a hotspot, no? I cannot change the main wifi easily and using guest access (to have a different SSID) would give me another subnet anyway. |
btw, when switching to the real wifi instead of indebuur1, I can see the device ip and an open port 80, but connecting with a browser does not do anything. Also, it does not seem to want to connect to the sonota web server (with the address of the real wifi of the PC as the serve_host)
|
No, your machine must be accessible to the sonoff from the network it joins or it will fail. Delete your default wifi network so that it doesn't auto join that (you can put it back later) and set indebuur1 as your default so you go straight back to it after provisioning. |
You know I am now so confused that I'm not 100% sure I am telling you the correct information :/ OK.. I think it just came back to me.. This is why I wanted to create a docker where its gets built using user provided files.. Otherwise the only easy way is for you to tell me your wifi SSID/password and for me to build a tasdmota firmware. Currently it's getting the Tasmota image from http://sonoff.maddox.co.uk/tasmota/sonoff.ino.bin The best I could do, would be create a firmware that connects to somewhere on your LAN. You'd have to tell me where, then I would have to rebuild the two firmware images. |
Oh, and if you create and join the indebuur1 wifi network you need to use the SSID/password for that and the ip that you get assigned from that network when running sonota.py. |
I think the maddox image is fine, it should use the config params that were set with the first POST call. But somehow the device is not calling back to the web server to get anything. What did you compile into the binaries as URL_ROM_2? |
btw, its a TH10, but I think its the same tasmota image. |
Firstly, like I said at the very beginning and a few times since: this this is only known to work with the Sonoff Basic and DOES NOT work with the Sonoff Pow. If anything the Sonoff TH10 is more like the Pow than the Basic. And secondly, the Maddox image is the same as the one provided in the Tasmota Github, just always the latest version. To my understanding both the images I have provided and the Maddox image must be available ON THE SAME NETWORK as the Sonoff joins and AT THE SAME TIME. Otherwise it WILL NOT WORK. The images were compiled by following the Espressif2Arduino and SonOTA instructions. |
OK, thanks for the information. I tried compiling myself just to have the "custom" URL_ROM_2 to point to my PC ip address and now have a different problem that I dont think is related to the sonota script. Thank you for your help. I will for now wait for new developments and try again later. |
@mihalski , I followed you method on the basic and this is the output: 13066226-macair:sonota Barend$ python3 sonota.py --wifi-ssid indebuurt1 --wifi-password VnsqrtnrsddbrN 10.23.42.5
|
I would expect that it is now trying to join indebuurt1 with the password VnsqrtnrsddbrN. I'm curious. How is it that the ip for the host you were running on was 10.23.42.5 and the URL's were http://192.168.8.81:8080/ota/Espressif2Arduino.ino-0x01000.bin and http://192.168.8.81:8080/ota/Espressif2Arduino.ino-0x81000.bin? Doesn't seem to add up. Here's my run:
My wifi network has multiple SSID's so I can access it via the default as well as my own SSID/pass. Another thing that might be worth noting is that my Sonoff's Basics were not configured AT ALL. Never connected to them with the mobile app. Straight out of the box. I've done 2 of them and still have 2 unconfigured for future testing if I ever figure out how to build a docker container that works. |
@mihalski thank you for the reply, my network also has multiple SSID's setup, I made one for indebuurt1 as to follow your instructions. As for the 10.23.42.5 that's on me as for I used the old command from the original post and did not edit the IP but the device still seems to have made the connection and pulled the OTA as the IP was hard coded into the script. Turned them on again this morning and they just keep on flashing fast like they where in pairing mode but no SSID from them and neither do they connect to indebuurt1. I'm a little bit stumped at this stage, just a note my dives where connected to my normal SSID before this and was configured with the standard app. Only one I have left now is a DUEL but that's also been configured using the OEM app, will see if I can get hold of another few basics and try them without pr-configuring them. But would still like to get these two going that are now just rapidly flashing green |
I finally got a computer and extra AP setup to try this out and unfortunately I had the same result as Spokkie. I was trying to flash an S20 (the itead with the outlet builtin), and everything looked good from the script, but the result is that the S20 flashes green quickly and does not connect to the network. Pressing the button does nothing. Unfortunately the terminal output disappeared when I went to dinner, so I can't post it here, but everything looked pretty much like Spokkie's. Going to try and reset it by FTDI now. Bummed, because this is pretty cool. I also have two Touches that I am holding off doing, so if anyone gets this script working on a Touch, please document it--it looks more complicated to physically flash it, so I definitely want an OTA solution to do it if possible. Thanks for all your efforts. |
I fully expect this script to at best not work and at work brick anything that is not a Sonoff Basic. Of course it SHOULDN'T be possible to brick the esp8266 but I have no experience recovering them from a bad flash. It would be necessary to do so via an FTDI and if that wasn't working from the outset then there is more to it than following the old FTDI flashing instructions to begin with. |
I think I have found an issue with where E2A retrieves the wifi credentials from. Seems to be some difference when using SONOTA and when using the app. I was previously using a device for testing that had used the app at one point but i just got a fresh box of goodies that exhibits similar behaviour. |
Definitely not possible to brick them - you can always flash them. Until this is out of BETA would suggest however making sure you do know how to solder :) |
I ended up flashing my S20s with FTDI. The one that had failed OTA initially did not flash, but I just kept trying, and eventually something reset--don't ask me what, I have no idea. But persistence paid off. Another S20 in my pile wasn't so lucky. It flashed and grabs a DHCP lease on 3.3v, but gets no power when plugged into AC. Took me a while to figure out what was happening. Quality control on these units may not be so great, so that may be confusing some of us who are trying to follow along at home when we run into unrelated problems. That said, I've been running four of these for several months without a hitch, and you can't beat the price. It'd just be nice if they had MQTT functionality out of the box.... Good luck all, and thanks. I learn a little more with every try. |
I spent a lot of time trying to flash my sonoff with ftdi. I think so have device which is difficult to flash this way. There is some topic about problem with new devices. So tried flash my device ota.
|
Hi!
First: Sorry for my english ;)
I create a user1 and a user2 image from source eagle.flash.1m0.ld and copy them to the folder static/.
After that I run the script. It is what I see:
So, the question is: Is this correct to use the eagle.flash.1m0.ld as the source of user1 and user2 image or should I use the eagle.flash.1m64.ld file instead?
I see a similar post in this thread: https://github.com/arendst/Sonoff-Tasmota/issues/476
The text was updated successfully, but these errors were encountered: