OTGW system error

This Forum is about the Opentherm gateway (OTG) from Schelte

Moderator: hvxl

hvxl
Senior Member
Senior Member
Posts: 1649
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW system error

Post by hvxl »

This looks to me like a baud rate mismatch and could be the USR-TCP232 that got confused. Were the LEDs on the OTGW still flashing as usual before you did the power cycle? Hopefully you have LEDs configured to light up for each transmitted or received message. I suppose you didn't try to log in on the USR-TCP232 and reset/reconfigure just that part. Maybe that is something you can try, if this happens again.

Did you regularly check the PR=Q command before this happened? Did it ever report Q=W?
Schelte
AndrewFG
Starting Member
Starting Member
Posts: 45
Joined: Fri Jan 07, 2022 7:50 pm

Re: OTGW system error

Post by AndrewFG »

Many thanks for your response. See my answers to your points inline below..

> This looks to me like a baud rate mismatch and could be the USR-TCP232 that got confused.
Interesting suggestion. The garbled characters do indeed look like a baud rate issue. But I wonder what could have triggered it to “get confused”?

> Were the LEDs on the OTGW still flashing as usual before you did the power cycle?
I don’t recall exactly, but I think that one of the LEDs was indeed flashing. Presumably the Tx?
But the boiler was indicating an Opentherm error, so I think there was also an issue on the OT bus.

> Hopefully you have LEDs configured to light up for each transmitted or received message.
Yes.

> I suppose you didn't try to log in on the USR-TCP232 and reset/reconfigure just that part.
Indeed not.

> Maybe that is something you can try, if this happens again.
Indeed. Thanks for the suggestion.
Also I think the USR TCP has a setting to reset itself after a period of no comms. So I will look into that too.

> Did you regularly check the PR=Q command before this happened?
No. And presumably the power cycle will always over write the prior value? Or? So I am not sure if this could ever help?? Maybe it should store the last two or three resets, rather than just the last one?

> Did it ever report Q=W?
I don’t know. The W value is not mentioned on your web page, but I assume it means WDT reset?
hvxl
Senior Member
Senior Member
Posts: 1649
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW system error

Post by hvxl »

AndrewFG wrote:> Did you regularly check the PR=Q command before this happened?
No. And presumably the power cycle will always over write the prior value? Or? So I am not sure if this could ever help?? Maybe it should store the last two or three resets, rather than just the last one?

> Did it ever report Q=W?
I don’t know. The W value is not mentioned on your web page, but I assume it means WDT reset?
The W value is not mentioned on the web page because the regular firmware can never report it. It was an addition to firmware 5.3.1 that I made especially for you. That's why I mentioned it in the post where I provided that firmware.

It doesn't make sense to sacrifice some of the scarce resources remaining for something that almost nobody needs and can easily be offloaded to an external application. Just check the PR=Q command once in a while. You can also check your logs for the "WDT reset!" string.
Schelte
AndrewFG
Starting Member
Starting Member
Posts: 45
Joined: Fri Jan 07, 2022 7:50 pm

Re: OTGW system error

Post by AndrewFG »

> You can also check your logs for the "WDT reset!" string.

That is what I am doing. So for me the PR=Q is not really needed.

Many thanks for the 5.3.1 build. Insofar as I have not (yet) seen a WDT reset, this build has "fixed" that problem. It seems that whatever you did in that build was not only catching WDT reset events, but apparently even preventing such events from occurring.

But now I am instead seeing the other kinds of errors, recently reported.
hvxl
Senior Member
Senior Member
Posts: 1649
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW system error

Post by hvxl »

I did not make any changes other than resuming normal operation after a WDT reset and the extension of the PR=Q response. If you didn't experience a WDT reset, these changes should be irrelevant.

But by changing the code, things will end up on a different location in program memory. So, if the change influences the way the OTGW behaves in other respects than what was changed, that is another clue that supports the theory that you may have a flaky memory bit.

