Hi, looking to create a wifi link from esp32 to laptop. The esp32 will gather temperature data and send to laptop to display on serial monitor. I've read some posts about using UDP as the protocol for speed. Any reference code I can look at for the WiFi link to serial monitor?
Why is speed important? How fast can the temperature change? How fast can you read?
The serial monitor can not display information received by the network transport layer based protocols (i.e. UDP, TCP/IP, HTML etc). It can only connect to a serial device.
Some terminal emulators can connect via Telnet but it's not favoured for security reasons.
Any reference code I can look at for the WiFi link to serial monitor?
None, because it's not possible.
You are on the wrong tram. What you need is a separate WiFi terminal on the PC. I have never heard of such a thing but there might be something around, and you can get a WiFi terminal on your phone.
Or using a second ESP32 connected to the computer.
I was thinking maybe a USB to WiFi adapter. It would show up on a USB comport that I can point the serial monitor to. Not sure if that will work.
It all sounds suspiciously like an exercise in fartarsing, re-inventing the wheel with no real objective in mind. I guess any terminal programme on a laptop can talk through Bluetooth, and I believe all ESP32s have both BLE and classic Bluetooth on board, either of which are probably provided with this sort of exercise in mind.
I guess you have some fetish about using the serial monitor, which was never, ever, a good choice for this purpose.
I do appreciate the feedback, as condensing as it is. My question was for a specific application. Not wild whim. Collecting temperature data and sending it via WiFi to a laptop. That should have clued you in by using serial monitor, so I can see data in near real time. Otherwise, I agree serial monitor is not the best. Ultimately getting the link sorted out is the biggest lift. The App is trivial, I could display the data as it comes in, in many ways. But that was not my specific question. Was it?
God only knows. If you want to send data to a laptop wirelessly, there is surely more than one way to do it - none of which involve the serial monitor.
Does running a Web server on the esp32 and accessing it via the Web browser on your PC match your needs. There are plenty of examples of this and it is quite simple.
You could use your home WLAN or the ESP32 can create a WLAN access point .
I've looked at that. It would be a choice if I wasn't so far away from infrastructure. So my options are store to SD and retrieve manually. Or wirelessly.
I thought wirelessly would be great so I can leave everything undisturbed in the field. I have a power source at a nearby shed about 50ft away. That's where I plan to keep an old laptop collecting data.
If you are working outside the range of a WLAN (wireless lan) then an ESP32 is not necessarily the best choice here. 50 feet in the open air should normally be no problem though.
But any (low power battery operation capable) Arduino should do together with a radio device such as NRF24L01 and your sensors. It would transmit the sensor data to another, similarly configured, Arduino/NRF24L01 which is connected to your PC. Here the range is up to 1 km.
An SD card solution is also good if you don't need immediate access to the data.
The function you are talking about is usually handled with a custom program running on the PC. It sounds difficult but it's not hard to do in Python.
I wouldn't say that you have a fetish, but it does seem like an idee fixe, perhaps from using the serial method in similar applications?
I think you could benefit from taking a step back and seeing it as a data collection problem, with better solutions available for the implementation.
But as I said, if you just want to view/save a serial stream from a wifi connected device, you can use Telnet. SSH is better but a tiny Arduino can't handle the encryption. There are Telnet host examples in the Ethernet library, I haven't looked at any ESP code.
So how is Arduino powered?
Sounds reasonable but implies the laptop is running permanently, and is not better employed elsewhere. It does not imply you are there watching it permanently. If you don't mind walking a bit closer to Arduino when the occasion demands, you might consider storing the data on SD and downloading same via Bluetooth as you require it.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.