Reply
Posts: 17
Registered: ‎09-28-2017

Allowing other devices to join my network ... Multi-network

I have an Simplicity Studio application that I want to allow up to 4 devices (2 Occupancy Sensors and

2 Door Sensors) to join the applications network.  Then it also needs to join a different network.

I have the joining with the different network working fine, but the application is not allowing other

devices to join the network. These other devices can join a network of an exiting device (I'm replacing

a device on that network), so I know that the devices work fine. I am using an EM3588 (if that matters)

that talks serially to my device application (a PIC32).

 

I made two endpoints (both are Thermostat devices) and two networks, with one endpoint configured to each network (Primary and Secondary).  I can join an existing network just fine. In the user interface for

the thermostat, there are FORM, PERMIT JOIN, JOIN, and LEAVE buttons that perform the following

code when pressed: I added the second thermostat device and second network in an effort to get the

devices to connect. Once I did that, it stopped staying connected to the other network just as soon as

it joined.

 

FORM button:

      if (emberAfNetworkState() ==  EMBER_NO_NETWORK)        // checks if no network is

                                                                                                           // joined/present

      {

            emberAfFindUnusedPanIdAndForm();    //if no network joined, form new network

            //Print the response of network form success from the Zigbee -> PIC

            SendCommandToThermostat("&FORM OK", 0);

      }

 

PERMIT button:

      if (emberAfNetworkState() == EMBER_JOINED_NETWORK)     // checks to see if currently

                                                                                                               // connected to a network

      {

            emberAfBroadcastPermitJoin(TIME_ALLOWING_JOIN);     // if connected, allow other devices

                                                                                                           // to connect to the network

            //Print the response of PJOIN allowed

            SendCommandToThermostat("&PERMIT OK", 0);

      }

 

JOIN button:

      if (emberAfNetworkState() == EMBER_NO_NETWORK) //check if network is not joined/present

      {

            emberAfStartSearchForJoinableNetwork();  // if no network connected, search

                                                                                  // for joinable networks.

      }

 

LEAVE button:

     if (emberAfNetworkState() == EMBER_JOINED_NETWORK) //checks to see if currently

                                                                                                          //connected to a network
    {
          emberLeaveNetwork(); //if connected, leave current network. Used to join a different network
          //Print the response of leave success from the Zigbee -> PIC
          SendCommandToThermostat("&LEAVE OK", 0);
    }

 

As far a Plugins go, I have the Binding Table Library, Multi-network Library, Packet Validate Library, Security Core Library, ZigBee PRO Stack Library, HAL - ADC, HAL - Antenna Stub, HAL - Configuration,

HAL - HAL Library, HAL - Debug JTAG, HAL - Simulated EEPROM version 1 library,

Form and Join Library, Network Find, Scan Dispatch, Ember Minimal Printf, RAIL Library,

Under Utility, I have Address Table, Concentrator Support, Counters, End Device Support, and Simple

Main.

 

Under Callbacks, I have the Network Find Finished and the only other ones are Cluster Related for when an Attribute changes or a Command is received.

 

I am fairly new to this development environment, any help is appreciated.

 

Thanks

 

 

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> YK
Posts: 215
Registered: ‎02-13-2017

Re: Allowing other devices to join my network ... Multi-network

A zigbee device can join to a single network one time so I think it's normal to leave original one if you ask it to join a new one.

If my reply answers your question, please click on "Kudo"s or "Accept as Solution"s to benefit others who have the same issue.

YK Chen
Posts: 17
Registered: ‎09-28-2017

Re: Allowing other devices to join my network ... Multi-network

The documentation says you can have a multi-network with two different networks. Now, one network per endpoint, so two endpoints are needed, but each endpoint can select a network.

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> YK
Posts: 215
Registered: ‎02-13-2017

Re: Allowing other devices to join my network ... Multi-network

What document do you refer to?
If my reply answers your question, please click on "Kudo"s or "Accept as Solution"s to benefit others who have the same issue.

YK Chen
Posts: 17
Registered: ‎09-28-2017

Re: Allowing other devices to join my network ... Multi-network

If you go to the ZCL Application Framework inside Simplicity Studio and go to the Plugins tab, under EmberZNet Libraries, left click on Multi-network Library (don't click on the checkbox part). Over in the right side of it, it tells you that you can have a single device be on multiple networks and time share between them. The device can be a router on only one network, but must be an end device on the other one.

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> YK
Posts: 215
Registered: ‎02-13-2017

Re: Allowing other devices to join my network ... Multi-network

If you refer to discussions in , you will see the following information.

Note that the choice of network contexts prior to API or CLI commands involves manual selection via either CLI command network set N or API command emberAfPushNetworkIndex(N), where N = network index 0 or 1.

So, you should call emberAfPushNetworkIndex to select network before you call any API to make sure it use correct endpoint.
If my reply answers your question, please click on "Kudo"s or "Accept as Solution"s to benefit others who have the same issue.

YK Chen
Highlighted
<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> YK
Posts: 215
Registered: ‎02-13-2017

Re: Allowing other devices to join my network ... Multi-network

The discussions you can refer to is at http://community.silabs.com/t5/Mesh/Node-with-configurable-device-type/m-p/151842/highlight/true#M65...
If my reply answers your question, please click on "Kudo"s or "Accept as Solution"s to benefit others who have the same issue.

YK Chen