Wemos D1 flash issue: No Spot Values

Discussion about various user interfaces such as web interface, displays and apps
Post Reply
lbblue
Posts: 8
Joined: Wed Oct 13, 2021 4:47 pm
Has thanked: 2 times

Wemos D1 flash issue: No Spot Values

Post by lbblue »

Hi all,

I have recently been working on flashing the web interface to a ESP8266 Wemos D1 mini clone.
The installation runs smoothly and connection is stable into the web interface.
I have also been able to change the wifi settings which I was unable to do with the Olimex.
I followed the instructions from the following topic:
viewtopic.php?t=8

I am currently having two issues halting progress on my project that I need help with:
1. I am receiving "SWD error" when attempting to update the bootloader.
2. I am not seeing any spot values after loading in parameters downloaded form the database.

Is there any information to solve this problem? I have looked in the forum and not been able to find anything.
I will be able to add screenshots over the weekend. If there are any questions I will try to answer as best I can.
Further information on my project:

Prius Gen 2 through hole board and inverter
Outlander rear motor
Hyundai 1.2KWh batter pack (This is subject to change / further work)

Thanks,

PM
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Wemos D1 flash issue: No Spot Values

Post by MattsAwesomeStuff »

A through-hole board? Wow, I think that makes 3 of us. Didn't know anyone was still 4 years behind the times.

I'd take and post screenshots of exactly what things are doing and saying.

Part of the trouble of troubleshooting is to make sure both sides of the conversation understand what the other is saying. Someone might ask "Did you do X?" and you can say "Yes I did X", and the conversation moves on. But maybe the whole point is that what you thought "X" was, is different than what they know "X" is.

That's how my connection issues eventually got discovered. Me being absolutely idiotproof about what was on my screen and not trusting my words. Yes, here is the message that says it was flashed successfully. And on the screen above, someone else noticed "Wait, that part is right, but where's the bootloader?" And I discovered the bootloader is a different file, on a different project github, not mentioned anywhere on the actual inverter github.

So, yeah, that'd be my first suggestion, screenshots of exactly what you're looking at.
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Wemos D1 flash issue: No Spot Values

Post by johu »

lbblue wrote: Fri Mar 15, 2024 2:03 pm 1. I am receiving "SWD error" when attempting to update the bootloader.
The SWD stuff never really worked (for me) plus you need some additional wiring to have a chance. Program the STM32 with a separate ST Link adapter
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
lbblue
Posts: 8
Joined: Wed Oct 13, 2021 4:47 pm
Has thanked: 2 times

Re: Wemos D1 flash issue: No Spot Values

Post by lbblue »

MattsAwesomeStuff wrote: Fri Mar 15, 2024 11:34 pm A through-hole board? Wow, I think that makes 3 of us. Didn't know anyone was still 4 years behind the times.

I'd take and post screenshots of exactly what things are doing and saying.

Part of the trouble of troubleshooting is to make sure both sides of the conversation understand what the other is saying. Someone might ask "Did you do X?" and you can say "Yes I did X", and the conversation moves on. But maybe the whole point is that what you thought "X" was, is different than what they know "X" is.

That's how my connection issues eventually got discovered. Me being absolutely idiotproof about what was on my screen and not trusting my words. Yes, here is the message that says it was flashed successfully. And on the screen above, someone else noticed "Wait, that part is right, but where's the bootloader?" And I discovered the bootloader is a different file, on a different project github, not mentioned anywhere on the actual inverter github.

So, yeah, that'd be my first suggestion, screenshots of exactly what you're looking at.

Thanks for the reply.
I'll Show and tell exactly what I have done and what I'm seeing when connected to the module.

In addition to the topic linked previously, I also followed the Github linked here:
https://github.com/jsphuebner/esp8266-w ... ree/master

1. We uploaded the FSBrowser sketch for the web interface.

Image


2. We Then installed the web interface using the sketch data upload tool.
(FYI this tool is not available on the newer Arduino IDE. We had a problem where this tool was not available. rolling back to version 1.8.19 resolved this problem.)

3. We are now able to connect to the WI-FI module and gain access to the web interface.

4. From here we can attempt to update the firmware and upload the bootloader.
Image

This is where you see the first issue where it will show the SWD error. If this is not relevant for my application and I can disregard then happy days.

5. we then try to apply the parameters downloaded from the database. I cannot see spot values as shown in the parameters database video linked here:

