Olimex ESP8266 MOD requires main chip reset to connect

Post Reply
arber333
Posts: 2305
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Contact:

Olimex ESP8266 MOD requires main chip reset to connect

Post by arber333 »

Hi

I uploaded several Olimex Wifi modules that i have left with new Johannes wifi code.
When i tested them i found out they are not connected immediately when i apply power to inverter. Rather they spin the search icon and wait for me to RESET inverter manually and after that i get wifi interface as before. This happens whenever i bring 13V power to controler. Is this some sync issue?

I need to do this:
1. apply 12V to controler
2. connect to wifi link
3. input IP into browser, then i get spinning search wheel
4. reset STM32 chip manually by a button
5. reload interface and it works

What i tried is using the Weimos D1 module with Johannes interface and it is the same!
But in my Mazda the same wifi module connects directly and is smoothly synced when i open interface.

I also tried Dimas wifi interface on D1 and it works smoothly. Weird?

Anyone encountered this before?

EDIT: On my board I have PA0 connected to CD74HC30 NAND chip without any pullup. Could that cause a problem?
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by dima »

arber333 wrote: Sun Mar 29, 2020 11:45 am I also tried Dimas wifi interface on D1 and it works smoothly. Weird?
I have encountered the same issue, I had a work-around ..."auto refresh the page if detect 2D text" in web-interface.

What happens is boot loader 2D text is getting through to esp8266 serial on start-up.

What is even stranger is that first time you send a command you get "unknown command" back, second time OK. So I send "hello" command just to clear it off on start-up.
arber333
Posts: 2305
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by arber333 »

dima wrote: Mon Mar 30, 2020 5:00 pm What is even stranger is that first time you send a command you get "unknown command" back, second time OK. So I send "hello" command just to clear it off on start-up.
WoW! Tnx that was fast Dima. I see a solution on the horizon...
Meanwhile i do not know why then Wifi unit in my mazda works on day to day without any problems. When i connect to it with my phone it displays parameters the first time! Maybe there is some settings i choose when i uploaded the code to my gizmo that i didnt choose later...
Well look at me its like i am asking why can i walk on ground. I should just be glad it works! :P
hugow93
Posts: 46
Joined: Mon Feb 24, 2020 9:33 pm
Location: Ireland
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by hugow93 »

Hi there, I'm encountering the same issue that Arber mentioned in the original post.

1. Apply 12V to the board
2. Connect to Wi-Fi
3. Go to the webinterface URL: http://192.168.4.1
4. The loading dials spin but the parameter fields never appear

I'm using a Gen 2 Prius board, which unfortunately doesn't have a manual reset button for the STM32.

The Olimex I am using was originally used with an STM32 on a board I bought from OI.
Naively managed to fry that one, and this is a replacement board from JLC.
I flashed it with the bootloader and latest Sine software using an ST Link V2 and it's blinking away happily.

Any help appreciated!

Thanks,

Hugh
Converting a1994 Suzuki Samurai soft top
| Siemens 1PV5135 Motor | Gen 2 Toyota Prius Inverter + OI Control Board | 24 kwh Renault Zoe battery |
User avatar
johu
Site Admin
Posts: 3549
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by johu »

I've sometimes stumbled upon this but it was never repeatable. 99% of the time it just works. I expect this to happen when resetting just the wifi module. This will leave the STM32 running at 1M baud and wifi talks 115k. The STM needs resetting to also talk 115k again. But upon power up there is absolutely no reason.

If you send something via "Custom Command" are you seeing any reply?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
hugow93
Posts: 46
Joined: Mon Feb 24, 2020 9:33 pm
Location: Ireland
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by hugow93 »

Thanks for the response Johu!

Absolutely, I never had trouble with it on the original board either.

Unfortunately none of the commands, including custom commands, yield any response from the interface.
The interface loads, but there's no connection with the STM32 it seems.

I've double checked solder connections for continuity, but no dice there.

Is reconnecting the ST Link and resetting the STM32 from the computer likely to make a difference?

When I flashed the board with the ST Link I used the bootloader and sine.hex file, but haven't been able to update the software on the board over wi-fi (of course).

