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?

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

    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)

    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).

    Based on your description it sounds like it is not joining the network.

  • 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 Pranav,

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

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

    When you try to run the application, and that you fed in the correct COM port? (may not be the same as when you programmed it).

    If so, can you please try to set the default channel selection in the NCP sample, and use the nRF Sniffer for 802.15.4 and see whether you can see any packets being sent from the light controller? (For simplicity, turn off any of the other devices, the coordinator and the bulb). Check channel 21 using the sniffer and see if you can see any packets.

    BR,

    Edvin

  • 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.

     

  • Hello Edvin,

    Any update on my ticket/question.

    Thank you,

    Pranav.

Reply Children
  • Sorry, Pranav. There isn't.

    I'll ping the internal ticket.

    Please note that there is Easter vacation season in Europe, so it may cause some delays in the answer from our Zigbee team (I am not sure how they are staffed during Easter).

    Best regards,

    Edvin

  • Hello,

    All three examples (from the NCP "SDK") works out of the box. Note that these use channel 21 by default, while the Zigbee samples from NCS uses channel 16 by default. 

    To change the channel, please use channel mask (1l<<channel) (where channel is the channel number you want to use, e.g. channel mask (1l<<13) ).

    The reeason you have build issues is the lack of a space character before the channel mask. It should be #define LIGHT_CONTROL_CHANNEL_MASK space (1l<<13). Without the whitespace character, it defines an empty macro that takes parameters inside the paranthesis.

    I have seen that the customer had some issues determining what protocol that is used by the Host to communicate with the NCP. Please remember that we provide two .hex files for the nRF52833 board:

    • ncp_nrf52833_xxaa_uart.hex
    • ncp_nrf52833_xxaa_usb.hex

    The first one uses UART which goes through the on-board Segger. You can determine which serial port your NCP board is assigned with by issuing the nrfjprog --com command. The second one uses native USB which requires an additional USB cable connected to the on-board nRF USB port.

    Also note that NCP stores some information in it's flash memory. When testing different applications and connecting to different networks it may be necessary to erase the flash memory in between two runs.

    Best regards,

    Edvin

  • Hello Edvin,

    Thank you for your reply. That resolved my issue.

    Thank you,

    Pranav.

Related