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.

How to leave from the network without a reboot?

Other Parts Discussed in Thread: Z-STACK

Reboot creates a big problem for me. 

i have 3-4 networks. 

New device, after switching on:

1) Scann channels and create list of network 

2) After set  zgConfigPANID , zgDefaultChannelList and call ZDOInitDevice

3) End device send test msg and if answer wrong i call NLME_LeaveReq with 'rejoin= FALSE'

The device reboots. 

In the next cycle device connect to the next network and againe reboot using   NLME_LeaveReq . 

In this case device again connetc to the first network and i got crazy loop. 

There's a normal way to disconnect from the network ? 

  • Hi Andrey,

    What is the reason you want to disconnect without rebooting? If your goal is to prevent connecting to the networks that you already ruled out, I suggest that you keep a list of unwanted network in NV RAM, and when you scan for the list of available networks, you cross out the ones that you already know are not right. Next time you reboot following a leave request, if you see that there are no new networks except the ones you already ruled out, simply do not connect to any network.

    To store application data in NV, you should use the following functions:

    osal_nv_item_init(), osal_nv_write(), osal_nv_read().

    The NV Item IDs reserved for user applications are in the range of 0x0401 – 0x0FFF

    If you have further questions regarding this, please specify the version of Z-Stack you are using, and any other information that you think could be useful.

    Best regards,

    OD

  • i solve this problem using  " __no_init " value. As I see NLME_LeaveReq used Soft Reset . This is a very strange way for disconnect from the network.