ESP32 access via Ipad

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
jdcrunchman
Posts: 17
Joined: Wed Jun 19, 2019 8:17 pm

ESP32 access via Ipad

Post by jdcrunchman » Fri Oct 04, 2019 5:02 pm

Hi,

I have an iPad, and I want to use it to access my ESP32 via its built in WiFi port. Can someone please tell me the best way to “talk” to my ESP32 from my iPad?

I’m using the LibTerm shell application which may not be a full implementation of a Unix like shell. I’m also trying to use the Termius SFTP app on my iPad as well.

I’ve come across REPL, but understanding it is far above my pay grade. But from what I’ve gathered, this only works if you connect via the USB port which my iPad does not have.

I already learned that ampy.py can be used to transfer files to the ESP32 but (sigh) again only through that USB port.

Are there any tools out there I can use to talk to my ESP32 from my iPad?

I just want to be able to access the python shell, and move files into it, as well as view the list of files in a chosen directory.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 access via Ipad

Post by Roberthh » Fri Oct 04, 2019 6:39 pm

REPL is just the Python command line. Nothing strange. There is WiFi based REPL interface in the ESP32 and ESP8266 variants, called WebREPL. It has to be enabled & configured at least once via USB. After that, you can get access with any browser. WebREPL includes a file transfer mechanism. There should be also serial console apps for IOS, that would give you USB access to your ESP32 device using a USB OTG host adapter. You might not need that all the time, but for set-up and recovery this is useful.

rpr
Posts: 99
Joined: Sat Oct 27, 2018 5:17 pm

Re: ESP32 access via Ipad

Post by rpr » Fri Oct 04, 2019 11:01 pm

AFAIK, the initial install of micropython on a bare esp32 and the initial webrepl setup can only be done via a direct serial/usb connnection. On linux this is usually /dev/ttyUSB0. On a Mac it could be something like /dev/cu.SLAB_USBtoUART or such.

