Skip to content

FTP server implementation using littlefs filesystem with Wi-Fi link for WFI32-IoT board

License

Notifications You must be signed in to change notification settings

MicrochipTech/PIC32MZW1_LittleFS_over_FTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

https://www.microchip.com/

FTP Server using littlefs File System for WFI32-IoT board

Introduction

This MPLAB Harmony application demonstrates FTP server using littlefs file system - A little fail-safe file system. The WFI32-IoT board will boot-up in SoftAP mode, with an AP name 'DEMO_AP_SOFTAP' and will host FTP Server. This application uses SST26 memory module available on WFI32-IoT board as SPI Flash. This FTP server stores files on SST26 memory using littlefs and FTP client will read from and write to this memory.

Hardware Requirements

Software Requirements

Application configuration with MHC

  • MHC is launched by selecting Tools > Embedded > MPLAB® Harmony 3 Configurator from the MPLAB X IDE. The list of MHC components used in this application is as below:

  • The following 'Project Graph' diagrams show the linking in between MHC components used in the application.

    • Root Layer Project Graph:
    • System Configuration Project Graph:

The application uses littlefs-FS over FTP server to store files on SST26 SPI flash memory using Memory driver instance 0, SST26 driver, and SPI peripheral library module as shown in the Root project graph.

  • Configuration options for the components used in this project are as below:

Setting up WFI32-IoT board

  • Connect the Debug USB port on the board to the computer using a micro USB cable

Running the Application

  • Open the project and launch Harmony3 configurator
  • Enable AP mode and configure softAP credentials from WIFI Service MHC configuration options
  • Save this configuration and generate code for USER_RECENT merge strategy via MHC. Please ignore all suggestions for code removel, from the merge window
  • Build and program the generated code into the hardware using its IDE
  • Open the Terminal application on the computer
  • Connect to the "USB to UART" COM port and configure the serial settings as follows:
    • Baud : 115200
    • Data : 8 Bits
    • Parity : None
    • Stop : 1 Bit
    • Flow Control : None
  • Device will boot-up in softAP mode and will display the softAP mode IP address
  • Now, try to connect laptop/phone (the device you will be running FTP client on) with the softAP
  • Once the WiFi station(STA) device is connected to AP, its MAC and IP address will be displayed on the terminal app as below:

  • Establish FTP server-client connection and verify basic FTP commands such as put, get, mkdir, rmdir, delete, ls, cd, pwd as below:

Note/Known issues:

  1. After re-generating code via MHC, please check if pragma defined for High Speed SPI is enabled, in initialization.c file
    • #pragma config HSSPIEN = ON
  2. As of now, there's no user authentication method set. So, any FTP client can access the files hosted by FTP server. Please check if the variable authRes is set to true in firmware/src/config/../library/tcpip/src/ftp.c file
    • bool authRes = true;

About

FTP server implementation using littlefs filesystem with Wi-Fi link for WFI32-IoT board

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published