Direct peer to peer WIFi ESP NOW to connect Android Phone

Dario_Lobos
Posts: 8
Joined: Fri Jan 16, 2026 5:40 pm

Direct peer to peer WIFi ESP NOW to connect Android Phone

Postby Dario_Lobos » Sun Feb 08, 2026 4:59 am

I did a similar question on Friday and disappear. Was more detailed the explanation.

I need to communicate an Android Phone with an Esp32. I am trying to use ESP NOW. Android use a socked to send and receive data as the only way, needs a mac address and a local IP. Have sense if it necessary more than one tasks across the connection. I want to use esp32 NOW with a socket, but I don't know how to implement the socket in ESP32. NOW have fixed data functions and not stream. Bot uses CCMP protocol. Is it possible use the idf socket in peer to peer NOW?

nopnop2002
Posts: 347
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: Direct peer to peer WIFi ESP NOW to connect Android Phone

Postby nopnop2002 » Mon Feb 09, 2026 3:02 am

Is it possible use the idf socket in peer to peer NOW?
No.
Android does not support the ESP-NOW framework, and its standard functionality does not allow it to recognize, send, or receive ESP-NOW packets directly over Wi-Fi.

Dario_Lobos
Posts: 8
Joined: Fri Jan 16, 2026 5:40 pm

Re: Direct peer to peer WIFi ESP NOW to connect Android Phone

Postby Dario_Lobos » Mon Feb 09, 2026 7:49 pm

Thanks. I supposed that using the same protocol CCMP would be possible. Do you know any other way to connect them peer to peer ? Using normal WIFi is this possible?

Dario_Lobos
Posts: 8
Joined: Fri Jan 16, 2026 5:40 pm

Re: Direct peer to peer WIFi ESP NOW to connect Android Phone

Postby Dario_Lobos » Mon Feb 09, 2026 7:51 pm

Thanks. I supposed that using the same protocol CCMP would be possible. Do you know any other way to connect them peer to peer ? Using normal WIFi is this possible?

nopnop2002
Posts: 347
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: Direct peer to peer WIFi ESP NOW to connect Android Phone

Postby nopnop2002 » Mon Feb 09, 2026 11:02 pm

ESP-IDF and Android can communicate via Bluetooth.

I use this app.
https://play.google.com/store/apps/deta ... h_terminal

This app supports various Bluetooth versions:
- Bluetooth Classic
- Bluetooth LE / Bluetooth Low Energy / BLE / Bluetooth Smart

Dario_Lobos
Posts: 8
Joined: Fri Jan 16, 2026 5:40 pm

Re: Direct peer to peer WIFi ESP NOW to connect Android Phone

Postby Dario_Lobos » Tue Feb 10, 2026 3:01 pm

Bluetooth is not what I need I will try to set up a peer to peer in android and Use normal wifi in ESP32. Android can communicate like this with Iphones, I phones don't have nearby devices but anyway can be connected as peer to peer using normal wifi. I will find out. Wifi can be used with more distance and more speed. I someone have some idea or experience about connecting like this via wifi is very welcome. Thanks in advance.

nopnop2002
Posts: 347
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: Direct peer to peer WIFi ESP NOW to connect Android Phone

Postby nopnop2002 » Wed Feb 11, 2026 3:16 am

The Wi-Fi Aware feature added in Android 8.0 allows compatible devices to use the Wi-Fi Aware protocol to discover, connect to, and range (Android 9 and higher) each other directly without access to the internet or mobile networks.

Official example is here.
https://github.com/espressif/esp-idf/tr ... wifi_aware

Dario_Lobos
Posts: 8
Joined: Fri Jan 16, 2026 5:40 pm

Re: Direct peer to peer WIFi ESP NOW to connect Android Phone

Postby Dario_Lobos » Wed Feb 11, 2026 1:48 pm

Many many thanks for your information. I am rewriting the code using jetpack compose and I will use what you suggest.
I was reading the description

https://developer.android.com/develop/c ... wifi-aware

and can even limit connection by distance to connection peer
The Wi-Fi RTT API allows direct ranging to a Wi-Fi Aware peer using either its MAC address or its PeerHandle.

Wi-Fi Aware discovery can be constrained to only discover services within a particular geofence. For example, you can set up a geofence that allows discovery of a device publishing an "Aware_File_Share_Service_Name" service that is no closer than 3 meters (specified as 3,000 mm) and no further than 10 meters (specified as 10,000 mm).
Many thanks again for your information, I will use it.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], coccocbot, trendictionbot and 11 guests