How do I pair a light_bulb with an existing zigbee coordinator

At present, I used an nRF52840DK as the Adapter of zigbee2mqtt, flashed the corresponding NCP firmware, and successfully formed the zigbee network. I want to connect the light bulb to the network. I have compiled the firmware of the light_bulb to another nRF52840DK, but I can't find any way to connect the two NRF52840DKs. In addition, I did not find a definition in SDK2.7.0 that would change the zigbee channel. What should I do to connect the light_bulb to an existing zigbee network?

Parents
  • Hello,

    I used an nRF52840DK as the Adapter of zigbee2mqtt, flashed the corresponding NCP firmware,

    Is this Home Assistant, by chance? So the nRF52840 DK is the coordinator, but it is being controlled by some other device, right?

    In addition, I did not find a definition in SDK2.7.0 that would change the zigbee channel

    There is a configuration for setting a specific Zigbee channel, but you probably don't want to use this. That is mostly for debugging purposes, to speed up the process, if you know what channel your network is operating on. If you don't specify a specific Zigbee channel, the device will by default advertise itself on all channels.

    What should I do to connect the light_bulb to an existing zigbee network?

    The way that this usually works is that the network coordinator - which I assume is the thing that is connected to your nRF52840 DK running the NCP firmware - needs to look for new devices, and open up the network to let the new devices in. 

    So depending on whether the network is controlled by a computer, a raspberry pi, an Amazon Echo hub, a Philips Hue controller, or whatever your network coordinator is, the way it is done is a bit differently. 

    When the DK is flashed with the NCP firmware, it will just act as a generic Zigbee radio slave device, controlled by the host it is connected to, so I can't tell you how to add the bulb to the network unless I know what the host controller is, and what it is running. 

    NB: We do have a sample application called "network_coordinator", which can act as your network leader, but it doesn't sound like this is what you are currently trying to do, and perhaps not what you want to do either. 

    Best regards,

    Edvin

  • Thank you for your help. I installed zigbee2mqtt directly on Raspberry Pi 4B without using Home Assistant.And using the firmware from this link(developer.nordicsemi.com/.../ncp_host_v2.2.3.zip), flashed it into my nRF52840DK.

    When I start zigbee2mqtt, it will become the Coordinator in my network and will be able to form the network, which is also found in the frontend of zigbee2mqtt.

    So I have now flashed the firmware of the light bulb to another nRF52840DK. I want the light bulb to be able to pair with the NCP, which is currently the Coordinator in the network.That's the point.

    English is not my native language, so there may be some mistakes in my expression. Thank you for your reply.

  • Note:I am connecting the nRF52840DK (with NCP firmware) to the Raspberry PI 4B through a USB cable, naming it the Adapter for zigbee2mqtt.

    Best regards

    Coco

  • In addition, the channel of Coordinator in my network is set to 11, and there seems to be no way to change it.

  • Well, as I mentioned, the light bulb will use all channels until it finds a network to connect to, so you shouldn't need to modify the channel on the light bulb. However, if you want to do it, you can add this to your prj.conf:

    CONFIG_ZIGBEE_CHANNEL=11

    and it will use only channel 11.

    I don't know how you add devices in the thing that you are running on your raspberry pi. I think you need to look it up in the documentation for whatever you have installed. The light bulb is just waiting for some network to tell it to connect, so there should not be anything you need to do to that device. 

    When you find out how to add devices to your network, try to power cycle (turn off and turn on) the light bulb DK, to make sure it is "awake" before trying to add it to your network.

    Best regards,

    Edvin

  • Well, thank you for your reply.

    I see what you mean, the light bulb will continuously scan each channel and wait for some network to tell it to connect, but in the frontend of my zigbee2mqtt,.The device was nowhere to be found and I was very confused. Is there a problem with the NCP firmware I flashed?

    My entire environment setup can be found here, please take a look:

    https://www.zigbee2mqtt.io/ 

    I'll try changing the prj.conf file first to see if it works.

    Best regards,

    Coco

  • So I ended up here:

    https://www.zigbee2mqtt.io/guide/usage/pairing_devices.html#allowing-devices-to-join

    Do you have a frontend? If not, what did you do to trigger your network to allow new devices to join?

    Best regards,

    Edvin

Reply Children
  • Yes, I was able to open the frontend of zigbee2mqtt, and when I added prj.conf:

    CONFIG_ZIGBEE_CHANNEL=11

    After re-flashed the new hex file, the light bulb device was automatically added to the zigbee network without requiring me to click or anything like that.

    I don't quite understand, the previous light bulb also scanned all channels, which should have included channel 11. However, the current situation is that you must specify channel 11 in order to connect to the zigbee network.

    Do you know the reason for the above phenomenon?

    Thank you for your help~

    Best regards,

    Coco

  • It spends some time on each channel, so perhaps there was a timeout on your coordinator that was too short? I didn't understand exactly. Did you need to "open the network" or "look for new devices" in order to add the lightbulb?

    BR,
    Edvin

  • I just need to set "permit_join" to "true" in the config file, and I can turn "permint_join" off or on again in the frontend.

    So I'll just leave it at the default Settings.

    At present, it should be good to be able to use normally, and further reasons seem more difficult to analyze, right?

    Best regards,

    Coco

  • Yeno Coco said:
    I just need to set "permit_join" to "true" in the config file, and I can turn "permint_join" off or on again in the frontend.

    That sounds like it is on your coordinator, and I am not familiar with the details on how that works, unfortunately (but I recognize the config name from Home Assistant). If you want to dig deeper into why it only works after you set the channel, I suggest you capture a sniffer trace of the two cases, while setting the channel, and when not setting it on the nRF. 

    But when you think about it, any 3rd party Zigbee devices should work on your network, and they are not aware of what channel the network they will join will use, so I think that is not the reason why it didn't work before. 

    To capture a sniffer trace, you can use the nRF Sniffer for 802.15.4. (it requires another DK to act as the radio sniffer connected to your PC)

    Best regards,

    Edvin

Related