FTP server example. More...
#include <BoardSupport/inc/stdtypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <inttypes.h>
#include <time.h>
#include <string.h>
#include <Libs/NETlib/net.h>
#include <Libs/NETlib/ftplib.h>
#include <BoardSupport/inc/BoardSpecific.h>
#include <Common/Common.h>
#include <Common/uartio.h>
#include <Common/timer.h>
#include <Common/CPrintf.h>
#include <BoardSupport/config/netconfig.c>
#include "efs.def"
Functions | |
uint16_t | FTP_CheckClients (void) |
void | FTP_PrintResult (ftp_return_type *ftp_ret) |
int | main (void) |
Variables | |
char * | program_name = "FTP-server" |
char * | _datetime = __DATE__" "__TIME__ |
uint32_t | boot_address = 0 |
_ _ _ __| | ___(_) ____ _ __ | |_ / _` | / __| |/ _` | '_ \| __| | (_| | _ \__ \ | (_| | | | | |_ \__,_|(_) ___/_|\__, |_| |_|\__| Signalprocessing |___/ Technology
This program acts as a FTP server (port 21) with either fix IP 192.168.168.200 (configurable in netconfig.c) or DHCP assigned address (e.g. 192.168.168.143, host name mydemo).
To verify this program, first 'ping' the DSP:
>ping 192.168.168.200
or, if configured for DHCP
>ping mydemo
If the settings and network connections are correct, the pings will be replied.
In this application 3 users are configured for FTP access:
user: admin password: xxxx user: guest password: - user: anonymous password: -
Use a FTP client to access the configured directories. Examples for defining users, directories and files are shown below.
Dedicated FTP clients (like FileZilla or WsFTP) allow to configure different users and different passwords. Opposed to that kind of clients the browser built-in clients allow to configure only one account (usually the anonymous or guest account). Use the following address in your browser to access this server as admin:
ftp://admin@192.168.168.200
or
ftp://admin@mydemo
enter in the new opened dialogue window the admin password 'xxxx' to access the FTP server.
Important note for F28xx users: activate compiler define "USE_FLASH_API" for this application, otherwise FLASH uploads wont be possible.
uint16_t FTP_CheckClients | ( | void | ) |
void FTP_PrintResult | ( | ftp_return_type * | ftp_ret | ) |
int main | ( | void | ) |
char* program_name = "FTP-server" |
char* _datetime = __DATE__" "__TIME__ |
uint32_t boot_address = 0 |