7335 views|3 replies

113

Posts

0

Resources
The OP
 

[micropython tutorial] {ESP32} Using FTP for file synchronization in MicroPython [Copy link]

 This post was last edited by 47857872 on 2018-6-14 11:57 Currently, most ESP32 modules on the market communicate with PCs through the virtual serial port of CP2012. Therefore, the file upload and download in ESP32 is highly dependent on small software such as uPyLoader. The principle is to run a file operation program in ESP32 to communicate with the computer through the serial port. Here I will introduce another method, which is to use the network communication function of ESP to connect to wifi and use the FTP method for communication. (Actually, I have to use FTP, because after recording relatively large test data, uPyLoader cannot read large files. I recorded the files for two days and the size is close to 1MB...) First, you need to flash the updated firmware below, which is based on loboris. I usually only use ftpsvr websvr telnetsvr and other functions. I have used them for general purposes. The update method is a little different from the official firmware, you need to: 1. erase flash 2. esptool.exe --chip esp32 --port COM8 --baud 921600 --before default_reset --after no_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader/bootloader.bin 0xf000 phy_init_data.bin 0x10000 MicroPython.bin 0x8000 partitions_mpy.bin Or use ESPFlashDownloadTool 12, 01, 01, 12, 12, 12)) rtc.ntp_sync(server= "", rst = machine.rtc() rtc.init((2018, 01, 01, 12, 12, 12)) rtc.ntp_sync(server= "", rst.init((2018, 01, 01, 12, 12, 12)) rtc.ntp_sync(server= "", rst.init((2018, 01, 01, 12, 12, 12)) rtc.ntp_sync(server= "", rst.init((2018, 01, 01, 12, 12, 12)) rtc.ntp_sync(server= "", tz=my_timezone, update_period=3600) time.sleep(5) print(rtc.now()) network.ftp.start(user="micro", password="python", buffsize=1024, timeout=300) network.telnet.start(user="micro", password="python", timeout=300) print("IP of this ESP32 is : " + sta_if.ifconfig()[0]) [/code] These two are programs. There is no psRAM in the general node esp32, so just use the first one MicroPython_LoBo_esp32_all.zip (1.13 MB, downloads: 75) MicroPython_LoBo_esp32_psram_all.zip (1.18 MB, downloads: 43)


Latest reply

Is there any detailed information about this firmware?  Details Published on 2018-8-20 19:30

赞赏

1

查看全部赞赏

 
 

1903

Posts

0

Resources
2
 
Learned
 
 
 

1w

Posts

25

Resources
3
 
You can make a micro FTP server.
 
 
 

6

Posts

0

Resources
4
 
Is there any detailed information about this firmware?
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list