Another possibility is that there is a bug related to page selection. But I would expect that to happen more consistently and more people would run into it.
Schelte
AndrewFG
Starting Member
Starting Member
Posts: 45
Joined: Fri Jan 07, 2022 7:50 pm

Re: OTGW system error

Post by AndrewFG »

Ok, I will buy another PIC and keep you posted.
hvxl
Senior Member
Senior Member
Posts: 1649
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW system error

Post by hvxl »

If you are going to buy a new PIC, you may want to get a PIC16F1847 instead of a PIC16F88. The PIC16F1847 is a more modern replacement for the PIC16F88. And it's cheaper.
Schelte
AndrewFG
Starting Member
Starting Member
Posts: 45
Joined: Fri Jan 07, 2022 7:50 pm

Re: OTGW system error

Post by AndrewFG »

^
Thanks for the tip. :)
AndrewFG
Starting Member
Starting Member
Posts: 45
Joined: Fri Jan 07, 2022 7:50 pm

Re: OTGW system error

Post by AndrewFG »

hvxl wrote: Thu Apr 07, 2022 9:46 am you may want to get a PIC16F1847 instead of a PIC16F88
I tried the PIC16F1847 but unfortunately it does not work on my Nodo board. I tested it using otmonitor.exe v6.0 (to try to flash gateway.hex v6.0) but it does not work. Otmonitor says first "Please manually reset the OpenTherm Gateway" and when I do that, after some time it says "Could not switch gateway to self-programming mode"..

So I have now also ordered a PIC16F88 ...
hvxl
Senior Member
Senior Member
Posts: 1649
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW system error

Post by hvxl »

You are aware that you need to either order a PIC with the firmware (or at least the bootloader) preinstalled, or use a PIC programmer to program it yourself? A blank PIC16F88 can also not magically be programmed by OTmonitor.

A (programmed) PIC16F1847 definitely does work on all currently existing OTGW boards from the Nodo shop.
Schelte
AndrewFG
Starting Member
Starting Member
Posts: 45
Joined: Fri Jan 07, 2022 7:50 pm

Re: OTGW system error

Post by AndrewFG »

hvxl wrote: Tue Apr 12, 2022 2:36 pm You are aware that you need to either order a PIC with the firmware (or at least the bootloader) preinstalled, or use a PIC programmer to program it yourself? A blank PIC16F88 can also not magically be programmed by OTmonitor.
Ah! No. Your reference to "The method used to update the firmware is a slightly modified version of Microchip Application Note AN851" led me to believe that OTmonitor was indeed capable of such magic.
hvxl
Senior Member
Senior Member
Posts: 1649
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW system error

Post by hvxl »

That application note describes a suggestion for the implementation of a boot loader. But if you buy a PIC from some random supplier, the device is blank. It doesn't contain that boot loader, or any other. The boot loader somehow has to be loaded first. Once that is done, any subsequent firmware updates can be done by OTmonitor. Sorry if that wasn't clear.

Do you have (a friend who has) a PIC programmer? As said, you only need to use it once for a new PIC. If you reveal where you are located, there may also be someone on the forum in your vicinity who is willing to help. If you have no way to program the PIC, you can buy a preprogrammed PIC16F1847 from the Nodo shop.
Schelte
AndrewFG
Starting Member
Starting Member
Posts: 45
Joined: Fri Jan 07, 2022 7:50 pm

Re: OTGW system error

Post by AndrewFG »

> Do you have (a friend who has) a PIC programmer?

Just to let you know that I finally got my hands on 1) a PIC programmer, and 2) a new PIC16F88 chip. It took longer to get the chip because of a) long lead times on the chip, and b) the first chip that arrived was faulty.

Anyway, just for the record, I have loaded your v5.3.1 (which is the reason why I used a PIC16F88 rather than a PIC16F1847), and will let it run for a couple of weeks..
Post Reply

Return to “Opentherm Gateway Forum”