ESP32 Remote Control

schkillll
Posts: 16
Joined: Tue Jul 23, 2019 1:46 pm

ESP32 Remote Control

Postby schkillll » Tue Jul 23, 2019 1:51 pm

What is the best way to control ESP32 remotely, without using any third-party software?

Agree007
Posts: 44
Joined: Mon Sep 18, 2017 7:11 pm
Location: Copenhagen

Re: ESP32 Remote Control

Postby Agree007 » Tue Jul 23, 2019 5:12 pm

What part of the esp32 do you want to control from remote?
You can configure the esp32 as wifi access point and web server, then connect to the Web page and control almost anything (as long you have the rigth code in the esp32)

schkillll
Posts: 16
Joined: Tue Jul 23, 2019 1:46 pm

Re: ESP32 Remote Control

Postby schkillll » Tue Jul 23, 2019 6:30 pm

I want to create a webserver accessible from anywhere, to play with my esp32 from an android application.

I can do it when both are on the same network, by simply hosting a server through esp. But I want it when both are not on the same network. To control an esp globally, one way is to use port forwarding through the router.

But, is there any other way which does not use any third-party sites or port forwarding?

User avatar
HermannSW
Posts: 90
Joined: Fri Oct 27, 2017 6:58 am
Location: Eberbach, Germany
Contact:

Re: ESP32 Remote Control

Postby HermannSW » Wed Jul 24, 2019 12:05 am

schkillll wrote:
Tue Jul 23, 2019 1:51 pm
What is the best way to control ESP32 remotely, without using any third-party software?
You are posting your question in ESP32 Arduino forum.

For Arduino CameraWebServer example is a good basis of remote control via Wifi as Agree007 stated.
You can use the ESP32-CAM module for "ESP32 CAM for FPV and RC":
https://www.esp32.com/viewtopic.php?f=19&t=11337

I like to use ESP32 remote control for debugging whether eg. my soldered pins work fine.
For that a shell to login to whould be nice.
The closest I found is flashing MicroPython to the ESP32.
With my webrepl_client.py you can get this login shell feeling wirelessly:
https://github.com/Hermann-SW/webrepl#webrepl-shell

I used webrepl_client.py for remotely dropping payload from a drone as well:
(an ESP8266 ESP01s module provides enough flash for MicroPython)
https://www.esp8266.com/viewtopic.php?f=15&t=18515
Image

schkillll
Posts: 16
Joined: Tue Jul 23, 2019 1:46 pm

Re: ESP32 Remote Control

Postby schkillll » Wed Jul 24, 2019 12:54 pm

HermannSW wrote:
Wed Jul 24, 2019 12:05 am
schkillll wrote:
Tue Jul 23, 2019 1:51 pm
What is the best way to control ESP32 remotely, without using any third-party software?
You are posting your question in ESP32 Arduino forum.

For Arduino CameraWebServer example is a good basis of remote control via Wifi as Agree007 stated.
You can use the ESP32-CAM module for "ESP32 CAM for FPV and RC":
https://www.esp32.com/viewtopic.php?f=19&t=11337

I like to use ESP32 remote control for debugging whether eg. my soldered pins work fine.
For that a shell to login to whould be nice.
The closest I found is flashing MicroPython to the ESP32.
With my webrepl_client.py you can get this login shell feeling wirelessly:
https://github.com/Hermann-SW/webrepl#webrepl-shell

I used webrepl_client.py for remotely dropping payload from a drone as well:
(an ESP8266 ESP01s module provides enough flash for MicroPython)
https://www.esp8266.com/viewtopic.php?f=15&t=18515
Image
I have few queries regarding your examples -
1) Are you sending control commands for the first examples over the internet?
2) Either using Arduino IDE or Micropython, i cant figure out how to send data to esp32 over internet.
3) Your last example uses ras-pi zero-W, so is of no use to me as i am trying to do it with just esp32.

In layman terms, i need to send a text file from an android phone containing the mac address of android, mac add of sensor and operation to perform lets say turn led on and off to a server. Where either server processes and send the command to sensor or sensor is continuosly checking for any inputs. Not sure, how to make this happen. Anthing in this direction would be really appreciated.

User avatar
HermannSW
Posts: 90
Joined: Fri Oct 27, 2017 6:58 am
Location: Eberbach, Germany
Contact:

Re: ESP32 Remote Control

Postby HermannSW » Thu Jul 25, 2019 6:02 pm

> 1) Are you sending control commands for the first examples over the internet?
>
No, in WLAN of home.

> 2) Either using Arduino IDE or Micropython, i cant figure out how to send data to esp32 over internet.
>
WIth the CameraWebServer example there runs a webserver on the EPS32-CAM module.
Just do GET or POST requests to get from or send to data from/to ESP32 module.

> 3) Your last example uses ras-pi zero-W, so is of no use to me as i am trying to do it with just esp32.
>
No, the video is from drone camera, captured with Android drone app.
The command that dropped the payload was sent with webrepl.py to the ESP on back of the drone.
That controls the mini servo at front that drops the payload.

If you want to send data from ANdroid, use browser or web application on Android and do a POST against the ESP32 webserver.

schkillll
Posts: 16
Joined: Tue Jul 23, 2019 1:46 pm

Re: ESP32 Remote Control

Postby schkillll » Sun Jul 28, 2019 6:49 am

HermannSW wrote:
Thu Jul 25, 2019 6:02 pm
> 1) Are you sending control commands for the first examples over the internet?
>
No, in WLAN of home.

> 2) Either using Arduino IDE or Micropython, i cant figure out how to send data to esp32 over internet.
>
WIth the CameraWebServer example there runs a webserver on the EPS32-CAM module.
Just do GET or POST requests to get from or send to data from/to ESP32 module.

> 3) Your last example uses ras-pi zero-W, so is of no use to me as i am trying to do it with just esp32.
>
No, the video is from drone camera, captured with Android drone app.
The command that dropped the payload was sent with webrepl.py to the ESP on back of the drone.
That controls the mini servo at front that drops the payload.

If you want to send data from ANdroid, use browser or web application on Android and do a POST against the ESP32 webserver.
I can use GET or POST command, but i would need a public server. ESP32 can only host server over WLAN. My question is how to host a server accessible from anywhere in the world.

User avatar
martinayotte
Posts: 133
Joined: Fri Nov 13, 2015 4:27 pm

Re: ESP32 Remote Control

Postby martinayotte » Sun Jul 28, 2019 1:21 pm

schkillll wrote:
Sun Jul 28, 2019 6:49 am
My question is how to host a server accessible from anywhere in the world.
Using "port forwarding rules" on your router ...

schkillll
Posts: 16
Joined: Tue Jul 23, 2019 1:46 pm

Re: ESP32 Remote Control

Postby schkillll » Wed Aug 28, 2019 1:15 pm

martinayotte wrote:
Sun Jul 28, 2019 1:21 pm
schkillll wrote:
Sun Jul 28, 2019 6:49 am
My question is how to host a server accessible from anywhere in the world.
Using "port forwarding rules" on your router ...
Is there any alternative to port forwarding, for creating a public web server?

User avatar
martinayotte
Posts: 133
Joined: Fri Nov 13, 2015 4:27 pm

Re: ESP32 Remote Control

Postby martinayotte » Wed Aug 28, 2019 2:05 pm

schkillll wrote:
Wed Aug 28, 2019 1:15 pm
Is there any alternative to port forwarding, for creating a public web server?
What do you mean ? If your ISP is blocking the port 80, you can use any other ports, such 8080.

Who is online

Users browsing this forum: Google [Bot] and 5 guests