Reply
Posts: 33
Registered: ‎12-11-2016

EMBER_NOT_JOINED response to networkInit

Is there any way of finding out why a coordinator would not rejoin the network, and returns EMBER_NOT_JOINED to a networkInit EZSP call?  Most of the time it will work fine and 

EMBER_NETWORK_UP is returned, but occasionally it will be EMBER_NOT_JOINED.

 

I can't find anything common that would tie failures to something external - eg it doesn't seem to matter if the hardware is physically reset or not (I perform a software RESET anyway). The configuration that's sent prior to the networkInit call always works, and there's no ASH level packet errors, so I'm assuming that there's no problems at that level. In fact all EZSP calls are responding fine both before and after the network init.

 

I could imagine timing could be an issue given it's apparently random, but I've tried adding in delays and that doesn't help. It would be useful if there was an error return, but I can't find anything.

 

Any thoughts would be appreciated.

 

Thanks

Chris

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

Hello Chris,

 

An EMBER_NOT_JOINED after calling emberNetworkInit() means the node was not part of a network previously. It sounds like the node does not have any network parameters stored. The node must first form or join a network.

 

Cheers,

Konrad

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Thanks for the reply.

 

The controller IS part of the network - as said earlier, sometimes it works fine, and other times it doesn't - running exactly the same code. The stick is reset, but as I understand it, it should use the network settings stored in NV memory - and this works most of the time, but then it will not work (returning NOT_JOINED) and then if I restart it will work again.

 

So, I'm assuming that there are other reasons that this can also be returned.

 

I may have found a solution to stopping it returning not joined, but I'm waiting for customer feedback.

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Unfortunately the solution I had hoped for did not work, so I'm still at a loss as to why sometimes the NCP will start with OK, and other times it will return NOT_JOINED...

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

EMBER_NOT_JOINED means that the device was not able to initiate the network with the parameters stored in the tokens. Does this happen across all your testing devices?

 

Calling emberGetNetworkParameters() before emberNetworkInit() should show us if the tokens were set correctly.

 

Cheers,

Konrad

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Does this happen across all your testing devices?

Yes - it happens on multiple devices and both here at at the customers site.

 

> Calling emberGetNetworkParameters() before emberNetworkInit() should show us if the tokens were set correctly.

 

Well here's the response from one restart -:

19:55:09.648  DEBUG  EzspAddEndpointRequest [endpoint=1, profileId=260, deviceId=0, appFlags=0, inputClusterList=00 01 06, outputClusterList=00 01 06]
19:55:09.653  DEBUG  EzspAddEndpointResponse [status=EZSP_SUCCESS]
19:55:09.665  DEBUG  EzspGetNetworkParametersResponse [status=EMBER_NOT_JOINED, nodeType=UNKNOWN, parameters=EmberNetworkParameters [extendedPanId={B1 68 DE 3A 00 00 00 00}, panId=8193, radioTxPower=0, radioChannel=11, joinMethod=EMBER_USE_MAC_ASSOCIATION, nwkManagerId=0, nwkUpdateId=0, channels=07FFF800]]
19:55:09.669  DEBUG  EzspNetworkInitResponse [status=EMBER_NOT_JOINED]
19:55:09.677  DEBUG  EzspGetNetworkParametersResponse [status=EMBER_NOT_JOINED, nodeType=UNKNOWN, parameters=EmberNetworkParameters [extendedPanId={B1 68 DE 3A 00 00 00 00}, panId=8193, radioTxPower=0, radioChannel=11, joinMethod=EMBER_USE_MAC_ASSOCIATION, nwkManagerId=0, nwkUpdateId=0, channels=07FFF800]]
19:55:09.684  DEBUG  EzspGetCurrentSecurityStateResponse [status=EMBER_NOT_JOINED, state=EmberCurrentSecurityState [bitmask=[EMBER_GLOBAL_LINK_KEY, EMBER_HIGH_SECURITY_MODE, EMBER_TRUST_CENTER_USES_HASHED_LINK_KEY], trustCenterLongAddress=00003ADE68B1CDCD]]

 