UPDATE

I've manually reset the board a couple of times by connecting NRST and GND momentarily, to no effect.

I'm going to connect it to the ST-Link again now, clear the MCU and try from the beginning again.
Converting a1994 Suzuki Samurai soft top
| Siemens 1PV5135 Motor | Gen 2 Toyota Prius Inverter + OI Control Board | 24 kwh Renault Zoe battery |
hugow93
Posts: 46
Joined: Mon Feb 24, 2020 9:33 pm
Location: Ireland
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by hugow93 »

Reprogramming the STM32 with ST-Link hasn't solved the issue, the board and ESP light up as expected under 12v but the web interface still doesn't load even when the board is manually reset and powercycled.

I haven't done anything with the ESP thus far, so looking at resetting ESP now as next line of inquiry.
Converting a1994 Suzuki Samurai soft top
| Siemens 1PV5135 Motor | Gen 2 Toyota Prius Inverter + OI Control Board | 24 kwh Renault Zoe battery |
User avatar
johu
Site Admin
Posts: 3549
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by johu »

Reflashing firmware never solved a problem, just sometimes the side effects of reflashing solve something. For example the soft reset executed by the flash loader.
Since it worked with the original MCU and stopped working after you swapped it, it must be something with the pins. When poking around with probes you will press down on the pin and make contact, thus falsely assume contact is good. I'd search in that proximity.

EDIT: if you have a USB to USART (not RS232) adapter try plugging that into the wifi socket. Connect with a terminal program 115200 baud and type something. Are you getting echo? If yes -> maybe your wifi module also got damaged. If no -> bad contact.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
hugow93
Posts: 46
Joined: Mon Feb 24, 2020 9:33 pm
Location: Ireland
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by hugow93 »

Thanks again for the response here! Very much appreciate the help.

No USB to USART, but do have another board to test on.
So here's what I've done since last post.
  • Tested continuity of spare board
  • Successfully lashed spare board with ST-Link
  • Observed the same behaviour with spare board (can connect to wi-fi, but web interface doesn't load even after reset and power cycling)[/list

    Given continuity test seemed ok and identical behaviour was observed with both boards, I'm now reasonably confident it's not a connection error and likely a problem on the Olimex ESP side.

    Even after I'd smoked my last board I could still communicate through the web interface and chance parameters without issue.
    This leads me to believe it's not a hardware fault with the Olimex ESP, but a software issue (could it be stuck on the wrong baud rate somehow?)

    Steps from here:

    • [1] See if I can reset the ESP
    • [2] Reprogram ESP
    • [3] Get a new ESP and program
    • [4] If I still can't get the ESP and MCU to communicate, order a new kit from OpenInverter so I can stay on track with the project and accept the lesson
    Again, any help gratefully received! Thanks

    Hugh
Converting a1994 Suzuki Samurai soft top
| Siemens 1PV5135 Motor | Gen 2 Toyota Prius Inverter + OI Control Board | 24 kwh Renault Zoe battery |
hugow93
Posts: 46
Joined: Mon Feb 24, 2020 9:33 pm
Location: Ireland
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by hugow93 »

I was able to resolve this issue by re-flashing the STM32 using an older version of the bootloader: https://github.com/jsphuebner/tumanako- ... ses/tag/v3

Once I used version 3 instead of version 4 I was able to load the web interface without issue.
Converting a1994 Suzuki Samurai soft top
| Siemens 1PV5135 Motor | Gen 2 Toyota Prius Inverter + OI Control Board | 24 kwh Renault Zoe battery |
User avatar
New Electric Ireland
Posts: 172
Joined: Sun May 31, 2020 12:22 pm
Location: Ireland
Contact:

Re: Olimex ESP8266 MOD requires main chip reset to connect

Post by New Electric Ireland »

I have no idea whether this is related but we've had several people report issues with kits not working that was resolved by firmware re-flashing. Here's one example;

viewtopic.php?f=14&t=396&p=21924#p21654
In Ireland we undertake training & open source RND for the New Electric group, 5 companies converting boats, buses, cars and trucks to electric drive since 2008.
Post Reply