0

Exact sequence of Peer Manager events at time of pairing.

Ankit gravatar image

asked 2017-04-21 11:39:38 +0200

Petter gravatar image

updated 2017-04-24 12:51:11 +0200

Hi,

I am performing "just pairing" using peer manager ( SDK 11.0 ) in my custom board which uses nrf52 chip.

I am getting this events

  1. PM_EVT_CONN_SEC_START,
  2. PM_EVT_CONN_SEC_SUCCEEDED,
  3. PM_EVT_PEER_DATA_UPDATE_SUCCEEDED - this events i am getting 4 times but sometimes i am not getting this event 4 times.

Please help me to find the correct sequence of pairing procedure and to find the correct sequence when already paired device gets connected.

edit retag flag offensive close delete report spam

1 answer

Sort by ยป oldest newest most voted
0
Petter gravatar image

answered 2017-04-24 13:08:39 +0200

You should get:

  1. PM_EVT_BONDED_PEER_CONNECTED - A connected peer has been identified as one with which we have a bond.
  2. PM_EVT_CONN_SEC_START - A security procedure has started on a link, initiated either locally or remotely.
  3. PM_EVT_CONN_SEC_SUCCEEDED - A link has been encrypted, either as a result of a call to @ref pm_conn_secure or a result of an action by the peer.

PM_EVT_PEER_DATA_UPDATE_SUCCEEDED - A piece of peer data was stored, updated, or cleared in flash storage.

edit flag offensive delete publish link more

Comments

Thanks Petter for responding.

I am getting these events. But after receiving PM_EVT_CONN_SEC_START event. I start data transfer over BLE causes problem in my communication. So i have to wait untill all peer manager events are completed.

Is there any way to tell peer manager that do not update anything. By doing so i do not want to receive PM_EVT_PEER_DATA_UPDATE_SUCCEEDED events multiple times.

Ankit ( 2017-04-24 14:12:40 +0200 )editconvert to answer

What kind of problem? I don't understand. Why do you have to wait until the events are completed? I don't think you can tell Peer Manager not to update anything, I guess it is doing it for a reason. I'm not exactly sure what is updated in your case though?

Petter Myhre ( 2017-04-24 14:49:09 +0200 )editconvert to answer

Hi,

My application is doing multiple thing at the same time like communication over BLE, data transfer over uart, and few sensor management.

So while pairing process is going on, if i do uart communication at the same time, i am receiving incomplete uart data. And this only happens when my central is busy doing peer-manager-data-update. So it is very important for me to get exact event that state that peer-manager has completed its work. So that i can start other stuff.

Ankit ( 2017-04-27 16:10:08 +0200 )editconvert to answer

I found the solution. it is fds which causes the peer-manager event miss. Now i perform fds_gc() after every peer-manager operation and it all works fine.

Ankit ( 2017-04-27 16:12:28 +0200 )editconvert to answer

Great! If I answered your question please consider accepting my answer by clicking the grey circle next to it.

Petter Myhre ( 2017-04-27 16:39:29 +0200 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-04-21 11:39:38 +0200

Seen: 78 times

Last updated: Apr 24