This seems to indicate that the nodeType is not know. However, without setting this, and rerunning exactly the same code a few seconds later I get the following -:

 

19:55:16.283  DEBUG  EzspAddEndpointRequest [endpoint=1, profileId=260, deviceId=0, appFlags=0, inputClusterList=00 01 06, outputClusterList=00 01 06]
19:55:16.289  DEBUG  EzspAddEndpointResponse [status=EZSP_SUCCESS]
19:55:16.299  DEBUG  EzspGetNetworkParametersResponse [status=EMBER_SUCCESS, nodeType=EMBER_COORDINATOR, parameters=EmberNetworkParameters [extendedPanId={B1 68 DE 3A 00 00 00 00}, panId=8193, radioTxPower=0, radioChannel=11, joinMethod=EMBER_USE_MAC_ASSOCIATION, nwkManagerId=0, nwkUpdateId=0, channels=07FFF800]]
19:55:16.304  DEBUG  EzspNetworkInitResponse [status=EMBER_SUCCESS]
19:55:16.305  DEBUG  RX: EzspStackStatusHandler [status=EMBER_NETWORK_UP]
19:55:16.305  DEBUG  Unhandled EZSP Frame: EzspStackStatusHandler [status=EMBER_NETWORK_UP]
19:55:16.313  DEBUG  EzspGetNetworkParametersResponse [status=EMBER_SUCCESS, nodeType=EMBER_COORDINATOR, parameters=EmberNetworkParameters [extendedPanId={B1 68 DE 3A 00 00 00 00}, panId=8193, radioTxPower=0, radioChannel=11, joinMethod=EMBER_USE_MAC_ASSOCIATION, nwkManagerId=0, nwkUpdateId=0, channels=07FFF800]]
19:55:16.320  DEBUG  EzspGetCurrentSecurityStateResponse [status=EMBER_SUCCESS, state=EmberCurrentSecurityState [bitmask=[EMBER_HAVE_TRUST_CENTER_LINK_KEY, EMBER_GLOBAL_LINK_KEY, EMBER_TRUST_CENTER_USES_HASHED_LINK_KEY], trustCenterLongAddress=0022A300001732BF]]

I copied the above into this message, then re-ran, and it again failed -:

19:59:34.231  DEBUG  EzspAddEndpointRequest [endpoint=1, profileId=260, deviceId=0, appFlags=0, inputClusterList=00 01 06, outputClusterList=00 01 06]
19:59:34.237  DEBUG  EzspAddEndpointResponse [status=EZSP_SUCCESS]
19:59:34.249  DEBUG  EzspGetNetworkParametersResponse [status=EMBER_NOT_JOINED, nodeType=UNKNOWN, parameters=EmberNetworkParameters [extendedPanId={B1 68 DE 3A 00 00 00 00}, panId=8193, radioTxPower=0, radioChannel=11, joinMethod=EMBER_USE_MAC_ASSOCIATION, nwkManagerId=0, nwkUpdateId=0, channels=07FFF800]]
19:59:34.253  DEBUG  EzspNetworkInitResponse [status=EMBER_NOT_JOINED]
19:59:34.260  DEBUG  EzspGetNetworkParametersResponse [status=EMBER_NOT_JOINED, nodeType=UNKNOWN, parameters=EmberNetworkParameters [extendedPanId={B1 68 DE 3A 00 00 00 00}, panId=8193, radioTxPower=0, radioChannel=11, joinMethod=EMBER_USE_MAC_ASSOCIATION, nwkManagerId=0, nwkUpdateId=0, channels=07FFF800]]
19:59:34.268  DEBUG  EzspGetCurrentSecurityStateResponse [status=EMBER_NOT_JOINED, state=EmberCurrentSecurityState [bitmask=[EMBER_TRUST_CENTER_USES_HASHED_LINK_KEY, EMBER_HIGH_SECURITY_MODE, EMBER_GLOBAL_LINK_KEY], trustCenterLongAddress=00003ADE68B1CDCD]]
19:59:34.268  DEBUG  Error during retrieval of security parameters: EzspGetCurrentSecurityStateResponse [status=EMBER_NOT_JOINED, state=EmberCurrentSecurityState [bitmask=[EMBER_TRUST_CENTER_USES_HASHED_LINK_KEY, EMBER_HIGH_SECURITY_MODE, EMBER_GLOBAL_LINK_KEY], trustCenterLongAddress=00003ADE68B1CDCD]]

