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

NRF CLI cannot handle long arguments

I am trying to pass a base64 encoded string as an argument to a CLI command over UART. It seems like the longest length command I can send is 258 bytes long. How can I pass in longer strings (1024 bytes long)? I set the UART RX buffer size to 2048. I am using SDK 14.0

Parents
  • Hi,

    By default command accepted by CLI can have 128 characters. You can change this in sdk config: NRF_CLI_CMD_BUFF_SIZE. This is size of static buffer so it will impact your RAM usage especially that this buffer is doubled.

    In addition by default CLI assumes that command will not take more than 12 arguments. CLI will treat argument 12 and all following as one. You can change it as well in sdk config: NRF_CLI_ARGC_MAX.

Reply
  • Hi,

    By default command accepted by CLI can have 128 characters. You can change this in sdk config: NRF_CLI_CMD_BUFF_SIZE. This is size of static buffer so it will impact your RAM usage especially that this buffer is doubled.

    In addition by default CLI assumes that command will not take more than 12 arguments. CLI will treat argument 12 and all following as one. You can change it as well in sdk config: NRF_CLI_ARGC_MAX.

Children
Related