RF4CE - how to avoid unpairing when a new discovery fails

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RF4CE - how to avoid unpairing when a new discovery fails

1,302 Views
rodrigomanzanar
Contributor II

Hi community!

I'm working on a project using Freescale BeeStack Consumer, ZigBee RF4CE specification and an MC13233 microcontroller.

I have a controller paired with a target but sometimes I try to pair the controller with another target.

The problem is that, when launching the discovery, the controller gets unpaired and I'd like to remain it paired to the first target if the discovery fails.

How can I recover the former pairing then?

Thanks in advance!

Rodrigo

Labels (1)
  • RF

7 Replies

919 Views
rodrigomanzanar
Contributor II

Hello community,

I tried Offline Pairing but I got not success. These are the steps I followed:

- When I launch the discovery (from a paired controller), I save a copy of nodeData before calling NLME_UnpairRequest

- When I don't receive a successful discovery confirmation I restablish, with the copy of nodeData, the appPairInfo, the macdef and then I call NWK_AddNewPairTableEntry

- After all, I restablished also de nodeData but communications still don't work.

What am I missing?

Thanks in advance,

Rodrigo

0 Kudos

919 Views
miguel_reyes
NXP Employee
NXP Employee

Hello Rodrigo,

Couple of questions to understand what are you seeing.

  1. From the beginning of this conversation, you wanted to pair many targets to one controller. Is it correct?
  2. If not, please, provide more information about what you want to accomplish?
  3. What do you mean by an offline pairing?
  4. Why are you using the  NLME_UnpairRequest()?

Have you tried the Target Node and the Controller Node Demo Apps included in the BeeStack Consumer Codebase?

What is the Codebase version you are using? 

I ran a quick test having two targets connected to a Controller Node and I did not see any issue. I encourage you to test these demos, it is a good starting to understand more about pairing process. A call to NLME_UnpairRequest() is not necessary to do another pairing procedure. 

919 Views
rodrigomanzanar
Contributor II

Hello Jose Miguel,

Here they are the responses to your questions:

     1, 2. The application consist on several target nodes connected to one (and only one) controller each of them.

     3. Offline Pairing is explained at the chapter 4 of the BeeStack Consumer Application User’s Guide: 4.5.4 Offline Pairing.

     4. I think that the NLME_UnpairRequest() is included by the Demo App (I use them with 1.7.1 Codebase) when you start a discovery. It's true that I should only call that function if I discover a new Target but the problem, right now, is that I can't restablish the communication from the controller with the old target after launching a new discovery.

Thank you for your interest.

0 Kudos

919 Views
miguel_reyes
NXP Employee
NXP Employee

Hello Rodrigo,

How many targets do you want to have in your application?

Could you share a sniffer log?

Could you give more details about your set up?

The Controller Node Demo App has the choice to select how many target devices you want to connect. By default, when you generate the app, it is set to 5 target nodes, but you could increment this number when generating the project from BeeKit. I would recommend to use the push button pairing as it is shown in the Demo App to pair each device.

About the NLME_UnpairRequest(), it is not necessary to call this function to do a new discovery. If you call the NLME_UnpairRequest(), you will erase the information of the paired device.

WARNING: For the Target Nodes, each MAC address must be different for each one.

919 Views
rodrigomanzanar
Contributor II

Hello again Jose Miguel,

Thank you for your last response. I've thought about it and, finally, I've solved the problem.

Before asking this question I tried to launch the program without the NLME_UnpairRequest() but I couldn't restablish the communication because of the channel.

Now, I've called the NLME_GetRequest() and NLME_SetRequest() and the problem has dissapeared.

I'd like to know if I can unpair the target, launching a request from the controller, without unpairing the controller but this is a minor problem that can be solved when installing the product.

Thanks again for your patience!

0 Kudos

919 Views
miguel_reyes
NXP Employee
NXP Employee

Hello Rodrigo,

Could you provide more information about what application are you running?

I have run Target Node and Controller Node Apps from Freescale BeeStack Consumer Codebase 1.7.1 and I have not had any problems pairing two targets to a controller.

Have you tried them?

919 Views
rodrigomanzanar
Contributor II

Hello Jose Miguel,

The application consist on several target nodes connected to one (and

only one) controller each of them.

To pair a controller to a target, you must push a button on the target

that allows it to respond to a discovery request and then launch the

discovery from the controller.

The problem is that the target node can't be easily accessed so, if a

user launches a discovery, the controller node should stay paired to his

target if the discovery gets no response.

Thanks for your response and for any other,

Rodrigo

El 25/09/2013 19:02, Jose Miguel Reyes Chaidez escribió:

>

Freescale Community <https://community.freescale.com/>

<https://community.freescale.com/>

>

RF4CE - how to avoid unpairing when a new discovery fails

reply from Jose Miguel Reyes Chaidez

<https://community.freescale.com/people/josem.reyes.chaidez?et=watches.email.thread>

in /Other Freescale Solutions/ - View the full discussion

<https://community.freescale.com/message/352250?et=watches.email.thread#352250>

>

0 Kudos