Recently I purchased DIY weather station on Amazon and after putting it together I found out that it shows time in China timezone, sale goes for weather (I'm based in London). Since couple of days I've been trying to figure out how to read the code from SPI flash so that I can edit the location to fix the time and weather information.
Can someone please help me with some resources/instructions on how to use Arduino IDE and Arduino UNO to read and modify existing program on the ESP01S, time is displayed on small OLED, its very basic setup, I just need to figure out how to modify existing code.
Contact your supplier and request either an exchange for the correct unit or your money back. Also check the ad you purchased it from to see if it indicates this could happen.
I've done all of the above, I've contacted the supplier and requested a refund, although I would really love to get to the bottom of this, I feel like it will be a one-liner change in code to get the correct location and weather. I've connected the ESP01s to both RX and TX pins but when trying to use AT commands with Arduino IDE I don't get any response.
Well no i guess the ESP has dedicated firmware on it.
Although that may be possible, the result would be assembler code.
That will be quite a search within all that code.
If you have the source code this may be a valid option, but actually writing your own code is probably the only way since you don't have the source code, nor is it for sure that the program that is on there now was created with the Arduino's esp-core.
So the best approach i recon is to find out what type of Oled it is and how is it connected, and then write you own program, and that you can upload using the Arduino IDE.
I use a NEO6-M. GPS, that gives the time in GMT. I just add the difference, 1 or 2 hours depending on winter time or summer time.
Can't You do the same, add or subtract the difference?
This is the best answer I've got here, thank you for taking your time to answer all my questions.
I agree finding a line of code in assembly code can be a mission, I agree that placing new code on the ESP01S seems to be the best option to go forward from here.
Lastly: do you know how I would be able to read the assembly code?
I can, although that's not why I've posted the question. I wanted to know if it's feasible to read code of the flash but as it turns out it will be an overkill in contrast to just adding my own code.
The weather is pulled in by weather api, unfortunately this api does not support different countries, only China cities, I also have difficulties with reading in Chinese so need to Google translate everything which may be error prone. Initially I’ve tried to manipulate the data passed into the ESP01S but couldn’t find a way.
Jheeze, I like these odds, but sounds like it can be a mission, I will try to write my own code and push it onto esp maybe that will help.
I don’t have much experience with it, I would say none, I’m a software engineer so I’m more into coding rather than wiring but everything is to be learned so.
Well yes you are qualified then. The main thing is to find which oled is being used and how it is connected, then writing a simple program to connect to a network and retrieve the information you want and display it. It is a bit of a job, and once you start uploading anything new onto the ESP-01, whatever was on there will be erased.
A, shit, assembler. Do You have the source code? Disassembling is likely not 100% safe, if doable at all. Never studied assembler for controllers like this.
Thats the problem, and thats why I've raised this question. I didn't want to lose the program that is currently on the ESP01s that was included within the DIY kit, if I flash new program on it, it will erase the previous one, therefore I wanted to figure out how to read the program, given all the answers here, I've ordered 3 new ESP01s components, will do some coding on my own and swap out the ESPO01s from kit with the new one with updated program.
After figuring out how to code onto ESP01s and how to adapt to the PCB from Chinese kit, I've managed to install weather station program onto it and it actually worked. Once again, thank you trying to help!