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

Use of NCP in Zigbee

Hello,

I am using nRF52833, nRF Connect SDK  v1.5.0.

In v1.5.0 there is one new example i.e Zigbee NCP. ( Zigbee: NCP — nRF Connect SDK 1.5.0 documentation (nordicsemi.com)..)

In the above link, NCP and coordinator are both used for testing.

I'm not understanding what is the use of NCP.  I am confused between the use of coordinator and NCP.

Can you please explain to me why and in which case NCP required?

What is the difference between NCP and coordinator?

Thank you,

Pranav.

Parents
  • Hello,

    Understood. Thank you for your quick reply. I have encountered two problems while testing,

    1. With the help of this link Zigbee: NCP — nRF Connect SDK 1.5.0 documentation (nordicsemi.com) and Readme file under ncp_sdk_v0.9.3. I        tried to test the NCP example. But after completing all the steps under testing, my light control device doesn't join the Zigbee network. It doesn't show any led indication on board. 

    2. Also tried to test the (SDK v1.5.0) Zigbee network_coordinator, light_switch,light_bulb example but after building while testing it  light_switch doesn't respond. Doesn't show any led indication and not joined the network. Previously, I tested the same scenario with SDK v1.4.2 its works fine there.  

    Can you please help me to resolve this issue?

    Thanks,

    Pranav.

  • Pranav3 said:
    2. Also tried to test the (SDK v1.5.0) Zigbee network_coordinator, light_switch,light_bulb example but after building while testing it  light_switch doesn't respond. Doesn't show any led indication and not joined the network. Previously, I tested the same scenario with SDK v1.4.2 its works fine there.  

     Does the logs from the nRFs say anything?

    Try erasing all boards completely using "nrfjprog --eraseall" (nRF command line tools is needed for this) and re-program them.

     

    Pranav3 said:
    1. With the help of this link Zigbee: NCP — nRF Connect SDK 1.5.0 documentation (nordicsemi.com) and Readme file under ncp_sdk_v0.9.3. I        tried to test the NCP example. But after completing all the steps under testing, my light control device doesn't join the Zigbee network. It doesn't show any led indication on board. 

     

    Is your NCP connected to anything physically? What is running the application?

  • Hello Pranav,

    I am not sure what you are trying to point to in your screenshot here.

     

    Pranav3 said:
    nus_cmd.c file is missing in the project.

     But is it used in the project at all? Have you compared the project config the same way as in 1.4.2? I see that CONFIG_BT_NUS is not enabled by default.

    Try to set:

    And:

    BR,

    Edvin

  • Hello Edvin,

    Thank you for your reply. I tried what you suggested. It worked but In the light_switch board only LED 3: (On and solid when the device is connected to a Zigbee network.) is ON. 

    LED 4 i.e. (On and solid when the light switch has found a light bulb to control) is not glowing/OFF.

    I am not able to control the light_bulb from boards as well as a mobile application 

    I am not able to understand what's wrong. In SDK v1.4.2 it's worked easily and seamlessly ( also setup part) without any additional steps.

    Can you please help to resolve this issue?

    Is your NCP connected to anything physically? What is running the application?

    1. About the NCP example 

    I am running the light_control application and NCP connected to my Linux pc. Also tried the same step with my colleague but encountered the same issue.

    Can you please suggest to me some solution by trying it out on your side? 

    Also still I am facing this issue.

    Can you please also help me to resolve this issue? 

    Thank you,

    Pranav.

  • With version 1.5.0, if I flash the unmodified light_bulb, light_switch and network_coordinator from the ncs\nrf\samples\zigbee folder, they all connect and I can control the light bulb using the light switch. LED3 and LED4 is on on the switch. If that is not the case in your test, can you please try to erase all boards, and compile and flash them. NB: LED4 on the light_switch doesn't turn on until you press button1 or 2 to turn on/off the light.

    Regarding the BLE:

    Does it work after the configurations? I don't know what to say. I can't guarantee that all examples are the exact same from version to version. There are probably some differences in main.c as well. 

    I see that in v1.4.2, CONFIG_BT_NUS is not set to y either, so bluetooth is not enabled by default. Is that what you claim it was doing, or do I misunderstand?

    BR,

    Edvin

  • Hello Edvin,

    Thank you for the answer. I will definitely try this.

    Please help me to resolve the “NCP” example issue. It’s been one week am facing the problem.

    I have followed all the steps in the readme file. But still my I am not getting this result,

    “The light control device joins the Zigbee network, searches for a light bulb to control, and starts sending On/Off commands with a 15-sec period that toggles the LED 4 on the light bulb on and off.”

    Is your NCP connected to anything physically? What is running the application?

    1. About the NCP example 

    I am running the light_control application and NCP connected to my Linux pc. Also tried the same step with my colleague but encountered the same issue.

    Can you please suggest to me some solution by trying it out on your side? 

    I have also confirmed the same steps with my college but still facing the same issue.

    Can you please help me to resolve this issue?

    Thank you,

    Pranav

  • I don't understand your NCP example issue. The NCP is a network co processor. What are you using it with? It needs an application CPU running an openthread application, and using the nRF NCP as the radio. What is running your application?

    "I am running the light_control application and NCP connected to my Linux pc".

    What is your linux pc doing then? Is it doing some openthread things? Or do you expect the NCP to create a folder that you can drag and drop applications into? (That is not a serious suggestion, but I try to figure out how you are trying to use the NCP example).

     

    Pranav3 said:
    “The light control device joins the Zigbee network, searches for a light bulb to control, and starts sending On/Off commands with a 15-sec period that toggles the LED 4 on the light bulb on and off.”

     Where is this written? Can you please point me to the location of this readme file? It looks like you are pointing to the light_switch's readme.rst text, but mine doesn't say that.

    BR,

    Edvin

