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.

CC2340R5: How do terminal devices actively disconnect from the network?

Part Number: CC2340R5

How do terminal devices actively disconnect from the network?I used the function zdo_mgmt_leave_req to have the terminal devices that need to go offline send it to the coordinator. However, after going offline, the terminal devices will not reconnect again. I set req->rejoin to TRUE, but ultimately the terminal devices cannot proceed to the "Finding & Binding done" stage. I would like to ask if there is any function that can allow the terminal devices to go offline actively?0363f29aadde3d08da40de7595fd77fa.png

  • Hi bin,

    It appears you are sampling your logic from the ZBOSS User's Guide, which is good, however it appears that you are setting the req->device_address to 0 which doesn't make sense for an IEEE address.  You could try submitting the local device's IEEE address (ieee_mac_addr from the example applications, or ZB_LONG_ADDR if defined), but from the Struct Reference this command appears to be for a remote device:

    "The Mgmt_Leave_req is generated from a Local Device requesting that a Remote Device leave the network or to request that another device leave the network."

    What is the return status of leave_callback?  You could try zbd_zvd_comm_leave_network instead.  Ultimately you need a sniffer device so that you can confirm what is happening over-the-air.

    Regards,
    Ryan

  • I used the function zdo_mgmt_leave_req through the terminal to send it to the coordinator, and successfully left the network. In the zdo_mgmt_leave_req function, I set req->rejoin = ZB_TRUE; The coordinator shows "New device commissioned or rejoined in short: X", but the terminal also shows "Device RESTARTED OK", but this signal "ZB_BDB_SIGNAL_FINDING_AND_BINDING_INITIATOR_FINISHED" has not been triggered. The coordinator and the terminal cannot properly "find and bind" after reconnecting after the terminal provided a request to leave the network. Why is this happening? I have tried setting eq->device_address to the IEEE address of the terminal device, and the effect was the same. I set req->device_address to 0 because of the example provided by the following figure's function.
    The function "zbd_zvd_comm_leave_network" cannot be used normally by me. I added the header file " #include "zboss_api_direct.h" ", but when running this function, I was informed that it was undefined. Also, regarding this function, how can the parameter "zb_ble_conn_id_t conn_id" be obtained?

  • Finding and Binding is not infinite, rather it lasts for a default 3 minutes after steering is completed during commissioning.  This is shown through zb_bdb_finding_binding_target being called during the ZB_BDB_SIGNAL_STEERING case of the application.  Both sides need to have F&B enabled at the same time, which works well for new device commissioning where the ZC opens the network for 3 minutes during formation/steering.  However you have initiated a device rejoin session for which the ZC does not have finding and binding enabled.

    I would have expected that the binding table would have retained the bind even through the leave and rejoin, if this is not the case then you will need to either re-enable finding and binding on your ZC during the terminal rejoin or perform manual binds.  Or if you are waiting to perform logic during ZB_BDB_SIGNAL_FINDING_AND_BINDING_INITIATOR_FINISHED then perhaps this explanation has given evidence to find another solution.

    Note: I will not be able to respond to further messages until 1/26

    Regards,
    Ryan