Instead, when I upload the .JSON file to the web interface i get all of the values loading on one line. I did have a preloaded Olimex module a while ago which we eventually bricked (we don't know why) and the spot values did appear as expected before we began making up harnesses going to the board.
Due to my current PC setup, I am unable to access both the wi-fi module and the parameter database at the same.

I am using we a lot in this reply. This is because it myself and my dad doing this. we live in different cities so we're doing this in parallel using TeamViewer.

Hopefully this helps explain what I'm doing and you can see where i'm going wrong.

Thanks,

PM
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Wemos D1 flash issue: No Spot Values

Post by johu »

It is important to understand that two processors are involved in a working web interface. The ESP, which you have correctly programmed, presents the data. The STM32 which apparently you have not programmed supplies the data. Since it is not supplying, there is nothing to present.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Wemos D1 flash issue: No Spot Values

Post by MattsAwesomeStuff »

Put a different way, the Wemos D1 Mini is a miniature webserver. It has an IP, you connect to it, it gives you the webpage that it's hosting. That webpage is the OpenInverter interface, stored on the Wemos.

But the Wemos doesn't actually tell the inverter how to move and spin and such. The STM32 does this.

The parameters are... hmm... I think stored on the STM32 too, and the Wemos just talks to the STM32 and says "Tell me your parameter settings", and then displays them to you. Likewise, if you change them, the Wemos says "Update your parameters to these ones instead" and then that makes permanent changes to the STM32.

While the interface might load, and might look like that is the actual brains, it's not. It's just a webpage. It would look the same way if the STM32 didn't even exist.

So, solution is to order an ST-LInk (ebay/amazon, a couple dollars), flash the bootloader and then the OI software I believe.

You can't flash the software directly to the STM32 from the Wemos webpage or update it, unless the STM32 already has OI software on it to receive that.

I think. That's my take.
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Wemos D1 flash issue: No Spot Values

Post by johu »

Correct. The ESP is completely agnostic of what you plug it into. Plug into a BMS it will display its parameters. Plug it into an inverter then it displays that. It doesn't store anything and as soon as its counterpart stops talking (because not programmed, programmed with non OI firmware or not correctly connected) it will display nothing but the template page
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
lbblue
Posts: 8
Joined: Wed Oct 13, 2021 4:47 pm
Has thanked: 2 times

Re: Wemos D1 flash issue: No Spot Values

Post by lbblue »

Thank you both for the clarification. I genuinely thought the STM32 did not need to be programmed. Can you provide a link to any materials for flashing the OI firmware to the bluepill to help me along?

I will resolve this thread once I have spot values showing up.

Thanks
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Wemos D1 flash issue: No Spot Values

Post by MattsAwesomeStuff »

Can you provide a link to any materials for flashing the OI firmware to the bluepill to help me along?
Yes ... in the thread specifically created for this controller board and its troubleshooting.

Here's the same thing I went through:

viewtopic.php?p=5752#p5752

Read Damien's post (or watch the video above if it's a bit more helpful)... but then also read the few posts after it, I describe in a bit more detail where to get stuff and what to do.

Also note that those instructions are 4 years old, and the open source crowd likes to avoid backwards compatibility so if you're having troubles try downloading the exact versions that existed for 4 days in time with an alignment of the planets.

...

Also, it dawns on me it's a notable failure of the community to properly document this stuff, if someone on the same project is asking the same questions 4 years later and it still hasn't been documented anywhere better. Maybe this is just a blue-pill concern and everyone who uses some other STM32 chip flies through this.
lbblue
Posts: 8
Joined: Wed Oct 13, 2021 4:47 pm
Has thanked: 2 times

Re: Wemos D1 flash issue: No Spot Values

Post by lbblue »

Thanks for this reply.

I've been looking through the topic and we've managed to flash both of our STM 32 boards using the stm32cubeprogrammer (This seems to be easier to work with for us. one of the computers can't install the ST-link utility)

The board is behaving as expected but still no spot values showing up. I'll need to do some more digging through the forums to get this nailed down.

And I have noticed the avoidance of backward compatibility but with this area it's easy to move on to the next thing that "works better".
Just something to get used to :).

We are carrying on today. I'm going to try and roll back some of the firmware and see if we get something.
And then we'll be building a new board failing that.
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Wemos D1 flash issue: No Spot Values

Post by johu »

Just to confirm: you flashed stm32_loader.hex and stm32_sine.hex (or foc) and you get a 5 Hz blinky LED (provided the through hole board has got one?)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Wemos D1 flash issue: No Spot Values

Post by MattsAwesomeStuff »

johu wrote: Sun Apr 07, 2024 8:50 amJust to confirm: you flashed stm32_loader.hex and stm32_sine.hex (or foc) and you get a 5 Hz blinky LED (provided the through hole board has got one?)
To confirm, the blue pill has the red and green LEDs, yes. And you do get a heartbeat flashing, yes.

...

Also, blind assumptions, but I wouldn't go ordering a new board just yet. The problem is almost certainly you doing things wrong.

...

Johannes - This is a pretty common beginner's problem. Can the webpage have, front and center up top, a proof of life message or a button to tell it test whether it's communicating with the STM32? It would save a lot of forum threads about "Why aren't there any paramenters?" and immediately resolve it to "I click this and it says it's not communicating" rather than sending people on wild goose chases.
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Wemos D1 flash issue: No Spot Values

Post by johu »

It's got this now, but of course that requires flashing the latest Web UI. That will take a while to trickle through
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Wemos D1 flash issue: No Spot Values

Post by MattsAwesomeStuff »

johu wrote: Mon Apr 08, 2024 7:02 am It's got this now,
Oh? I obviously need to update my Wemos then.
Post Reply