This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

1-1 permanent connection between central and peripheral

Hello,
I am trying to implement 1-1 connection between a central and a peripheral, with these (classic) requirements :
- when starting central, scan for any peripheral with a given name
- connect to it => peripheral does not advertise anymore
- when central is powered down, peripheral must not advertise
- when central is powered up with a peer stored, it should connect to it

For now, I'm not concerned by security issues, I'm looking for the minimal implementation to make it work.

I have some questions :
A) From what I gather from the documentation, I guess the correct way to implement this is with the peer manager + whitelist with a maximum link of 1. Is this correct ? Is there a simpler/other API ?
B) Is the reconnect automatic at start with the peer manager ? If not, what is the function for that ? scan with whitelist ?
C) Is this possible with the "No pairing/bonding" mode of peer manager ? If not, is "Pairing, no bonding" the way to go ?
D) Is there a standard way for the central to indicate to the peripheral to reset peer or should I create a custom service for that ?

Thanks !

Parents
  • Hi,

    - when central is powered down, peripheral must not advertise
    - when central is powered up with a peer stored, it should connect to it

    I doubt that How the peripheral knows the central is power off and on to advertise or not.  

    A) From what I gather from the documentation, I guess the correct way to implement this is with the peer manager + whitelist with a maximum link of 1. Is this correct ? Is there a simpler/other API ?

    That is correct. You can take a look HID Mouse Application for whitelist, and Heart Rate Application for Peer Manager and LESC pair. You might be interested in this similar case

    B) Is the reconnect automatic at start with the peer manager ? If not, what is the function for that ? scan with whitelist ?

    No, you could scan and connect with the whitelist. See this post

    C) Is this possible with the "No pairing/bonding" mode of peer manager ? If not, is "Pairing, no bonding" the way to go ?

     Yes, see Security parameters for Pairing, no bonding.

    D) Is there a standard way for the central to indicate to the peripheral to reset peer or should I create a custom service for that ?

      You could send strings to the peripheral and handle it to execute NVIC_SystemReset();

    -Amanda H.

  • I doubt that How the peripheral knows the central is power off and on to advertise or not.
    The peripheral can know the central disconnected.   
    If the peripheral doesn't advertise, isn't it possible for the central to connect using the peer address.

     > You could send strings to the peripheral and handle it to execute NVIC_SystemReset();
    I didn't meant a perihperal reset, I meant a peer reset (to allow the peripheral to be "free" and be scannable/connectable by another central)

Reply
  • I doubt that How the peripheral knows the central is power off and on to advertise or not.
    The peripheral can know the central disconnected.   
    If the peripheral doesn't advertise, isn't it possible for the central to connect using the peer address.

     > You could send strings to the peripheral and handle it to execute NVIC_SystemReset();
    I didn't meant a perihperal reset, I meant a peer reset (to allow the peripheral to be "free" and be scannable/connectable by another central)

Children
Related