Buffer overflow tdtool with oregon wgr800 (windmeasure)

Moderator: Telldus

Post Reply
atlehaav
Posts: 9
Joined: Fri Mar 17, 2023 9:45 am

Buffer overflow tdtool with oregon wgr800 (windmeasure)

Post by atlehaav »

Newly purchased a weatherstation (oregon WMR88A) iot implement these sensors into my HomeAutomation project. The setup is a Raspberry PI with tellstick duo (newest firmware) with tellcore 2.1.2. Ran into trouble I can't figure out. The windsensor (WGR800) is causing buffer overflow (and terminates). When running "python tdtool -t" the output is:
..
RawDeviceEvent
data: class:sensor;protocol:oregon;model:1984;id:25;winddirection:247.5;windaverage:0.0;windgust:0.0;
controllerId: 1
callbackId: 4
RawDeviceEvent
data: class:sensor;protocol:fineoffset;id:169;model:temperature;temp:21.0;
controllerId: 1
callbackId: 4
..etc

Clearly; tellstcick is receiving the data, but when running "tdtool -l" the output gives:

Running "tdtool -l" however gives:
Number of devices: 11
... (removed here)

SENSORS:

PROTOCOL MODEL ID TEMP HUMIDITY RAIN WIND LAST UPDATED
mandolyn temperaturehumidity 12 11.2° 43% 2014-12-30 17:23:54
mandolyn temperaturehumidity 11 16.8° 96% 2014-12-30 17:24:02
fineoffset temperature 169 21.0° 2014-12-30 17:24:15
mandolyn temperaturehumidity 14 8.9° 58% 2014-12-30 17:24:11
oregon F824 18 1.5° 91% 2014-12-30 17:24:33
mandolyn temperaturehumidity 21 22.9° 23% 2014-12-30 17:24:22
fineoffset temperaturehumidity 1 10.9° 51% 2014-12-30 17:24:34
mandolyn temperaturehumidity 13 7.2° 57% 2014-12-30 17:23:44
fineoffset temperature 6 18.7° 2014-12-30 17:24:34
fineoffset temperature 142 9.0° 2014-12-30 17:24:35
fineoffset temperature 235 3.0° 2014-12-30 17:24:35
fineoffset temperature 207 16.3° 2014-12-30 17:24:34
*** buffer overflow detected ***: tdtool terminated
Aborted
root@raspberrypi:/#
Buffer overflow is caused by the wgr800. If I take out the batteries from this, tdtool is acting normally.

And of course - the winddata is not readable/possible to push to my database though a parser - no data to read :cry:

Any ideas?
mgreen
Posts: 1
Joined: Fri Mar 17, 2023 9:45 am

Re: Buffer overflow tdtool with oregon wgr800 (windmeasure)

Post by mgreen »

I had the same problem. I thought I'd debug the problem to see if I could fix it.
So I downloaded the 2.1.2 sources and built it.
But with the tdtool that I built, it doesn't crash. So I used that instead.
The version that crashes is also version 2.1.2, but from the repository.

Note: I had to add a linker dependency on pthread for the client project, to make it link.
atlehaav
Posts: 9
Joined: Fri Mar 17, 2023 9:45 am

Re: Buffer overflow tdtool with oregon wgr800 (windmeasure)

Post by atlehaav »

Thanks, but still the same buffer overflow after following the guidance given from " http://elinux.org/R-Pi_Tellstick_core ". Downloaded of course the 2.1.2 version. I'm a noob when it comes to unix/linux usage, and need to follow a guide of some sort.

Stopped the telldusd service before installing (but did not removed/uninstalled the package before the installation of my own build). Didn't get any errors doing the steps, and did not need to add a linker dependency as you described - didnt understand that one anyway..)

Any other ideas?
Post Reply