WE4000SE WiFi Intercept without network connection

209 views
Skip to first unread message

Max

unread,
Feb 26, 2021, 9:30:46 AM2/26/21
to weewx-user

Hello,

I'm trying to use a Froggit WH4000SE in combination with a raspberry pi 3+ and weewx to intercept data over WiFi. The raspberry pi is configured as access-point, running weewx 4.2.0 and the interceptor driver to accept ecowit-protocoll messages on 192.168.30.1:8000. The Froggit station (192.168.30.19) is configured to send data to this address and port using WS View.

Now to the problem itself: When the raspberry pi is connected over Ethernet (and traffic is sent trough), the weather station and weewx work as intended. The corresponding POST messages are sent and data is processed. However when the raspberry pi is not connected over Ethernet, weewx is only receiving empty queues.

After some traffic analysis, I suppose that there is some kind of handshake or perquisite to be done before the station provides corresponding data after a restart. It becomes apparent that a TCP request to 47.102.253.116:80 (rtpdate.ecowitt.com) is done repeatedly and also different calls to ntp servers from baidu, google and amazon. Is there some driver for weewx that can emulate such a handshake locally or is there another way to get the station to send weather data?

Best regards,

Max








vince

unread,
Feb 26, 2021, 11:14:18 AM2/26/21
to weewx-user
On Friday, February 26, 2021 at 6:30:46 AM UTC-8 Max wrote:

After some traffic analysis, I suppose that there is some kind of handshake or perquisite to be done before the station provides corresponding data after a restart. It becomes apparent that a TCP request to 47.102.253.116:80 (rtpdate.ecowitt.com) is done repeatedly and also different calls to ntp servers from baidu, google and amazon. Is there some driver for weewx that can emulate such a handshake locally or is there another way to get the station to send weather data?

There's not going to be anything weewx can do for this one.

Sounds like you're running into the watchdog timers in the Ecowitt hardware needing to phone home to China.

There's a long discussion on wxforum.net at https://www.wxforum.net/index.php?topic=40437.0 (read reply 11 specifically).
 
The firmware uses a HTTP transaction to detect if they have Internet connectivity and then some NTP transactions to set the clock on the hardware so they can roll over accumulated rain at local midnight.    Neither can be disabled by the user.

Ecowitt has declined multiple requests to turn this off or alternately make it user-configurable and optional, but at least they've responded with what the firmware expects to see, so folks have cooked up a way to fake it out, although it's not trivial to do:

* set up a fake web server that responds to the web part as the firmware expects
* set up a fake time server so it can then get time of day on your LAN only
* fake out DNS with dnsmasq or the like so their expected hostnames resolve to your fake services

Not easy to do but some folks in the thread on wxforum.net have gotten there.

I might add that it seems like the gear might also check for firmware updates as well, but it's uncertain to me how that works or if that has another watchdog timer that needs to do something else in there.

(and yeah - this kind of stuff is really disturbing)

Max

unread,
Mar 2, 2021, 3:43:56 PM3/2/21
to weewx-user

Thank you very much for pointing me in the right direction

Using the information provided I got the station working without internet. For anybody with the same intentions and problems, here is what I did. Not specific to weewx, but maybe it helps someone else searching for a solution:

As mentioned by Vince the station is trying to connect to ecowitt and is expecting a response to begin transmitting weather data over WiFi. To emulate the ecowitt server, you can use a program for Linux called FOSHKplugin in generic mode which answers to the TCP requests to the ecowitt server with the needed POST answer. (https://www.loxwiki.eu/display/LOXBERRY/FOSHKplugin+-+generic+version). To configure FOSHKplugin correct, you can use Wireshark to find the corresponding port on the weather station for control. Simply connect the weather station and your mobile phone to the WIFI of your Raspberry Pi in Access-Point mode and use the WS View app to send some configuration changes. The corresponding port on the WS4000SE can be registered in the plugin to later reconfigure the weather station with the Raspberry Pi only.

 

To use weewx with the FOSHKplugin, simply set it up in sniffer mode instead of listener mode. The weather station is now up and running offline for 4days without resetting itself or stopping transmission.

 

Thanks again. 

Reply all
Reply to author
Forward
0 new messages