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
  • I confirm there is a problem with memory handling in ring_buffer implementation. We have a fix for that and it shall be available in comming SDK14.2.

    Unfortunately current UART driver will not mange such fast and big transsmissions. During UART Rx interrupt process we can loose some data or data reception synchronization (data will be badly interpreted). We have proof of concept for new UART driver but it will be released in Q1-Q2 next year.

    I have an approval to share it here on devzone. It is fixing memory problem and it is handling your scenario of usage. I just tested it and it was working correctly. As I mentioned we are still working on it so we do not give any guaranty - it shall be treated as PROTOTYPE.

    Here you have a hex file you can use as your playground (cmd buffer size set to 3000):nrf52832_xxaa.hex

    To port it to your code:

    1. I assume you are using SDK14.0.0

    2. Replace cli example (sdk\nrf5\examples\peripheral\cli) in SDK14.0.0 with below one: (I attached only GCC project): cli.7z

    3. Update SDK with attached changes: SDK update.7z

Reply
  • I confirm there is a problem with memory handling in ring_buffer implementation. We have a fix for that and it shall be available in comming SDK14.2.

    Unfortunately current UART driver will not mange such fast and big transsmissions. During UART Rx interrupt process we can loose some data or data reception synchronization (data will be badly interpreted). We have proof of concept for new UART driver but it will be released in Q1-Q2 next year.

    I have an approval to share it here on devzone. It is fixing memory problem and it is handling your scenario of usage. I just tested it and it was working correctly. As I mentioned we are still working on it so we do not give any guaranty - it shall be treated as PROTOTYPE.

    Here you have a hex file you can use as your playground (cmd buffer size set to 3000):nrf52832_xxaa.hex

    To port it to your code:

    1. I assume you are using SDK14.0.0

    2. Replace cli example (sdk\nrf5\examples\peripheral\cli) in SDK14.0.0 with below one: (I attached only GCC project): cli.7z

    3. Update SDK with attached changes: SDK update.7z

Children
Related