Hi Nordic!
I'm using the nrf ftp client library found here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/ftp_client.html
I'm having problem with one specific line of code, which is this
ctrl_buf[ret] = 0x00;
if (post_result) {
client.ctrl_callback(ctrl_buf, ret);
}I get a cpu fault and the device reboots. The ctrl_buf has a predefined size of 708 and it is on the line client.ctrl_callback(ctrl_buf, ret); that the reboot happens.
If I comment this part out, I can open a connection to my ftp server, I can log in and I can change file names so the connection is true. I can not use put as I get -116 connection timed out after trying for some seconds.
I'm thinking that this line can't be commented out for the ftp client to work as it should and something might be lacking from my prj.conf or similar but I do not know what.
The ftp connection is a passive one without TLS so it should work with the library.
I'll post my prj.conf and hopefully, this is just a case of needing to allocate stack to the ftp client in some manner.
CONFIG_NEWLIB_LIBC=y CONFIG_GPIO=n CONFIG_SERIAL=y CONFIG_STDOUT_CONSOLE=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_NETWORKING=y CONFIG_NET_BUF_USER_DATA_SIZE=1000 CONFIG_NET_SOCKETS_OFFLOAD=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_POSIX_NAMES=y CONFIG_TRUSTED_EXECUTION_NONSECURE=y CONFIG_LOG=n CONFIG_LOG_DEFAULT_LEVEL=4 CONFIG_HEAP_MEM_POOL_SIZE=1024 # LTE link control CONFIG_LTE_LINK_CONTROL=y CONFIG_MAIN_STACK_SIZE=4096 CONFIG_FTP_CLIENT=y CONFIG_LTE_AUTO_INIT_AND_CONNECT=y # General config CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y CONFIG_NCS_SAMPLES_DEFAULTS=y # Network CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y # LTE link control CONFIG_LTE_LINK_CONTROL=y # Modem library CONFIG_NRF_MODEM_LIB=y
Thank you for reading