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?
Direct peer to peer WIFi ESP NOW to connect Android Phone
-
Dario_Lobos
- Posts: 8
- Joined: Fri Jan 16, 2026 5:40 pm
-
nopnop2002
- Posts: 347
- Joined: Thu Oct 03, 2019 10:52 pm
- Contact:
Re: Direct peer to peer WIFi ESP NOW to connect Android Phone
No.Is it possible use the idf socket in peer to peer NOW?
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
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
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
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
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
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
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
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
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
I was reading the description
https://developer.android.com/develop/c ... wifi-aware
and can even limit connection by distance to connection peer
Many thanks again for your information, I will use it.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).
Who is online
Users browsing this forum: Bytespider, Google [Bot], meta-externalagent, Semrush [Bot] and 18 guests