MicroPython on ESP32 with SPIRAM support
Re: MicroPython on ESP32 with SPIRAM support
Get the ESP32 onto your local wifi network as a client (not an access point). You will need to know the IP address of the device on your network, you can get that with wlan.ifconfig(). Then telnet to that address.
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
Ok I connected to my router and now it gets a little further.
I get this from FileZilla
Status: Connecting to 192.168.1.109:23...
Status: Connection established, waiting for welcome message...
Response: MicroPython ESP32_LoBo_v2.0.8 - 2017-11-04 on ESP32 board with ESP32
Error: Could not connect to server
But if I try the program called PuTTy then it will connect but as far as I know I can't transfer files via putty program I can just type lines of code for the python prompt
PuTTy program I just give it the IP address then after it connects it asks for user and password, maybe it is a case of how WinSCP and FileZilla is trying to loggin in with user and password??
I tried turning off windows firewall to see if that made any difference but it didn't.
I get this from FileZilla
Status: Connecting to 192.168.1.109:23...
Status: Connection established, waiting for welcome message...
Response: MicroPython ESP32_LoBo_v2.0.8 - 2017-11-04 on ESP32 board with ESP32
Error: Could not connect to server
But if I try the program called PuTTy then it will connect but as far as I know I can't transfer files via putty program I can just type lines of code for the python prompt
PuTTy program I just give it the IP address then after it connects it asks for user and password, maybe it is a case of how WinSCP and FileZilla is trying to loggin in with user and password??
I tried turning off windows firewall to see if that made any difference but it didn't.
Re: MicroPython on ESP32 with SPIRAM support
You wouldn't be able to transfer files with telnet anyways. Or with putty for that matter, but it sounds like you are able to get a repl prompt so that is good.
On my Windows machine I run Cygwin in a terminal window, have python installed, have ampy installed, and I can use that to transfer files to the ESP32. To run code there I have to use putty or some other terminal emulator to get a repl prompt through the USB/serial connection.
But I also have a Linux Ubuntu computer and on that I am using rshell, it is very much more convenient. You must have a repl prompt established on the USB/serial port in order to run it (verify with putty). With rshell I can list and manipulate files on the ESP32 at will, and simply copy files to or from there from any directory on the Linux machine. Also can get the repl prompt and execute code as needed. Easily move back and forth between repl prompt and local machine prompt, it is the way to go for sure.
On my Windows machine I run Cygwin in a terminal window, have python installed, have ampy installed, and I can use that to transfer files to the ESP32. To run code there I have to use putty or some other terminal emulator to get a repl prompt through the USB/serial connection.
But I also have a Linux Ubuntu computer and on that I am using rshell, it is very much more convenient. You must have a repl prompt established on the USB/serial port in order to run it (verify with putty). With rshell I can list and manipulate files on the ESP32 at will, and simply copy files to or from there from any directory on the Linux machine. Also can get the repl prompt and execute code as needed. Easily move back and forth between repl prompt and local machine prompt, it is the way to go for sure.
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
my main thing is my robots r mobile running on batteries so I am hoping to cut the cord. With ESP8266 I could use WebRepl and with RPi I use WinSCP.
So far for ESP32 I have been using ampy and PuTTy serial.
I was hoping to be able to transfer files wireless using FTP. On Ubuntu I did connect successfully to the ESP32 usinf command fpt 192.169.1.109 and enter user/password and although it connected it wouldn't transfer files.
I am hoping using something like WinSCP or FileZilla to be able to both run a wireless repl over Telnet and wireless file transfer over ftp
And yes successful wireless repl using telnet with PuTTY
So far for ESP32 I have been using ampy and PuTTy serial.
I was hoping to be able to transfer files wireless using FTP. On Ubuntu I did connect successfully to the ESP32 usinf command fpt 192.169.1.109 and enter user/password and although it connected it wouldn't transfer files.
I am hoping using something like WinSCP or FileZilla to be able to both run a wireless repl over Telnet and wireless file transfer over ftp
And yes successful wireless repl using telnet with PuTTY
Re: MicroPython on ESP32 with SPIRAM support
As far as I know there is no problem with telnet and ftp connection.OutoftheBOTS_ wrote: ↑Sun Dec 31, 2017 6:41 am...
I am hoping using something like WinSCP or FileZilla to be able to both run a wireless repl over Telnet and wireless file transfer over ftp ...
For wireless file transfer you can use ftp server.
The best ftp client to use is FileZilla, you must configure it as shown in the documentation (don't forget to enter user name and password).
For wireless REPL connection you can use telnet server.
For Telnet connection, you can use Putty configured for telnet mode, you can also configure the desired window size:
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
I have repl working properly using PuTTY but are unable to get ftp working using filezilla.
I ran this line of code and it returned true network.ftp.start(user="micro",password="python",buffsize=1024,timeout=300)
I have the filezilla settings exactly as in the docs, this is the response filezilla gives me.
Status: Connecting to 192.168.1.109:23...
Status: Connection established, waiting for welcome message...
Response: MicroPython ESP32_LoBo_v2.0.8 - 2017-11-04 on ESP32 board with ESP32
Error: Could not connect to server
I have tried filezilla from both my windows computer and my Ubuntu computer and both had same result so it isn't a Windows firewall problem
I ran this line of code and it returned true network.ftp.start(user="micro",password="python",buffsize=1024,timeout=300)
I have the filezilla settings exactly as in the docs, this is the response filezilla gives me.
Status: Connecting to 192.168.1.109:23...
Status: Connection established, waiting for welcome message...
Response: MicroPython ESP32_LoBo_v2.0.8 - 2017-11-04 on ESP32 board with ESP32
Error: Could not connect to server
I have tried filezilla from both my windows computer and my Ubuntu computer and both had same result so it isn't a Windows firewall problem
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
from linux I ran ftp -p 192.168.1.109 then typed in the user and password and got this respoce
Remote system type is UNIX.
Using binary mode to transfer files.
I then typed ls and got this respoce
ftp> ls
227 (192,168,1,109,7,232)
150
drw-rw-r-- 1 root root 0 Jan 01 1970 flash
226
edit
seems if I type cd flash then it takes me to the flasdh directory and all is good see the responce
ftp> cd flash
250
ftp> ls
227 (192,168,1,109,7,232)
150
-rw-rw-r-- 1 root root 113 Jan 01 00:00 boot.py
-rw-rw-r-- 1 root root 152 Jan 01 00:00 blink.py
-rw-rw-r-- 1 root root 270 Jan 01 00:00 main.py
-rw-rw-r-- 1 root root 230456 Jan 01 00:03 bots.bmp
-rw-rw-r-- 1 root root 49760 Jan 01 00:06 bots.jpg
226
So it seems the ftp is working from the ESP32 end it is just that I can't get filezilla to work on either windows or linux
Remote system type is UNIX.
Using binary mode to transfer files.
I then typed ls and got this respoce
ftp> ls
227 (192,168,1,109,7,232)
150
drw-rw-r-- 1 root root 0 Jan 01 1970 flash
226
edit
seems if I type cd flash then it takes me to the flasdh directory and all is good see the responce
ftp> cd flash
250
ftp> ls
227 (192,168,1,109,7,232)
150
-rw-rw-r-- 1 root root 113 Jan 01 00:00 boot.py
-rw-rw-r-- 1 root root 152 Jan 01 00:00 blink.py
-rw-rw-r-- 1 root root 270 Jan 01 00:00 main.py
-rw-rw-r-- 1 root root 230456 Jan 01 00:03 bots.bmp
-rw-rw-r-- 1 root root 49760 Jan 01 00:06 bots.jpg
226
So it seems the ftp is working from the ESP32 end it is just that I can't get filezilla to work on either windows or linux
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
Ok I don't know what has changed but filezilla will now login to ESP32 and I can transfer files to the esp32 wireless now
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
Ok I now have filezilla setup so that I can edit the py files on the esp32 board with my preferred editor using ftp and I can get a wifi repl prompt with putty using telnet.
Now I just have 1 problem left. It seems that to run a py file that I have edited I have to import it but then if I edit it again I can't import it a second time and that I have to reset the board to import the py file again and this ends the putty telnet session.
Is there away way that I can edit the py file then re run the file without having to reset the board?? like import it again every time I edit it?? or some other way of executing a py file from repl or ftp
Now I just have 1 problem left. It seems that to run a py file that I have edited I have to import it but then if I edit it again I can't import it a second time and that I have to reset the board to import the py file again and this ends the putty telnet session.
Is there away way that I can edit the py file then re run the file without having to reset the board?? like import it again every time I edit it?? or some other way of executing a py file from repl or ftp
Re: MicroPython on ESP32 with SPIRAM support
@OutoftheBOTS_
You can try to delete the module, then import it again:
You can try to delete the module, then import it again:
Code: Select all
>>> dir()
['sys', '__name__']
>>> import machine, micropython, display
>>> dir()
['sys', 'machine', '__name__', 'micropython', 'display']
>>> del display
>>> dir()
['sys', 'machine', '__name__', 'micropython']
>>>
>>> import display
>>> dir()
['sys', 'machine', '__name__', 'micropython', 'display']
>>>