This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FTP support for nrf9160

i want to start evaluating FTP client in nrf9160 SoC.  Can you provide an example code for FTP client mode. 

  • Hi Martin,

    if i run FTP Clint Sample project with master branch zephry base i am getting an debug print message as as Client_fd = -1; Maybe socket is not created. See below log for details.

    2020-05-21T10:45:05.410Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
    2020-05-21T10:45:05.412Z DEBUG modem << SPM: NS MSP at 0x20023c78\x0D\x0A
    2020-05-21T10:45:05.412Z DEBUG modem << SPM: NS reset vector at 0xde99\x0D\x0A
    2020-05-21T10:45:05.413Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
    2020-05-21T10:45:07.253Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1-2956-g9bab3a84b642 ***\x0D\x0A
    2020-05-21T10:45:09.175Z DEBUG modem << FTP example\x0D\x0A\x0D
    2020-05-21T10:45:09.179Z DEBUG modem << client_fd: -1\x0D\x0D\x0A

    Then i moved zephry base to 1.2.0 branch. I found that above error message is not shown i thing socket is created. I am attaching log more more details.

    2020-05-21T10:55:56.800Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
    2020-05-21T10:55:56.824Z DEBUG modem << Flash region\x09\x09Domain\x09\x09Permissions\x0D
    2020-05-21T10:55:56.827Z DEBUG modem << 00 0x00000 0x08000 \x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.831Z DEBUG modem << 01 0x08000 0x10000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.834Z DEBUG modem << 02 0x10000 0x18000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.837Z DEBUG modem << 03 0x18000 0x20000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.842Z DEBUG modem << 04 0x20000 0x28000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.845Z DEBUG modem << 05 0x28000 0x30000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.848Z DEBUG modem << 06 0x30000 0x38000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.851Z DEBUG modem << 07 0x38000 0x40000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.853Z DEBUG modem << 08 0x40000 0x48000 \x09Non-Secure\x09rwxl\x0D
    2020-05-21T10:55:56.857Z DEBUG modem << 09 0x48000 0x50000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.860Z DEBUG modem << 10 0x50000 0x58000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.863Z DEBUG modem << 11 0x58000 0x60000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.866Z DEBUG modem << 12 0x60000 0x68000 \x09Non-Secure\x09rwxl\x0D
    2020-05-21T10:55:56.869Z DEBUG modem << 13 0x68000 0x70000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.875Z DEBUG modem << 14 0x70000 0x78000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.878Z DEBUG modem << 15 0x78000 0x80000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.880Z DEBUG modem << 16 0x80000 0x88000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.883Z DEBUG modem << 17 0x88000 0x90000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.886Z DEBUG modem << 18 0x90000 0x98000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.889Z DEBUG modem << 19 0x98000 0xa0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.894Z DEBUG modem << 20 0xa0000 0xa8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.897Z DEBUG modem << 21 0xa8000 0xb0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.899Z DEBUG modem << 22 0xb0000 0xb8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.902Z DEBUG modem << 23 0xb8000 0xc0000 \x09Non-Secure\x09rwxl\x0D
    2020-05-21T10:55:56.905Z DEBUG modem << 24 0xc0000 0xc8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.908Z DEBUG modem << 25 0xc8000 0xd0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.912Z DEBUG modem << 26 0xd0000 0xd8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.915Z DEBUG modem << 27 0xd8000 0xe0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.918Z DEBUG modem << 28 0xe0000 0xe8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.921Z DEBUG modem << 29 0xe8000 0xf0000 \x09Non-Secure\x09rwxl\x0D
    2020-05-21T10:55:56.925Z DEBUG modem << 30 0xf0000 0xf8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.928Z DEBUG modem << 31 0xf8000 0x100000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:56.934Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.\x0D\x0A\x0D
    2020-05-21T10:55:57.105Z DEBUG modem << SRAM region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-05-21T10:55:57.110Z DEBUG modem << 00 0x00000 0x02000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.113Z DEBUG modem << 01 0x02000 0x04000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.117Z DEBUG modem << 02 0x04000 0x06000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.120Z DEBUG modem << 03 0x06000 0x08000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.123Z DEBUG modem << 04 0x08000 0x0a000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.125Z DEBUG modem << 05 0x0a000 0x0c000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.128Z DEBUG modem << 06 0x0c000 0x0e000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.132Z DEBUG modem << 07 0x0e000 0x10000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.135Z DEBUG modem << 08 0x10000 0x12000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.138Z DEBUG modem << 09 0x12000 0x14000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.140Z DEBUG modem << 10 0x14000 0x16000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.144Z DEBUG modem << 11 0x16000 0x18000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.149Z DEBUG modem << 12 0x18000 0x1a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.152Z DEBUG modem << 13 0x1a000 0x1c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.156Z DEBUG modem << 14 0x1c000 0x1e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.158Z DEBUG modem << 15 0x1e000 0x20000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.162Z DEBUG modem << 16 0x20000 0x22000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.165Z DEBUG modem << 17 0x22000 0x24000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.168Z DEBUG modem << 18 0x24000 0x26000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.170Z DEBUG modem << 19 0x26000 0x28000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.173Z DEBUG modem << 20 0x28000 0x2a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.175Z DEBUG modem << 21 0x2a000 0x2c000\x09Non-Secure\x09rwxl\x0D
    2020-05-21T10:55:57.178Z DEBUG modem << 22 0x2c000 0x2e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.181Z DEBUG modem << 23 0x2e000 0x30000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.184Z DEBUG modem << 24 0x30000 0x32000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.186Z DEBUG modem << 25 0x32000 0x34000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.189Z DEBUG modem << 26 0x34000 0x36000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.192Z DEBUG modem << 27 0x36000 0x38000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.195Z DEBUG modem << 28 0x38000 0x3a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.198Z DEBUG modem << 29 0x3a000 0x3c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T10:55:57.201Z DEBUG modem << 30 0x3c000 0x3e000\x09Non-Secure\x09rwxl\x0D
    2020-05-21T10:55:57.205Z DEBUG modem << 31 0x3e000 0x40000\x09Non-Secure\x09rwxl\x0D\x0A\x0D\x0A
    2020-05-21T10:55:57.207Z DEBUG modem << Peripheral\x09\x09Domain\x09\x09Status\x0D\x0A
    2020-05-21T10:55:57.210Z DEBUG modem << 00 NRF_P0               Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.214Z DEBUG modem << 01 NRF_CLOCK            Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.217Z DEBUG modem << 02 NRF_RTC0             Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.221Z DEBUG modem << 03 NRF_RTC1             Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.224Z DEBUG modem << 04 NRF_NVMC             Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.227Z DEBUG modem << 05 NRF_UARTE1           Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.231Z DEBUG modem << 06 NRF_UARTE2           Secure\x09\x09SKIP\x0D\x0A
    2020-05-21T10:55:57.234Z DEBUG modem << 07 NRF_TWIM2            Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.237Z DEBUG modem << 08 NRF_SPIM3            Non-Secure\x09OK\x0D
    2020-05-21T10:55:57.241Z DEBUG modem << 09 NRF_TIMER0           Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.245Z DEBUG modem << 10 NRF_TIMER1           Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.248Z DEBUG modem << 11 NRF_TIMER2           Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.251Z DEBUG modem << 12 NRF_SAADC            Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.254Z DEBUG modem << 13 NRF_PWM0             Non-Secure\x09OK\x0D
    2020-05-21T10:55:57.258Z DEBUG modem << 14 NRF_PWM1             Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.261Z DEBUG modem << 15 NRF_PWM2             Non-Secure\x09OK\x0D
    2020-05-21T10:55:57.265Z DEBUG modem << 16 NRF_PWM3             Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.268Z DEBUG modem << 17 NRF_WDT              Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.272Z DEBUG modem << 18 NRF_IPC              Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.275Z DEBUG modem << 19 NRF_VMC              Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.278Z DEBUG modem << 20 NRF_FPU              Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.282Z DEBUG modem << 21 NRF_EGU1             Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.285Z DEBUG modem << 22 NRF_EGU2             Non-Secure\x09OK\x0D
    2020-05-21T10:55:57.289Z DEBUG modem << 23 NRF_DPPIC            Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.292Z DEBUG modem << 24 NRF_GPIOTE1          Non-Secure\x09OK\x0D\x0A
    2020-05-21T10:55:57.296Z DEBUG modem << 25 NRF_REGULATORS       Non-Secure\x09OK\x0D\x0A\x0D\x0A
    2020-05-21T10:55:57.298Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
    2020-05-21T10:55:57.300Z DEBUG modem << SPM: NS MSP at 0x20023890\x0D\x0A
    2020-05-21T10:55:57.303Z DEBUG modem << SPM: NS reset vector at 0xcfd1\x0D\x0A
    2020-05-21T10:55:57.307Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
    2020-05-21T10:55:57.496Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
    2020-05-21T10:55:59.389Z DEBUG modem << FTP example\x0D\x0A\x0D
    2020-05-21T11:01:00.260Z DEBUG modem << recv_buf:\x0D\x0A
    2020-05-21T11:01:17.109Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D
    2020-05-21T11:01:17.148Z DEBUG modem << Flash region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-05-21T11:01:17.151Z DEBUG modem << 00 0x00000 0x08000 \x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.153Z DEBUG modem << 01 0x08000 0x10000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.156Z DEBUG modem << 02 0x10000 0x18000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.158Z DEBUG modem << 03 0x18000 0x20000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.161Z DEBUG modem << 04 0x20000 0x28000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.163Z DEBUG modem << 05 0x28000 0x30000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.165Z DEBUG modem << 06 0x30000 0x38000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.166Z DEBUG modem << 07 0x38000 0x40000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.207Z DEBUG modem << 08 0x40000 0x48000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.209Z DEBUG modem << 09 0x48000 0x50000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.210Z DEBUG modem << 10 0x50000 0x58000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.211Z DEBUG modem << 11 0x58000 0x60000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.212Z DEBUG modem << 12 0x60000 0x68000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.213Z DEBUG modem << 13 0x68000 0x70000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.214Z DEBUG modem << 14 0x70000 0x78000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.214Z DEBUG modem << 15 0x78000 0x80000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.215Z DEBUG modem << 16 0x80000 0x88000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.216Z DEBUG modem << 17 0x88000 0x90000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.216Z DEBUG modem << 18 0x90000 0x98000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.216Z DEBUG modem << 19 0x98000 0xa0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.217Z DEBUG modem << 20 0xa0000 0xa8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.218Z DEBUG modem << 21 0xa8000 0xb0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.219Z DEBUG modem << 22 0xb0000 0xb8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.219Z DEBUG modem << 23 0xb8000 0xc0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.251Z DEBUG modem << 24 0xc0000 0xc8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.253Z DEBUG modem << 25 0xc8000 0xd0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.254Z DEBUG modem << 26 0xd0000 0xd8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.304Z DEBUG modem << 27 0xd8000 0xe0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.306Z DEBUG modem << 28 0xe0000 0xe8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.307Z DEBUG modem << 29 0xe8000 0xf0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.308Z DEBUG modem << 30 0xf0000 0xf8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.308Z DEBUG modem << 31 0xf8000 0x100000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.308Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.\x0D\x0A\x0D\x0A
    2020-05-21T11:01:17.414Z DEBUG modem << SRAM region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-05-21T11:01:17.476Z DEBUG modem << 00 0x00000 0x02000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.528Z DEBUG modem << 01 0x02000 0x04000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.530Z DEBUG modem << 02 0x04000 0x06000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.532Z DEBUG modem << 03 0x06000 0x08000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.534Z DEBUG modem << 04 0x08000 0x0a000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.536Z DEBUG modem << 05 0x0a000 0x0c000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.538Z DEBUG modem << 06 0x0c000 0x0e000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.539Z DEBUG modem << 07 0x0e000 0x10000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.540Z DEBUG modem << 08 0x10000 0x12000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.542Z DEBUG modem << 09 0x12000 0x14000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.543Z DEBUG modem << 10 0x14000 0x16000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.544Z DEBUG modem << 11 0x16000 0x18000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.546Z DEBUG modem << 12 0x18000 0x1a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.547Z DEBUG modem << 13 0x1a000 0x1c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.548Z DEBUG modem << 14 0x1c000 0x1e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.549Z DEBUG modem << 15 0x1e000 0x20000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.551Z DEBUG modem << 16 0x20000 0x22000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.552Z DEBUG modem << 17 0x22000 0x24000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.553Z DEBUG modem << 18 0x24000 0x26000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.554Z DEBUG modem << 19 0x26000 0x28000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.555Z DEBUG modem << 20 0x28000 0x2a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.591Z DEBUG modem << 21 0x2a000 0x2c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.593Z DEBUG modem << 22 0x2c000 0x2e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.594Z DEBUG modem << 23 0x2e000 0x30000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.595Z DEBUG modem << 24 0x30000 0x32000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.596Z DEBUG modem << 25 0x32000 0x34000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.596Z DEBUG modem << 26 0x34000 0x36000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.597Z DEBUG modem << 27 0x36000 0x38000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.597Z DEBUG modem << 28 0x38000 0x3a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.598Z DEBUG modem << 29 0x3a000 0x3c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.598Z DEBUG modem << 30 0x3c000 0x3e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-05-21T11:01:17.598Z DEBUG modem << 31 0x3e000 0x40000\x09Non-Secure\x09rwxl\x0D\x0A\x0D\x0A
    2020-05-21T11:01:17.599Z DEBUG modem << Peripheral\x09\x09Domain\x09\x09Status\x0D\x0A
    2020-05-21T11:01:17.599Z DEBUG modem << 00 NRF_P0               Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.599Z DEBUG modem << 01 NRF_CLOCK            Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.600Z DEBUG modem << 02 NRF_RTC0             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.601Z DEBUG modem << 03 NRF_RTC1             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.602Z DEBUG modem << 04 NRF_NVMC             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.604Z DEBUG modem << 05 NRF_UARTE1           Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.604Z DEBUG modem << 06 NRF_UARTE2           Secure\x09\x09SKIP\x0D\x0A
    2020-05-21T11:01:17.605Z DEBUG modem << 07 NRF_TWIM2            Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.605Z DEBUG modem << 08 NRF_SPIM3            Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.605Z DEBUG modem << 09 NRF_TIMER0           Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.606Z DEBUG modem << 10 NRF_TIMER1           Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.644Z DEBUG modem << 11 NRF_TIMER2           Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.645Z DEBUG modem << 12 NRF_SAADC            Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.647Z DEBUG modem << 13 NRF_PWM0             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.648Z DEBUG modem << 14 NRF_PWM1             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.649Z DEBUG modem << 15 NRF_PWM2             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.650Z DEBUG modem << 16 NRF_PWM3             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.651Z DEBUG modem << 17 NRF_WDT              Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.652Z DEBUG modem << 18 NRF_IPC              Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.652Z DEBUG modem << 19 NRF_VMC              Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.653Z DEBUG modem << 20 NRF_FPU              Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.653Z DEBUG modem << 21 NRF_EGU1             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.653Z DEBUG modem << 22 NRF_EGU2             Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.653Z DEBUG modem << 23 NRF_DPPIC            Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.654Z DEBUG modem << 24 NRF_GPIOTE1          Non-Secure\x09OK\x0D\x0A
    2020-05-21T11:01:17.654Z DEBUG modem << 25 NRF_REGULATORS       Non-Secure\x09OK\x0D\x0A\x0D\x0A
    2020-05-21T11:01:17.654Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
    2020-05-21T11:01:17.692Z DEBUG modem << SPM: NS MSP at 0x20023890\x0D\x0A
    2020-05-21T11:01:17.696Z DEBUG modem << SPM: NS reset vector at 0xcfd1\x0D\x0A
    2020-05-21T11:01:17.698Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
    2020-05-21T11:01:17.804Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D
    2020-05-21T11:01:19.726Z DEBUG modem << FTP example\x0D\x0A\x0D
    

    I have few question:

    1. How to access a file from FTP server with this example code.

    2. How to provide FTP credentials from this example code. 

    I cloned the code on PR-2275. I am able to build and run it. 

    Can you please provide me the AT commands list for FTP Client. So that i can validate that as well.

    Thanks,

    Praveen K

  • Hi Martin,

    After few minutes i got below response  

    2020-05-21T11:01:17.804Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1 ***\x0D
    2020-05-21T11:01:19.726Z DEBUG modem << FTP example\x0D\x0A\x0D
    2020-05-21T11:07:09.565Z DEBUG modem << recv_buf:\x0D\x0A\x0D\x0D\x0A\x0D

  • Here is the precompiled .hex file for Serial LTE Modem sample with FTP client support and TCP proxy enabled:
    SLM_tcpproxy_ftp_28_05.hex
    Note that it's using the default settings:

    config SLM_FTP_SERVER_PORT
    	int "FTP service port on remote host"
    	default 21
    
    config SLM_FTP_USER_ANONYMOUS
    	string "FTP client login user Anonymous"
    	default "anonymous"
    	help
    	  Define the user name for anonymous login.
    
    config SLM_FTP_PASSWORD_ANONYMOUS
    	string "FTP client login password for user Anonymous"
    	default "[email protected]"
    	help
    	  Define the password for anonymous login.
    


  • Hi Martin,

    I have verified the above .hex file. it is working fine but i have few small observations.

    1. If i send status command(AT#XFTP) i have observed devise is going to unresponsive state. I have to disconnect the board and connect again to device to get response to any AT commands

    2. If i want read a data from a file in chunks. I dont see any AT commands supporting this.

    Thanks,

    Praveen K.

  • Hi Praveen,
    1.

    Please provide the full log output when you are testing this since I am not able to replicate the issue.

    e.g. When I tested:
    
    AT#XFTP="open","[email protected]","SzMf7rTE4pCrf9dV286GuNe4N","ftp.dlptest.com"
    220-#########################################################
    220-Please upload your web files to the public_html directory.
    220-Note that letters are case sensitive.
    220-#########################################################
    220 This is a private system - No anonymous login
    200 OK, UTF-8 enabled
    331 User [email protected] OK. Password required
    230-Your bandwidth usage is restricted
    230 OK. Current restricted directory is /
    OK
    
    AT#XFTP="status"
    215 UNIX Type: L8
    211 https://www.pureftpd.org/
    OK
    
    AT#XFTP
    ERROR
    
    at#xslmver
    #XSLMVER: 1.2
    OK
    
    AT#XFTP="pwd"
    257 "/" is your current location
    OK


    2.

    Let me double check this with the developer, but from first glance I could not find a supported command for this.

Related