After Micropython is installed, again over the same direct usb connection, connect to the repl using rshell/ampy/picocom etc (e.g. rshell -p /dev/ttyUSB0). Set up the ESP32 to connect to your local wireless network. (http://docs.micropython.org/en/latest/e ... networking). Note down the DHCP-assigned IP address of your ESP32.

Inside the repl do the following,

import webrepl_setup

It will ask you for a password etc.

Once setup, exit from your rshell connection and reboot the board. You should be able to connect from your iPad via the browser. Go to the following address on your iPad: http://micropython.org/webrepl/. In the little box for the address on the top left of that page, change it to the IP address of your ESP32. It should look something like -- ws://192.168.1.15:8266/. Hit connect and you should be in.

I don't have an iPad so can't test out @Roberthh suggested method of using a USB OTG adapter. Not sure if Apple/iOS support this.

DustinW
Posts: 2
Joined: Tue Nov 21, 2017 10:56 am

Re: ESP32 access via Ipad

Post by DustinW » Sat Oct 05, 2019 8:56 am

Does it matter what iPad it is or should this work the same on all iPads?

jdcrunchman
Posts: 17
Joined: Wed Jun 19, 2019 8:17 pm

Re: ESP32 access via Ipad

Post by jdcrunchman » Sat Oct 05, 2019 6:26 pm

Roberthh - WebREPL can only work with the ESP8266 and NOT the ESP32. According to the latest forum discussions, there is nothing available that can connect the ESP32 via an iPad.

There is a good document on getting the iPad to REPL into the esp8266. And shitloads of developers complaining and wishing there would be a WebREPL that works with an ESP32.

There is a REPL that uses the USBtoTTY usb driver, but my iPad doesn’t have a USB port.

What I really want to know is who are working on it, and how I can contact them to see what I can do to volunteer to help, but this is way beyond my pay grade.

There are lots of people out there who wants it, and others are speculating they THINK they know how to do it, but the architecture of the ESP8266 is much different then the ESP32. “Mcauser” from this forum says he believes it’s still in development (sigh). “VisualEcho” also states “Hey, I need this too”. “GoatChurch” claims that his “Jupyter” plug-in for the ESP8266 seems to work pretty much as it is. But ALL require a real computer.

I was hoping to earn enough money to get a new MacBook Pro, by finishing this LoRa project and was let to the conclusion that I could use Atom with PyMakr to develop this, but early bugs in the system plus my inability to get a workaround working has pretty much killed this project, and going in and out of the hospital, has me over 5 weeks behind in the project. So about a week ago, thanks to another forum member, was able to convey all of the steps for the workaround. But (sigh) my PowerBook pro laptop stopped working, so yet again, I’m “Dead in the water” with only a mini iPad to work from.

With my hopes of being able to finish this project using only my mini iPad now dashed and in the toilet, I’m really bummed I cannot complete the project and get a real computer. But as a VietNam era veteran with a disability where I cannot sit long at a computer, I’m essentially screwed.

With a $400 computer repair bill looming over my head, and my book Sales “tanked”, my LoRa project might not see the light of the day.

If my back wasn’t so “tweaked” I would roll up my sleeves and donate most of my time to solving this problem, but I’m going on 76 years of age, and don’t have the tenacity to do this on my own.

But my project is an exciting one. Being able to use LoRa, LoRaWAN and a mesh network system to provide an “off the grid” communication system. Disaster.radio has something that Almost fills the bill, But barely.

I have a lot of interest in this project and actively seeking investment, but prefer the open source community to take on the role of releasing a WebREPL for thevESP32. I know enough to realize this is non-trivial.

So guys (and Gals) PLEASE give us the tools we need to develop our software.

We finished the hardware, but for field testing, we really have a need to use our iPhones or tablets to REPL into our SX1276 and ESP32.

I almost had the web based GUI working until my laptop went south.

Please please let me know if there is any new release for a WebREPL I can use to write code for the ESP32.

I just don’t understand why the open source community didn’t just make a SSH client to connect to the ESP32 via a simple network connection using OpenSSH or SFTP. But I’m sure there is a reason why, I just haven’t found it yet,

John D.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 access via Ipad

Post by Roberthh » Sat Oct 05, 2019 6:47 pm

I do not have an iPad, so I can only look at he Internet. And I find USB OTG adapters. Maybe there is one for your device.
Instead of Webrepl, you may use telnet. There is a telnet implementation, made by @chrisgp, which works on ESP32.
You may also try a different firmware branch of Micropython, that of PyCom. They have a device called WiPy, which is more or less a plain vanilla ESP32 model. Their firmware has telnet and ftp included by default. That may be an option, since telnet apps seems to be available for IOS.
Yes it's a little bit laborious to connect devices so far apart in matters of user convenience and available interfaces.

P.S.: Pycom offers devices with LoRa, LoRaWAN and a mesh network. The problem with their products is, that they seem to have ideas for shiny new products before the existing ones get sound robustness. But they use the Python engine from this branch, and that works well.

jdcrunchman
Posts: 17
Joined: Wed Jun 19, 2019 8:17 pm

Re: ESP32 access via Ipad

Post by jdcrunchman » Sat Oct 05, 2019 6:53 pm

Rpr - I’m responding to your post... you are right about the need for a usb connection, but that’s impossible because the iPad can only use the wifi to access the ESP32.

Rpr- in your post you must be referencing using the WebREPL, but this is ONLY for the ESP8266 and not the ESP32.

But if there was something really recently published that solves this issue, I sure would like a link to the article. But I’ve seen nothing that was posted recently about this issue.

Dustin- in your post, you asked what iPad it is, It shouldn’t matter because it’s just a web based access, which is fine with me.

When I had my Mac working, I would use the USBToTTY cable and Atom IDE using PyMakr. But now all I have is my iPad mini. On it, I installed a term program, SFTP client, and Pythonista. But none of this allows me to make just the simplest Network connection to the ESP32 like using a SSH client to connect to the ESP32.

So, “npr “ if you found a document showing how to WebREPL into an actual ESP32 and not an ESP8266, I sure can use the link, But what you wrote in your previous comment, I’m just not sure it’s complete enough for me to do this.

John

jdcrunchman
Posts: 17
Joined: Wed Jun 19, 2019 8:17 pm

Re: ESP32 access via Ipad

Post by jdcrunchman » Sat Oct 05, 2019 7:09 pm

Roberthh- the iPad does not have a usb interface. It uses WiFi exclusively to connect to foreign devices. But the ESP32 does have an on-board WiFi support, it’s just that nobody bothered or didn’t think we would have a need to SSH into the device, or to have a SSH server on it, but me thinks this might be due to the limited amount of workable memory.

All I know is about the MicroPython installed on it, but one would think it might not be a big deal to come up with an SSH server that can run on MicroPython.

If there is a MicroPython implementation to allow me to SSH into it, that would be epic. But the task at hand seems to be a low priority in the MicroPython community, but with it being out for more then a year, I’m surprised nobody took on this challenge, Like the wonderful people in France that wrote microwebsrv did a good job.

We need a simple way of telnetting into the ESP32 and being able to use LibTerm, an iPad terminal app that seems might work, but I can’t even get a “pip” to install on it.

I’m sure there are zillions of reasons why this hasn’t been done, but sure would like to know some of the reaasons.

John

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 access via Ipad

Post by Roberthh » Sat Oct 05, 2019 7:18 pm

Hello John. I do not know what you tested, but I just started Webrepl on my ESP32. it simply works. You may have to update your ESP32 to the recent firmware version.

P.S.: Webrepl for ESP32 was enabled on Apr 27, 2018

rpr
Posts: 99
Joined: Sat Oct 27, 2018 5:17 pm

Re: ESP32 access via Ipad

Post by rpr » Sat Oct 05, 2019 10:27 pm

Indeed, I use webrepl on my esp32. Works just fine. There is no way around setting it up the first time using a direct USB/serial connection.

Edit to add: there is also telnet server for micropython. Not much experience with it.

Post Reply