Giter VIP home page Giter VIP logo

Comments (9)

loboris avatar loboris commented on August 26, 2024

uftpserver was updated.
FEAT response is now 502. Please test.

from micropython_esp32_psram_lobo.

Liberasys avatar Liberasys commented on August 26, 2024

Test KO, same comportment as before

220 Micropython FTP Server
FEAT
332
AUTH TLS
332

On : MicroPython ESP32_LoBo_v3.1.13 - 2017-01-28 on ESP32 board with ESP32
With : git pull, ./BUILD.sh clean, make, flash
(code update is present : ftp_send_reply(211, "no-features");)
Maybe I am missing something ?

from micropython_esp32_psram_lobo.

loboris avatar loboris commented on August 26, 2024

Sorry, I thought you were talking about uftpserver frozen module.
I forgot to fix it also in the integrated ftp server, I'll commit the fix in a couple of hours.

from micropython_esp32_psram_lobo.

Liberasys avatar Liberasys commented on August 26, 2024

Wohooo, I didn't known that you integrated uftpserver as frozen module... :-)
Thus there are 2 codes for FTP server ?
I think I use integrated FTP server :

def start_ftp_server():
    import network
    if network.ftp.start(user="micro", password="python", buffsize=1024, timeout=300):
        print("FTP server started")
        return True
    else:
        print("Error while starting FTP server")
        return False

Is there an interest with having your integrated FTP server plus uftpserver frozen module ?

Other question for MicroWebServer : does the menuconfig option websocket server enables MicroWebSocket.py or an other code you wrote ?

from micropython_esp32_psram_lobo.

loboris avatar loboris commented on August 26, 2024

There is no real need for the uftpserver frozen module, it was left from before the network.ftp service was implemented.
It is a good example of how relatively complex Python module can work in threads, so I should probably move it to examples folder and exclude from frozen modules.

"Use Websockets" menuconfig option includes the websocket module into build. It is not needed for MicroWebServer nor MicroWebSocket

By the way, I didn't wrote MicroWebServer, as mentioned in the Wiki.
I've only adapted it for this MicroPython specific thread implementation.

I'm planing to implement a C-based WebServer service similar to how ftp and Telnet are implemented.

from micropython_esp32_psram_lobo.

Liberasys avatar Liberasys commented on August 26, 2024

It is a good example of how relatively complex Python module can work in threads, so I should probably move it to examples folder and exclude from frozen modules.

Yes, ideed, it's a good idea I think

"Use Websockets" menuconfig option includes the websocket module into build. It is not needed for MicroWebServer nor MicroWebSocket

OK

By the way, I didn't wrote MicroWebServer, as mentioned in the Wiki.
I've only adapted it for this MicroPython specific thread implementation.

Yes and I was speaking by mail with Jean-Christophe (author of MicroWebSrv) the WE, who kindly answered my newbie questions :-)

I'm planing to implement a C-based WebServer service similar to how ftp and Telnet are implemented.

Great :-)

from micropython_esp32_psram_lobo.

Liberasys avatar Liberasys commented on August 26, 2024

It is strange... I saw your changes in code.
I did a git pull, BUILD.sh clean, j4, flash.
Version on ESP32 is MicroPython ESP32_LoBo_v3.1.14 - 2017-01-29 on ESP32 board with ESP32
But I still get the problem. Do you have an idea ?

220 Micropython FTP Server
FEAT
332
AUTH TLS
332

from micropython_esp32_psram_lobo.

loboris avatar loboris commented on August 26, 2024

The error was caused by lftp issuing FEAT before login, which was not handled correctly in ftp server.
I've fixed it now and will commit soon.

You can disable FEAT in lftp and it should work with current version.
set ftp:use-feat no
You shoud also disable SSL, not to try to establish TSL connection:
set ftp:ssl-allow no

boris@UbuntuMate:$ lftp -d -u micro,python 192.168.0.16
---- Resolving host address...
---- 1 address found: 192.168.0.16
lftp [email protected]:~> set ftp:use-feat no
lftp [email protected]:~> set ftp:ssl-allow no
lftp [email protected]:~> ls
---- Connecting to 192.168.0.16 (192.168.0.16) port 21
<--- 220 Micropython FTP Server
---> USER micro
<--- 331 
---> PASS python
<--- 230 
---> PWD
<--- 257 /
---> PASV
<--- 227 (192,168,0,16,7,232)
---- Connecting data socket to (192.168.0.16) port 2024
---- Data connection established
---> LIST
<--- 150 
drw-rw-r--   1 root  root         0 Jan 29 2018 flash
---- Got EOF on data connection
---- Closing data socket
<--- 226 
lftp [email protected]:~> ls /flash
---> PASV
<--- 227 (192,168,0,16,7,232)
---- Connecting data socket to (192.168.0.16) port 2024
---- Data connection established              
---> LIST /flash
<--- 150 
drw-rw-r--   1 root  root         0 Jan 29 2018 flash
---- Got EOF on data connection
---- Closing data socket
<--- 226 
---- Closing idle connection
---> QUIT
<--- 221 
---- Closing control socket
lftp [email protected]:~> 

from micropython_esp32_psram_lobo.

Liberasys avatar Liberasys commented on August 26, 2024

You can disable FEAT in lftp and it should work with current version.
set ftp:use-feat no
You shoud also disable SSL, not to try to establish TSL connection:
set ftp:ssl-allow no

Indeed, -e "set ftp:use-feat no' should do the job.
But being compliant with RFCs is better :-)

Anyway, thanks again Boris ! :-)

from micropython_esp32_psram_lobo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.