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

SDK 15 ble_app_cli

We need to add BLE CLI to our devices, so I'm trying the ble_app_cli example (with an nRF52 DK) and it is not behaving as I thought it would.

I see that it is in an experimental directory, so let me know if I'm expecting too much with it.

* Running on the nRF52 DK it appears correctly as a UART on my development machine, so I can run commands successfully in the $uart_cli console when connected via USB to a serial terminal program. I don't see this mirrored on the BLE transport.

***** Should I see the command output mirrored on the other transports?

* In the $rtt_cli console on our custom board, I see logs from modules and the battery monitor, but I cannot run cli commands there (with the JLink RTT client)

***** Do I need to set a config somewhere for this? I tried many things in sdk_config.h without success.

* The $ble_cli doesn't work with any of the Nordic UART apps: nRF Toolbox->UART (iOS and Android)

The apps can connect, but sending commands do not have any effect (i.e. no change in the $rtt_cli output)

When I write to the characteristic using nRF Connect, I see that my commands are mirrored in the read characteristic when notifications are turned on, but I see no responses from cli commands.

***** Should I see output from cli commands in the read characteristic with notifications turned on?

SDK15

SD 6.0.0

nRF52 DK and custom board

gcc-arm-none-eabi-6-2017-q1-update cross-compiled on macOS

J-Link V6.22d

Thank you, 

Brian

Parents
  • Hi,

    1. You shall see the same command list for all transports.

    2. For RTT backend I recommend to configure PuTTY according to CLI documentation for RTT transport. Next RTT session shall be started by JLinik.exe because JLinkViewer or SES RTT debugger can steal some characters.

    3. When I will be at the offce on Monday I can support a bit more regarding configration.

    4. Regardin mirroring I am not sure if I understand you correctly. Nevertheless try to execute command: cli echo off.

    I was testing ble_cli with python script attached to the example not with any other Nordic tool.

  • Hi jakub,

    Thank you for the reply!

    It is also working for me now using the python script as you mentioned. I will mark this question answered.

    Also from above:

    2: Yes I think the RTT backend doesn't send the correct line-end (on macOS at least) so I cannot see any results from cli commands

    4: By 'mirroring' I meant that cli command outputs from one transport showing in all other transports. I see now that this is not the case. That is no problem since I really only need to use ble_cli.

    Thanks again,

    Brian

  • Hi,

    If you do not see command execution on RTT backend you can try to change line ending character in the NRF_CLI_DEF macro for this backend. By default you have '\n' , please try with with '\r'.

    Regarding mirroring it is behaving as it was designed. For each backend separate CLI object is created with the same commands list. All objects can print logs at the same time but effect of nrf_cli_fprintf will be visible only on the CLI where it was used.

Reply
  • Hi,

    If you do not see command execution on RTT backend you can try to change line ending character in the NRF_CLI_DEF macro for this backend. By default you have '\n' , please try with with '\r'.

    Regarding mirroring it is behaving as it was designed. For each backend separate CLI object is created with the same commands list. All objects can print logs at the same time but effect of nrf_cli_fprintf will be visible only on the CLI where it was used.

Children
No Data
Related