Page 1 of 1
Direct peer to peer WIFi ESP NOW to connect Android Phone
Posted: Sun Feb 08, 2026 4:59 am
by Dario_Lobos
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?
Re: Direct peer to peer WIFi ESP NOW to connect Android Phone
Posted: Mon Feb 09, 2026 3:02 am
by nopnop2002
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.
Re: Direct peer to peer WIFi ESP NOW to connect Android Phone
Posted: Mon Feb 09, 2026 7:49 pm
by Dario_Lobos
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?
Re: Direct peer to peer WIFi ESP NOW to connect Android Phone
Posted: Mon Feb 09, 2026 7:51 pm
by Dario_Lobos
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?
Re: Direct peer to peer WIFi ESP NOW to connect Android Phone
Posted: Mon Feb 09, 2026 11:02 pm
by nopnop2002
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
Re: Direct peer to peer WIFi ESP NOW to connect Android Phone
Posted: Tue Feb 10, 2026 3:01 pm
by Dario_Lobos
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.
Re: Direct peer to peer WIFi ESP NOW to connect Android Phone
Posted: Wed Feb 11, 2026 3:16 am
by nopnop2002
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
Re: Direct peer to peer WIFi ESP NOW to connect Android Phone
Posted: Wed Feb 11, 2026 1:48 pm
by Dario_Lobos
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.