Capture data from legacy ESP-32 based sensor over WiFi?

Thread Starter

HAL2100

Joined Dec 1, 2023
10
Hi,
I have inherited a sensor that uses a bespoke board with an ESP32 built into it. It used to send data to AWS for visualisation via a web app. However, the AWS account is defunct so I can't see the data.

I have instructions how to connect directly to the device, which works. It creates it's own WiFi network and I use it's MAC address and a password to connect. I then get access to an NVS Configuration Page which I can use to connect the ESP32 to the local WiFi, if I so choose. However, because the AWS Web App is defunct, that doesn't help me.

I presume that I can access the data coming off the ESP32, but I don't know how to do this. Can you suggest methods?

I'm an ignoramus, but willing to learn.
 

pe1hmm

Joined Jul 8, 2020
2
When you have physical access to the board, maybe the ESP32 (daughter board) has an USB connector (used to program the ESP) you can connect to. It can be a FT232, CH340 etc as com-device serial port. The developer may have programmed it to send debug data that can provide more information..
 

Thread Starter

HAL2100

Joined Dec 1, 2023
10
Hi Pe1hmm,
That's kind of what I'm hoping. Plug in and see what's coming out of the ports.
I was also hoping someone might suggest a way of grabbing it off the WiFi. I'm not sure if it sends data automatically or whether I need to query it. The board responds to pings, so it is alive and talking.
 

Ya’akov

Joined Jan 27, 2019
10,226
Welcome to AAC.

As @nsaspook suggested Wireshark is a good tool to reverse engineer what the device is doing. Combining that with a mall Linux-based computer (it could be anything that can run Linux, it needs almost no computer power) you could set up a DNS server to send the traffic to the Linux box rather than Amazon, and then spoof the interaction to get it to believe it is sending data to NWS while in fact you are just collecting it yourself.

Alternatively, if the ESP32 is being used conventionally, with the sensors connected to the MCU in a traceable way, you could just replace the program running on the device with ESPHome and use Home Assistant to collect the data and possibly Node-RED to create a dashboard to visualize the data, possibly alongside other data.

If necessary, you could just hijack the sensors and use a new ESP32 development board attached vampire-style.
 

Thread Starter

HAL2100

Joined Dec 1, 2023
10
Thanks Ya'akov. Those suggestions are all helpful.

RE: Wireshark - This is what we're trying to do now. It's not easy for us, as we're not IT guys, but ChatGPT (pro) is helping. There are a few roadblocks we don't understand, but we're making some progress. We have redirected the system to a local (PC) version of the WebApp, but can't (yet) get data to pass between them. We still don't know how the system initiates data transfer. It seems to need a "call" of some sort.

RE: Reprogramme ESP32 - We're not programmers, so we're reluctant to try to recode the ESP32. We will do so if needs be. We have the binary to reflash it back, but that makes us nervous. Those links look helpful, thanks. Maybe even we can try that. However, if the data capture approach doesn't work, we might have to bite the bullet and pay someone to help us with these aspects.

RE: Replace - The ESP32 is piggy-packed onto the special board, so I assume that we could replace it with one that does what we want. The issue is the same as reprogramming, we're not IT. But, with those ESPHome links, we might be competent enough to do that.
 
Top