Hi,
We are working on ESP32 chip from RTOS firmware and application side.
Here, we have just started to work on all side and meanwhile I have started to look ESP32-idd RTOS SDK to start development stuffs. I am thinking to create communication between APK and ESP32 would be over socket interface in which API will send some data after connecting with configured SSID and password. On the other end, ESP32 will send feedback to APK with some response or alerts soemtimg like that.
Does anyone has implemented code something like that?
Please let me know if anyone has implemented that type of code or provide me sample code for that which will be more helpful for us.
Need sample to communicate APK with ESP32 over socket
Need sample to communicate APK with ESP32 over socket
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need sample to communicate APK with ESP32 over socket
Hi,
Does anyone has any sample code for that?
Does anyone has any sample code for that?
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need sample to communicate APK with ESP32 over socket
You might need to define what "APK" might be? I don't think that is an acronym that I am familiar with in connection with common ESP32 programming.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Need sample to communicate APK with ESP32 over socket
@kolban: I think he meant Android's APK (Android Package)..
Up till now i havent seen an example. but you might get lucky if you search for esp8266 examples.
also there isn't really the need for a specific example on the apk side. because what you need is just an TCP connection or UDP package sent to a specific ip (the android's device IP).
For starters i would suggest using a simple IFTTT apk (https://www.youtube.com/watch?v=nbMfb0dIvYc&t=2s)..
Up till now i havent seen an example. but you might get lucky if you search for esp8266 examples.
also there isn't really the need for a specific example on the apk side. because what you need is just an TCP connection or UDP package sent to a specific ip (the android's device IP).
For starters i would suggest using a simple IFTTT apk (https://www.youtube.com/watch?v=nbMfb0dIvYc&t=2s)..
- martinayotte
- Posts: 141
- Joined: Fri Nov 13, 2015 4:27 pm
Re: Need sample to communicate APK with ESP32 over socket
I think he means Android Package for APK, in other words, an Android application.
This app could either use HTTPClient or plain sockets to communicate with the ESP server.
This app could either use HTTPClient or plain sockets to communicate with the ESP server.
Re: Need sample to communicate APK with ESP32 over socket
Yes, Socket based communication.I have developed socket based applications into ESP8266 when I was working into ESP8266..martinayotte wrote:I think he means Android Package for APK, in other words, an Android application.
This app could either use HTTPClient or plain sockets to communicate with the ESP server.
I think that type of code will be worked into ESP32 chip as well. Still, provide me link or sample code for that..
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need sample to communicate APK with ESP32 over socket
Here is an example fragment of an ESP32 application being a socket server. One can then connect a socket client to this listener. By and large, the ESP32 seems to provide a faithful implementation of the sockets API so any books or other resources you find that talk to writing networking apps in C using sockets should work fine. For me, I have found study of the sockets API to be highly rewarding. Once one gets one's mind around sockets programming, TCP/IP networking applications fall into place. If I were to think about writing a networking application using TCP/IP, I would say a firm grasp of sockets is required to succeed.
https://github.com/nkolban/esp32-snippe ... t_server.c
https://github.com/nkolban/esp32-snippe ... t_server.c
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Need sample to communicate APK with ESP32 over socket
Thanks for reply.kolban wrote:Here is an example fragment of an ESP32 application being a socket server. One can then connect a socket client to this listener. By and large, the ESP32 seems to provide a faithful implementation of the sockets API so any books or other resources you find that talk to writing networking apps in C using sockets should work fine. For me, I have found study of the sockets API to be highly rewarding. Once one gets one's mind around sockets programming, TCP/IP networking applications fall into place. If I were to think about writing a networking application using TCP/IP, I would say a firm grasp of sockets is required to succeed.
https://github.com/nkolban/esp32-snippe ... t_server.c
Yes. I agree socket is best way to communicate over WiFi.
I will check your example and will let you know if need any help from your side.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need sample to communicate APK with ESP32 over socket
hiRitesh wrote:Thanks for reply.kolban wrote:Here is an example fragment of an ESP32 application being a socket server. One can then connect a socket client to this listener. By and large, the ESP32 seems to provide a faithful implementation of the sockets API so any books or other resources you find that talk to writing networking apps in C using sockets should work fine. For me, I have found study of the sockets API to be highly rewarding. Once one gets one's mind around sockets programming, TCP/IP networking applications fall into place. If I were to think about writing a networking application using TCP/IP, I would say a firm grasp of sockets is required to succeed.
https://github.com/nkolban/esp32-snippe ... t_server.c
Yes. I agree socket is best way to communicate over WiFi.
I will check your example and will let you know if need any help from your side.
for inspiration,
here is a demo
it runs on esp32 as standalone http/tcp server,
have a download link to an APK ( done with basic4android) , that is inside the http server ( on esp flash )
and you can then comunicate with the esp32 server over http ( browser ) and tcp ( client )
and sure, if you open the link in your browswer on android device, you can download the apk from the esp32 server, install it on your device and you comunicate with esp32 over the apk by tcp client / sockets or http with the browser.
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: Need sample to communicate APK with ESP32 over socket
Thanks for Reply.. Let me check and will let you know..
Regards,
Ritesh Prajapati
Ritesh Prajapati
Who is online
Users browsing this forum: Google [Bot] and 215 guests