Note that I'm not showing the earlier initialisation where I simply set and read back configuration parameters and policies.  I can provide a full startup log if needed.

 

It seems very hit and miss as to whether or not it will start. All commands sent are acknowledged - there are no CRC errors at ASH level and all commands get their expected response other than the NetworkInit.

 

Thanks

Chris

 

 

 

 

 

 

 

 

 

 

 

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

Can you attach a main flash dump as an s37 file? It would be interesting to see if the tokens are being rewritten. We can take this offline if this is project sensitive communication.

 

Cheers,

Konrad

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

It's no problem to paste the code here - I'm just using the standard NCP code and it's a test base, so nothing sensitive.

 

 

However, tonight I updated my Studio, and now I can't connect to any devices! The context menu now only has the device configuration. Has something changed in Studio with the way this works?

 

Screen Shot 2017-05-09 at 22.55.37.png

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

You should be able to connect through the ISA3 ethernet connection. Is that not the case?

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Do you mean connecting through the Simplicity Studio? If so, then I no longer have the connect option (or pretty much any option) in the menu. Or is there another way to do this without using Studio?

 

I'm just reinstalling Studio to see if that resolves the issue.

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

Going through Device configuration option, it is possible to set the target under the Device Hardware tab. However, most likely a restart of your system and reopening Studio should get the device to identified properly.

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Well, a complete reinstall of Studio didn't help - still no options available when right clicking on the device. Going into Device Configuration, which is the only option I now have, doesn't seem to provide an option for downloading the device data.

 

This was all working fine until the latest update of Studio yesterday (in hindsight I shouldn't have installed the update!).

 

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Ok, so I've managed to get this to connect to the ISA3 again - finally. I had expected to find an option to download the image, but I don't see such an option. Can you describe how this is done please?

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Thanks - I've attached the files. My guess is that the data is being stored in the flash, otherwise I would expect that it would never work after the device has been powered down and this isn't the case...

 

Anyway, let me know what you find and if there's anything you want me to try or provide. I'd really like to get this resolved quite quickly.

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Any update on this?

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

Hello Chris,

 

After parsing your simee we see some odd things.

 

1. Stack profile changes once in awhile.

2. Large amount of binding table writes happening through joining process.

3. Trust Center token manipulation.

4. Node type changes.

5. Pan ID changes.

 

Could you post an EZSP trace from the NCP?

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

What I mean by "odd" is that a lot of these things are happening possibly at the same time. Maybe there are multiple processes running on the host?

Posts: 33
Registered: ‎12-11-2016

Re: EMBER_NOT_JOINED response to networkInit

Thanks for the feedback. I've attached a EZSP packet trace from the startup of my application (I hope this is what you're after).

 

This shows the stack initialisation, and the startup where I request information from the devices connected to the coordinator to get a view of the network.

 

There has been discussion elsewhere about changing the stack profile. I recall that by default the profile is 0, and it doesn't seem to be possible to change this so we have to set the number of supported profiles to 2, and then change it. I'm not sure I understand how this can impact the issue with EMBER_NOT_JOINED being returned periodically though, but I would love to resolve that issue as well Robot wink

 

Let me know if you require anything else.

 

Cheers

Chris

Posts: 180
Registered: ‎03-31-2014

Re: EMBER_NOT_JOINED response to networkInit

Hi Chris,

 

This looks fairly normal although there are a few configuration commands that repeat but with different values. This is probably not related to your problem. I would take a look at our sample host app and compare our initialization process to yours.

 

I do not see the moment where the device is out of the network. Would you be able to capture the device falling out of the network? Also, an ISD capture would help, so that we can see all the packets over the air with the EZSP packets just in case there might be some weirdness there.