Some serial/USB related problem.

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

Moderator: hvxl

Post Reply
Warwar
Starting Member
Starting Member
Posts: 19
Joined: Mon Dec 09, 2013 10:40 am

Some serial/USB related problem.

Post by Warwar »

Hi all.

1st i want to say "Thank You very much!" to creator of OpenTherm Gateway! It's awesome! :-)

I buy "Components kit - USB" some time ago. I assembled it, test it according to "Troubleshooting guide", and try it out.
I want to use OTGW with boiler "Ferroli Perasus D" and thermostat "Romeo W".
As "host" PC i use Raspberry Pi, which work as remote diagnostics station (through 3G/GSM modem).

First time i plugged OTGW in was perfect - messages decoded and printed in "otmonitor":

Code: Select all

T80000200
B40000200
T10010000
BD0010000
T00110000
BC0110000
T000A1400
BC00A1400
T80000200
B40000200
T10010000
BD0010000
T00110000
BC0110000
T80800000
B70800000
T80000200
B40000200
T10010000
... and so on, so i saw it worked! :-)

Now i have some strange behavior - it's like messages are wrapped a bit:
pi@raspberrypi ~ $ cat /dev/ttyOTGW

Code: Select all

T812100
00B412100
01T816400
01B716400
08T000000
08BC00000
00T10030A
00BD0030A
00T812100
00B412100
01T016400
01BC16400
00T0C0A00
00BCC0A00
00T10030A
00BD0030A
00T812100
00B412100
01^C
no errors printed. Looks like all correct, but it's not.

OTGW plugged into powered USB-hub, cause Raspberry Pi have very "sensitive" USB ports.
I try almost all stty settings - nothing changed.
As a last resort i want to try plug out OTGW from USB hub amd plug it directly into Raspberry Pi. Maybe then try with notebook.

Maybe anyone have some other suggestions.

Thanks anyway.
It's nice to be important, but it's more important to be nice...
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Some serial/USB related problem.

Post by hvxl »

Thank you for the kind words.

Firmware up until 4.0b0 kept track of the number of characters in the transmit buffer, as well as pointers to the beginning and end of the data in the buffer. If for some reason the two got out of sync, you get the phenomenon you described. The pointers would still be a few bytes apart, when the character counter had already reached 0. The remaining characters would not be transmitted until new data is placed in the buffer.

I couldn't think of a scenario that could cause this, but I've seen it happen myself, so there clearly must be such a scenario. I have fixed it in firmware 4.0b0 by getting rid of the character counter and always calculating the number of characters in the buffer from the pointers.

The only way I know to recover from the situation with your current firmware is to reset the gateway.
Schelte
Warwar
Starting Member
Starting Member
Posts: 19
Joined: Mon Dec 09, 2013 10:40 am

Re: Some serial/USB related problem.

Post by Warwar »

Thanks for your replay.

I was wondering if it is such a strange bug in pl2303 kernel module.
Well, ok, i'll try to restart OTGW and watch the result.
Maybe i'll try *beta* and became beta-tester too.
Basic purpose, for me, to be able to know if *all OK* with boiler and heating system, remotely.
With just Raspberry Pi (and Smart UPS) i can monitor electricity and temperature, OTGW is for gas, heating system pressure, temperatures & etc monitoring.
If it will work as i suppose it should, i'll be very glad. :-)
It's nice to be important, but it's more important to be nice...
Warwar
Starting Member
Starting Member
Posts: 19
Joined: Mon Dec 09, 2013 10:40 am

Re: Some serial/USB related problem.

Post by Warwar »

In addition: "Ferroli Pegasus D" <-> OTGW <-> "Ferroli Romeo W" - definitely works!
I'll upload logs as soon as i "fix" this "bug".
It's nice to be important, but it's more important to be nice...
Warwar
Starting Member
Starting Member
Posts: 19
Joined: Mon Dec 09, 2013 10:40 am

Re: Some serial/USB related problem.

Post by Warwar »

Hi!
I update firmware to the last beta - it works!

Thanks a lot! :-)
Now, i'm moving to the "Opentherm Gateway 4.0 alpha/beta testers wanted" thread!
It's nice to be important, but it's more important to be nice...
Post Reply

Return to “Opentherm Gateway Forum”