Two-way ESP32 communication using wifi (no esp now)

Hello,

I've been toying around with ESP-NOW and now I want to try using to regular wifi library, but there's not much info about it online. How can I make simple programs for, say, transmitting single variables, over wifi, without using the ESP-NOW library?

Also, how do I get long-range mode working? Does it work for ESP NOW?

Thanks.

There's an article and tutorial here:

But that's for ESP-NOW. What about ordinary wifi communication?

Server-client/s
The RNT guy has a lot on that, but he unnecessarily complicates things with the reliance on DHT11 stuff and using STRUCTs instead of plugging some numbers or text strings - which, to me, is more beginner style.

have a look at esp32-access-point-ap-web-server
has the advantage that any WiFi enabled device (smartphone, laptop, etc) can connect to the access point and run a web client to view the webpage etc

You can use a plain TCP or UDP socket client/server topology, but if both devices are ESP32s, why add additional and unnecessary software layers?

ESP-NOW is the ideal solution for the scenario you described:
it is an efficient and fairly mature technology, it can reach considerable distances, it does not necessarily require an Access Point etc etc.

WiFiUdp is really simple. A primitive pub/sub class could look like this - but there are many other examples on the web.

Hi, @ep2003

Why don't you want to use the library?

Have you Googled;

esp32 peer to peer

Tom... :smiley: :+1: :coffee: :australia:

Why don't you want to use the library?

Seems like the wifi mode would be better for handling large networks, and it would be helpful to use a router rather than program a whole chip just for that function.

Try it, experiment.

Do you have the basic hardware?
Two ESP32 and possibly a switch, LED and resistor.

Tom... :smiley: :+1: :coffee: :australia:

Do you have the basic hardware?
Two ESP32 and possibly a switch, LED and resistor.

I have all the hardware. The issue is, like everything about ESP32, there's no information about how to program it online. I haven't found any websites that show how to use ESP32's wifi library (or whatever the bare minimum additional libraries needed are) by itself. There's nothing introductory. I'm looking for the simplest possible example sketch for ESP32's wifi.

Hi, @ep2003

Did you do this?
Or look at;

Tom.. :smiley: :+1: :coffee: :australia:

Yeah, I've looked all over RNT. It's no better in that regard.

I'm going to wait to see if anyone has anything to contribute.

I have a server-client arrangement (non-espnow) where the Client gets the status of a remote alarm panel's LED ("armed") from the Server and gives indication of that.

Could you post the sketch(es)? If possible, could you perhaps write a super bare-bones sketch for transmission this way?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.