This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-EM-CC2340R53:How does the terminal node scan the nearby coordinator signal independently

Part Number: LP-EM-CC2340R53
Other Parts Discussed in Thread: SYSCONFIG, CC2340R5

Tool/software:

hi: 

How can a terminal node independently scan for the signal of a nearby coordinator?

The requirement is: The CC2340R53 chip used in the terminal device. Communicate with other devices (Yale). These steps are expected to be executed separately and the printed logs can be seen.
Steps: 1. Be able to recognize the scanned coordinator.
2. Request to join the network.
3. After the communication link is successfully established, report the status of the terminal device (lock) to the coordinator.
The editor used is: CCS 2020
The SDK used is: simplelink_lowpower_f3_sdk_9_10_00_83

The terminals and coordinators used are below

Any suggestions would be greatly appreciated.

Thanks!

  • Hi yongjian,

    Without fully understanding your request, the ZBOSS User's Guide and Zigbee SimpleLink Academy Labs will be the best way for you to get started.

    1. bdb_start_top_level_commissioning with ZB_BDB_NETWORK_STEERING as the parameter will allow a Zigbee Router or End Device to scan for a nearby network to join
    2. The ZB_BDB_SIGNAL_STEERING
     case with RET_OK status code and valid zb_nwk_device_type_t indicates that the device successfully joined a network
    3. You can add reporting to your doorlock example in a similar format shown with Task 1 Step 6 of the Zigbee Fundamentals SLA.

    Regards,
    Ryan

  • hi Ryan

    When I was running the custom switch example, I was unsure about how the error message was given the value.

  • I apologize for the frustration you experienced while attempting to replicate the SLA instructions.  There are some out of date instructions which I am addressing internally.  For your purposes, please add the following function declarations:

    void configure_reporting_cb(zb_uint8_t param);
    void configure_reporting(zb_uint8_t param);
    void bind_device_cb(zb_uint8_t param);
    void send_bind_req(zb_uint8_t param, zb_uint16_t endpoint);
    void schedule_send_bind_req (zb_uint8_t endpoint);
    static void simple_desc_callback(zb_bufid_t param);
    static void send_simple_desc_req(zb_bufid_t param, zb_uint16_t dev_idx);
    void schedule_send_simple_desc_req (zb_uint8_t dev_idx);
    void active_ep_callback(zb_bufid_t param);
    void send_active_ep_req(zb_bufid_t param, zb_uint16_t dev_idx);
    void schedule_send_active_ep_req (zb_uint8_t dev_idx);

    Create the sg_p pointer:

    /* Callback to handle the stack events */
    void zboss_signal_handler(zb_uint8_t param)
    {
      zb_zdo_app_signal_hdr_t *sg_p = NULL;
      zb_zdo_app_signal_type_t sig = zb_get_app_signal(param, &sg_p);

    And add the missing bind callback function:

    void bind_device_cb(zb_uint8_t param)
    {
      zb_bufid_t buf = param;
      zb_zdo_bind_resp_t *bind_resp = (zb_zdo_bind_resp_t*)zb_buf_begin(buf);
      if (bind_resp->status == ZB_ZDP_STATUS_SUCCESS)
      {
          ZB_SCHEDULE_APP_CALLBACK(configure_reporting, param);
          param = 0;
      }
      if (param)
      {
        zb_buf_free(buf);
      }
    }

    Errors such as missing LIGHT_REPORTING_MIN_INTERVAL definitions are caused by not following Task 1 Step 2.

    Regards,
    Ryan

  • hi Ryan

    Following your instructions, the example was successfully executed. The terminal button was pressed and the indicator light of the coordinator changed. Your reference is great and solved my error message. But there is another problem. Please help me write a sample code to use the lock. Just like the logic of the switch.

    As you said, add the report to the door lock example in a similar format as shown in Task 1 Step 6 of Zigbee Basic SLA.
    I will use it as a reference. Of course, I will try to write it. It will be greatly appreciated.

    Best Regards, 
    yongjian

  • hi Ryan

    In addition, please write a code for the corresponding lock terminal. I used the switch and light examples as reference. Just like the switch example.

    I will try to write it. It will be greatly appreciated.

    Best Regards, 
    yongjian

  • hi Ryan

    Based on this question, there is another extended question.
    During the Zigbee communication process, the channel for communication with the third-party device is 20, and the requested packet has been captured. How to scan the nearby channel list? (Or actively request each fixed channel to view the results) After scanning the channel list, which field is used to determine whether it is channel number 20? I still hope to be given a specific demo.

    Best Regards, 
    yongjian

  • In addition, please write a code for the corresponding lock terminal.

    This is the purpose of the Zigbee Custom Device Types SLA.

    During the Zigbee communication process, the channel for communication with the third-party device is 20, and the requested packet has been captured. How to scan the nearby channel list?

    Multiple channels can be chosen from the Sysconfig -> Zigbee -> Radio module, and the best network from those channels whose permit join is enabled will be selected during the commissioning process.

    Regards,
    Ryan

  • hi Ryan

    Thank you very much for your reply. I will try to run it.

    Best Regards, 
    yongjian

  • hi Ryan

    I'm sorry, it didn't work properly. Steps 1, 2, and 3 were completed. In the fourth step, the "Door Lock: lock Door" indicator was not visible. 
    In this experiment, it is not clear where the problem lies. Could it be a lack of equipment? Could it be the two devices, the router and the coordinator, or the two devices, the terminal and the router? Or could it be that all three devices (the terminal, the router, and the coordinator) are operating simultaneously? 


    When the device is one for a terminal and the other for a router, both of the "off_network_attention" indicator lights are flashing. Using ubiqua, no routing and device identification was seen. What could be observed was "Beacon Request".


    In the case of one being a router and the other a coordinator, the connection establishment failed and no indication of a lock was observed.
    How can one see the lock symbol in Ubiqua?

    Best Regards, 
    yongjian

  • I know very little about the "terminal device", are you certain it is active on the channel you are sniffing/broadcasting on? Are you using a mass-market Zigbee Home Automation Gateway or Zigbee2MQTT dongle/adapter solution?

    For the coordinator, not enough information is provided to substantiate that "the connection establishment failed".  Beacon Requests are being sent but the network is shown as closed.  If the coordinator does not include a door lock controller client endpoint then it is unlikely to communicate ZCL8 door lock commands to the Door Lock device.

    Regards,
    Ryan

  • hi Ryan

    I'm very sorry. It seems that the coordinator was not included, and the client endpoint for the door lock controller was not added either. Please help me with this. The corresponding demo.

    Regards,
    Ryan

  • The Zigbee Custom Device Types SLA and ZBOSS HA Devices APIs are provided so that customers are enabled to create any Zigbee HA ZCL device independently.  If a door lock controller is not something you need or wish to develop with the CC2340R5 (i.e. it is not your target use case) then you can choose to use a mass market Zigbee hub (ex. Amazon Echo product) with which to evaluate your CC2340R5 door lock firmware.

    Regards,
    Ryan