Use ble communication instead of cli terminal

Hi,

I'm trying to use ble data instead of cli terminal. when nRF52840 received data from ble, I want send the data to cli instance. I called function named "void nrf_cli_print_stream(void const * p_user_ctx, char const * p_data, size_t data_len)" to send the data to cli instance, but it would cause a crash. The details as below. What should I do? Any good suggestion? 

Parents Reply
  • Hi Marte,

    I'm sorry maybe my expression wasn't very clear. I have used NRF_CLI_CMD_REGISTER to register some commands. And I use PC tool like Putty to send command to make the MCU do things, everything is working fine.

    My question is how to send these commands through an Andriod APP? And now, Andriod APP could send string data to the MCU by using  NUS example, but the string data cannot  trigger command line callback function to execute. So Is there an interface to input commands to the cli module instead of through a keyboard or uart? Or is there a better way? Thank you!

    Best regards,

    Cheng 

Children
Related