Need help to download file from ESP32 over console or other UART

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Need help to download file from ESP32 over console or other UART

Postby Ritesh » Wed Feb 28, 2018 6:59 pm

Hi,

We have one requirement in which there is SPIFFS file system is being supported into ESP32.

Now, we need to download that file from ESP32 to device to any PC over console UART or any other UART bases on CLI implementation.

We have tried to port xmodem for that but we are right now facing some issues like hang or stuck while using it with SPIFFS.

Let me Kno if anyone has used any tool or something like that.
Regards,
Ritesh Prajapati

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need help to download file from ESP32 over console or other UART

Postby loboris » Wed Feb 28, 2018 7:22 pm

A long time ago I have implemented ymodem protocol for the file transfer over UART.
Look at ESP32_ymodem_example.

The repository was not updated for a long time, maybe some changes are needed for the latest esp-idf.

The transfer was working quite reliably, both download and upload is supported.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to download file from ESP32 over console or other UART

Postby Ritesh » Thu Mar 01, 2018 1:51 am

loboris wrote:A long time ago I have implemented ymodem protocol for the file transfer over UART.
Look at ESP32_ymodem_example.

The repository was not updated for a long time, maybe some changes are needed for the latest esp-idf.

The transfer was working quite reliably, both download and upload is supported.
Hi Loboris,

Did you test it recently over ESP32 IDF 2.1 or 2.1.1 or 3.0 RC1?

Also, Upto how much size of file you had verified it for both upload and download?

If you get sometime from your side then would you.please confirm from your side?

Meanwhile I will verify it from my side as well and will inform to you if any changes required
Regards,
Ritesh Prajapati

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need help to download file from ESP32 over console or other UART

Postby loboris » Thu Mar 01, 2018 10:56 am

I have updated the repository to work with the latest esp-idf.

Tested with esp-idf master branch and esp-idf release/v3.0 branch.

Tested with 800 KB binary file for download/upload (SPIFFS was formated to 1 MB), with UART at 115200 bd.
Tested with 1.5 MB binary file for download/upload (SPIFFS was formated to 2 MB), with UART at 921600 bd.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to download file from ESP32 over console or other UART

Postby Ritesh » Fri Mar 02, 2018 2:42 am

loboris wrote:I have updated the repository to work with the latest esp-idf.

Tested with esp-idf master branch and esp-idf release/v3.0 branch.

Tested with 800 KB binary file for download/upload (SPIFFS was formated to 1 MB), with UART at 115200 bd.
Tested with 1.5 MB binary file for download/upload (SPIFFS was formated to 2 MB), with UART at 921600 bd.
Hi Loboris,

Thanks for quick update.

I will check and get back to you with results as soon as possible.

I have one question like will it also worked with direct SPI Flash API without using SPIFFS file system?
Regards,
Ritesh Prajapati

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need help to download file from ESP32 over console or other UART

Postby loboris » Fri Mar 02, 2018 8:27 am

Ritesh wrote:
loboris wrote:I have one question like will it also worked with direct SPI Flash API without using SPIFFS file system?
It should't be hard to modify it this way. You will need to change file related functions with SPI Flash API related calls in ymodem.c/ymodem.h

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to download file from ESP32 over console or other UART

Postby Ritesh » Fri Mar 02, 2018 10:07 am

loboris wrote:
Ritesh wrote:
loboris wrote:I have one question like will it also worked with direct SPI Flash API without using SPIFFS file system?
It should't be hard to modify it this way. You will need to change file related functions with SPI Flash API related calls in ymodem.c/ymodem.h
Ok.

Thanks again for quick response.

I will check with SPI Flash Raw API and get back to you with results for both Flash and SPIFFS for ymodem.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Baidu [Spider], hugerobber, Tomatendose and 87 guests