Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2.00.00

The µC/FTPc module has to be configured according to your specific needs. A template Template configuration file files (ftp-c_cfg.c/h) is are included in the module package (see section Directories and Files), and this configuration should be copied into your application directory and included to your project.

Micriµm provides sample configuration code free of charge; however, most sample code will likely require modifications depending on specific feature requirements and memory limitation.

There are two groups of configuration parameters: the compile-time and the run-time configuration.

Compile-Time Configuration

Here is the list of the values and description of each of the configuration variable. However, keep in mind that future releases of this module might include more configuration options.Control Connection

File System Configuration

...

ConstantDescriptionPossible Values
FTPc_CFG_CTRL_MAX_CONN_TIMEOUT_MSUSE_FSThis value define the timeout value (in milliseconds) for control and data transfer sockets. If the server doesn’t reply back in this amount of time after a request, the request will be aborted.

Unsigned Integer

Default Value: 5000

FTPc_CFG_CTRL_MAX_RX_TIMEOUT_MS 

Unsigned Integer

Default Value: 5000
FTPc_CFG_CTRL_MAX_TX_TIMEOUT_MS 

Unsigned Integer

Default Value: 5000
FTPc_CFG_CTRL_MAX_TX_RETRYThis value define the maximum number of retries when a request fails before returning an error to the application.

Unsigned Integer

Default Value: 3

FTPc_CFG_CTRL_MAX_RX_DLY_MSThis value define the delay between each retry.

Unsigned Integer

Default Value: 100
FTPc_CFG_CTRL_MAX_TX_DLY_MSThis value define the delay between each retry.

Unsigned Integer

Default Value: 100

 

Data Connection Configuration

ConstantDescriptionPossible Values
FTPc_CFG_DTP_MAX_CONN_TIMEOUT_MSThis value define the timeout value (in milliseconds) for control and data transfer sockets. If the server doesn’t reply back in this amount of time after a request, the request will be aborted.

Unsigned Integer

Default Value: 5000
FTPc_CFG_DTP_MAX_RX_TIMEOUT_MS 

Unsigned Integer

Default Value: 5000
FTPc_CFG_DTP_MAX_TX_TIMEOUT_MS 

Unsigned Integer

Default Value: 5000
FTPc_CFG_DTP_MAX_TX_RETRYThis value define the maximum number of retries when a request fails before returning an error to the application.

Unsigned Integer

Default Value: 3
FTPc_CFG_DTP_MAX_TX_DLY_MSThis value define the delay between each retry.

Unsigned Integer

Default Value: 100

#define FTPc_CFG_USE_FS 1

This value controls the integration between µC/FTPc and µC/FS. If value is 1, functions using µC/FS are compiled and enabled. If value is 0, no File System functions are available to the application.

#define FTPc_CFG_COMMON_NAME_MAX_LEN 256

This values define the maximum length of the secure configuration’s common name.

controls the integration between µC/FTPc and a FS. If value is DEF_ENABLED, functions using the FS Abstraction Layer Interface functions are compiled and enabled. If value is DEF_DISABLED, no File System functions are available to the application.DEF_ENABLED or DEF_DISABLED

 

Runtime-Time Configuration

µC/FTPc has a internal default configuration, but if you wish to modify some parameters of the configuration, a run-time configuration must be passed during the initialization. FTPc run-time configuration template file is provided (see Directories and Files). The run-time configuration template file  (ftp-c_cfg.c ) should be copied into the application folder and modified as per individual project requirements.

Code Block
const  FTPc_CFG  FTPc_Cfg = {
/*
*--------------------------------------------------------------------------------------------------------
*                                    CTRL CONNECTION CONFIGURATION
*--------------------------------------------------------------------------------------------------------
*/
        5000u,                                                  /* Maximum inactivity time (ms) on CONNECT.             */
        5000u,                                                  /* Maximum inactivity time (ms) on RX.                  */
        5000u,                                                  /* Maximum inactivity time (ms) on TX.                  */
        100u,                                                   /* Delay between each retries on RX.                    */
        3u,                                                     /* Maximum number of retries on TX.                     */
        100u,                                                   /* Delay between each retries on TX.                    */

/*
*--------------------------------------------------------------------------------------------------------
*                                     TDTP CONNECTION CONFIGURATION
*--------------------------------------------------------------------------------------------------------
*/
        5000u,                                                  /* Maximum inactivity time (ms) on CONNECT.             */
        5000u,                                                  /* Maximum inactivity time (ms) on RX.                  */
        5000u,                                                  /* Maximum inactivity time (ms) on TX.                  */
        3u,                                                     /* Maximum number of retries on TX.                     */
        100u                                                    /* Delay between each retries on TX.                    */
};