Reply
  • I don't understand your NCP example issue. The NCP is a network co processor. What are you using it with? It needs an application CPU running an openthread application, and using the nRF NCP as the radio. What is running your application?

    "I am running the light_control application and NCP connected to my Linux pc".

    What is your linux pc doing then? Is it doing some openthread things? Or do you expect the NCP to create a folder that you can drag and drop applications into? (That is not a serious suggestion, but I try to figure out how you are trying to use the NCP example).

     

    Pranav3 said:
    “The light control device joins the Zigbee network, searches for a light bulb to control, and starts sending On/Off commands with a 15-sec period that toggles the LED 4 on the light bulb on and off.”

     Where is this written? Can you please point me to the location of this readme file? It looks like you are pointing to the light_switch's readme.rst text, but mine doesn't say that.

    BR,

    Edvin

Children
  • Hello Edvin,

    Thank you for your quick reply. I tried what you suggested.

    Ok, so you intend to run the light switch from the ubuntu machine then, correct?

    Correct.

    If you were to test the three examples without NCP:

    light_bulb, netwoork_coordinator, light_switch and you set all the channels to 12, does that work? (just to make sure that the two other devices are working before you add the NCP).

    These three standalone examples working fine for me. All three boards are connected and also I am able to control the light from both i.e. light_switch and BLE app (nRF ToolBox).

    After you have programmed the board, do you switch the USB connector to the USB connector on the long side of the DK?

    In the network coordinator and the light bulb, try adding this prj.conf configuration: CONFIG_ZIGBEE_CHANNEL=12

    (doesn't have to be exactly 12. Anything from 11 to ...25? Don't remember the range, but 12 should work).

    Then open light_control.h and change line 58: #define LIGHT_CONTROL_CHANNEL_MASK(11<<12)

    As you suggested above I made all the changes.

    while changing  light_control.h line 58: #define LIGHT_CONTROL_CHANNEL_MASK(11<<12)

    After modifying these file when I tried the "make" command I gives me an error

    Also tried  #define LIGHT_CONTROL_CHANNEL_MASK(1l<<12) instead of  #define LIGHT_CONTROL_CHANNEL_MASK(11<<12) in  light_control.h . Still facing same error 

    After this, I also tried with unmodified light_control.h (default) i.e #define LIGHT_CONTROL_CHANNEL_MASK (1l<<21) and 

    In the network coordinator and the light bulb, I have added  this prj.conf configuration: CONFIG_ZIGBEE_CHANNEL=21

     Also, switch the USB connector to the USB connector on the long side of the DK

    The LED 3 turn on both boards i.e Coordinator and light bulb i.e 

    When LED 3 turns on, this development kit has become the Coordinator of the Zigbee network.

    When LED 3 turns on, the light bulb has become a Router inside the network.

    But the light control device not joining the Zigbee network, Also not sending the On/Off commands with a 15-sec period that toggle the LED 4 on the light bulb on and off.

    In my terminal, I can't see any messages. I see some trace messages in light_control where does it suppose to appear?

    I have also attached the light_control.log file. please find the attachment.

    light_control.log

    Can you please suggest what else (modification) required to test the NCP example?

    Thank you,

    Pranav.

  • Hello Edvin,

    Can you confirm that you are using the USB port on the long edge of the DK,

    Yes, connected to the USB port on the long edge of the DK.

    Unfortunately, I don't have an linux machine to run this on.

    I just wanted to know whether this Zigbee NCP example is tested? Or still in the development phase.

    Because I have tried everything that suggested in this Zigbee: NCP — nRF Connect SDK 1.5.0 documentation (nordicsemi.com) link and my ticket still not getting any result.

    It has been two weeks since I have followed this ticket but still not getting any positive result regarding the NCP sample example. 

    Also in the log file that I have provided 

    It says "Can't find PAN to join to! " what does that mean ? What PAN I required and where it located ?

    209 47c75740 2021-3-23 9:54:51 9214/141527/141.541 zdo_commissioning.c:247 [ERROR] Can't find PAN to join to! param 3
    zbncp_ll_poll: @ time 175098 [ack size 7]
    zbncp_ll_tx_complete_ack: (TX-ACK-SENT) (RX-SENDING-ACK)
    zbncp_ll_alarm_cancel: 199
    zbncp_ll_tx_set_state: (TX-ACK-SENT --> TX-IDLE)
    zbncp_ll_rx_set_state: (RX-SENDING-ACK --> RX-IDLE)
    zbncp_ll_rx_start_receiving: (RX-IDLE)
    zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
    zbncp_ll_poll: >>> timeout 18446744073709551615/SERVICE [ack size 0]
    zbncp_ll_poll: @ time 175098 [ack size 0]
    zbncp_ll_poll: >>> timeout 18446744073709551615 [ack size 0]
    zbncp_ll_poll: @ time 175098 [ack size 0]
    zbncp_ll_poll: >>> timeout 18446744073709551615 [ack size 0]
    210 47c75740 2021-3-23 9:54:51 9214/141527/141.541 zdo_commissioning_bdb.c:437 [INFO1] COMMISSIONING_STOP: app signal 10 comm status 3
    211 47c75740 2021-3-23 9:54:51 9214/141527/141.541 high_level/host/adapters/ncp_host_hl_adapter_zdo.c:1335 [ERROR] > zb_zdo_startup_complete_int param 3 status -1 signal 10
    212 47c75740 2021-3-23 9:54:51 9214/141527/141.542 light_control.c:253 [ERROR] Device started FAILED status -1
    213 47c75740 2021-3-23 9:54:52 9280/142540/142.542 light_control.c:502 [ERROR] >> light_control_leave_and_join param 0
    214 47c75740 2021-3-23 9:54:52 9280/142540/142.542 light_control.c:492 [ERROR] light_control_retry_join 0
    215 47c75740 2021-3-23 9:54:52 9280/142540/142.542 light_control.c:515 [ERROR] << light_control_leave_and_join
    216 47c75740 2021-3-23 9:54:52 9280/142540/142.542 zdo_commissioning_bdb.c:293 [INFO1] dev type 2, joined 0, ext_pan_id 0, authenticated 0, tclk_valid 0
    217 47c75740 2021-3-23 9:54:52 9280/142540/142.542 zdo_commissioning_bdb.c:348 [ERROR] Nothing to do, just continue

    Also providing a light_control.log file please take a look.

    4666.light_control.log

    Thank you,

    Pranav.

     

Related