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.

  • I am able to send long commands now but I cannot send them fast enough. I want to send 683 bytes every 16 ms. I can successfully send that amount of data from the tx out of nRF but can't achieve the same rate in the Rx direction via the NRF_CLI-- the app either crashes with a memory management hard fault or there are dropped characters leading to undetected commands. Any ideas?

    For more background, I am using a SILabs USB-UART chip, the CP2102/9 at a baudrate of 926100 and even parity. I have not been using hardware or software flow control.

Reply
  • I am able to send long commands now but I cannot send them fast enough. I want to send 683 bytes every 16 ms. I can successfully send that amount of data from the tx out of nRF but can't achieve the same rate in the Rx direction via the NRF_CLI-- the app either crashes with a memory management hard fault or there are dropped characters leading to undetected commands. Any ideas?

    For more background, I am using a SILabs USB-UART chip, the CP2102/9 at a baudrate of 926100 and even parity. I have not been using hardware or software flow control.

Children
No Data
Related