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

Zigbee CLI default configuration

Hello,

I am developing a Zigbee coordinator with the nRF52840 DK and with the nRF52_SDK_for_Thread_and_Zigbee_v_4.1.0. I flashed the CLI example and everything works fine with it. I created a workspace folder where I copied the CLI example as a base for the development of my custom CLI.

I want to change the default configuration of the CLI but I struggle to understand how to do it.

1) How can I configure the application to enable logging for app and zigbee.report modules by default. So that the CLI client do not need to send `log enable info <module>`.
I thought that I could do it from the sdk_config.h file in the pca10056/blank/config folder but it doesn't work. The NRF_LOG_ENABLED is set to 1 by default.

2) How to set role to zc by default?

Best Regards,
Damien

Parents
  • Hi Marte,

    Thanks for your reply.
    About the logging, I checked and played around with the NRF_LOG_XXX macros, but I still need to enable modules from the client side in order to see the logs in the terminal. That is:
    - The CLI agent example is running on the nRF52840 DK
    - I connect to the serial port using minicom as a CLI client (on my computer)
    - I can use the CLI commands in minicom as expected (bdb role, bdb start, zdo, etc...)
    - BUT, In order to see the logs in minicom, I need to use the command "> log enable info app" to see logs using NRF_LOG_INFO(...), and the command "> log enable info zigbee.report"  to see logs using the NRF_LOG_INST_INFO(...) function.

    So, what I want is to be able to configure default enable/disable when the application is started, so that I don't need to use the "log enable ..." command on the client side.

    On the client side, before I enable any module log, I get this output:

    > log status
    module_name                              | current | built-in
    ----------------------------------------------------------
    CLOCK                                    | none    | none
    GPIOTE                                   | none    | none
    PRS                                      | none    | none
    RNG                                      | none    | none
    TIMER                                    | none    | none
    UART                                     | none    | none
    UARTE                                    | none    | none
    USBD                                     | none    | none
    app                                      | none    | info
    app_button                               | none    | none
    app_timer                                | none    | none
    app_timer.m_bsp_alert_tmr                | none    | none
    app_timer.m_bsp_button_tmr               | none    | none
    app_timer.m_bsp_leds_tmr                 | none    | none
    app_timer.m_cli_uart_transport_timer     | none    | none
    app_timer.m_detection_delay_timer_id     | none    | none
    app_timer.m_timer_0                      | none    | none
    app_usbd                                 | none    | none
    app_usbd_core                            | none    | none
    atfifo.m_req_fifo                        | none    | none
    balloc.log_mempool                       | none    | none
    balloc.m_cli_cdc_acm_cmd_hist_memobj     | none    | none
    balloc.m_cli_uart_cmd_hist_memobj        | none    | none
    cdc_acm                                  | none    | none
    cli_uart                                 | none    | none
    clock                                    | none    | none
    nrf_fstorage                             | none    | info
    pwr_mgmt                                 | none    | none
    queue.m_cli_cdc_acm_log_backend_queue    | none    | none
    queue.m_cli_uart_log_backend_queue       | none    | none
    queue.m_rand_pool                        | none    | none
    queue.m_rx_queue                         | none    | none
    rng                                      | none    | none
    sortlist                                 | none    | none
    zboss                                    | none    | info
    zigbee.cli                               | none    | info
    zigbee.eprxzcl                           | none    | info
    zigbee.ping                              | none    | info
    zigbee.report                            | none    | info
    >

    BR,
    Damien

Reply
  • Hi Marte,

    Thanks for your reply.
    About the logging, I checked and played around with the NRF_LOG_XXX macros, but I still need to enable modules from the client side in order to see the logs in the terminal. That is:
    - The CLI agent example is running on the nRF52840 DK
    - I connect to the serial port using minicom as a CLI client (on my computer)
    - I can use the CLI commands in minicom as expected (bdb role, bdb start, zdo, etc...)
    - BUT, In order to see the logs in minicom, I need to use the command "> log enable info app" to see logs using NRF_LOG_INFO(...), and the command "> log enable info zigbee.report"  to see logs using the NRF_LOG_INST_INFO(...) function.

    So, what I want is to be able to configure default enable/disable when the application is started, so that I don't need to use the "log enable ..." command on the client side.

    On the client side, before I enable any module log, I get this output:

    > log status
    module_name                              | current | built-in
    ----------------------------------------------------------
    CLOCK                                    | none    | none
    GPIOTE                                   | none    | none
    PRS                                      | none    | none
    RNG                                      | none    | none
    TIMER                                    | none    | none
    UART                                     | none    | none
    UARTE                                    | none    | none
    USBD                                     | none    | none
    app                                      | none    | info
    app_button                               | none    | none
    app_timer                                | none    | none
    app_timer.m_bsp_alert_tmr                | none    | none
    app_timer.m_bsp_button_tmr               | none    | none
    app_timer.m_bsp_leds_tmr                 | none    | none
    app_timer.m_cli_uart_transport_timer     | none    | none
    app_timer.m_detection_delay_timer_id     | none    | none
    app_timer.m_timer_0                      | none    | none
    app_usbd                                 | none    | none
    app_usbd_core                            | none    | none
    atfifo.m_req_fifo                        | none    | none
    balloc.log_mempool                       | none    | none
    balloc.m_cli_cdc_acm_cmd_hist_memobj     | none    | none
    balloc.m_cli_uart_cmd_hist_memobj        | none    | none
    cdc_acm                                  | none    | none
    cli_uart                                 | none    | none
    clock                                    | none    | none
    nrf_fstorage                             | none    | info
    pwr_mgmt                                 | none    | none
    queue.m_cli_cdc_acm_log_backend_queue    | none    | none
    queue.m_cli_uart_log_backend_queue       | none    | none
    queue.m_rand_pool                        | none    | none
    queue.m_rx_queue                         | none    | none
    rng                                      | none    | none
    sortlist                                 | none    | none
    zboss                                    | none    | info
    zigbee.cli                               | none    | info
    zigbee.eprxzcl                           | none    | info
    zigbee.ping                              | none    | info
    zigbee.report                            | none    | info
    >

    BR,
    Damien

Children
Related