BLE Configuration to accept BLE pairing request

I have a broadcaster and a central device. The broadcaster beacons data every 60sec and goes to sleep, a configuration I have considered for minimal power consumption. Now in addition:

1- I want every 24 hours the broadcaster sends request for BLE pairing to the central device and pairs with it for a secure connection. 

2- I want the central device be able to send request for BLE pairing to the broadcaster and pairs with it casually upon a user request. This will be somehow interrupt driven, so that upon central device request, the broadcaster wakes up and pair with it. 

What configuration I should use and what is the impact of this configuration change on my broadcaster power consumption. 

Parents
  • Hi Kaveh, 

    There is no way a central can wake up a broadcaster without the broadcaster pro-actively wake up and advertise periodically. There is no "wake up on radio" option with BLE as this method require high sleep current. 

    So the way you can do this is to configure the broadcaster to sleep and wake up every say every 30 seconds to do advertising. If the central has receive a request from end user to connect to the broadcaster it can scan and connect to the broadcaster when it scan the advertising packet. The latency here will be maximum 30 seconds. You can reduce power consumption by reduce the rate of wake up rate. But that will increase the latency as well. 

    Please also note that if you do bonding, both peer devices will store a LTK (Long Term Key) and they can re-encrypt the link automatically. You don't need to do pairing on every connection. 

  • Thanks Hung. 

    So I will configure my end device as a broadcaster and the other device as central. The broadcaster can beacon every 15 sec. If there is a request from the user to send some data from central to broadcaster, the central will scan for that particular broadcaster and waits until it receives a beacon from the broadcaster. The next time the broadcaster beacons and that is received by the central, the central should request and BLE pair with broadcaster? Is it possible to pair with a broadcaster? 

  • Hi Kaveh, 


    Yes, any example central/peripheral in the SDK would do that. 
    The only example that doesn't do connection is the beacon example. 
    I would suggest to test with the \examples\ble_peripheral\ble_app_blinky as the peripheral (Broadcaster) and \examples\ble_central\ble_app_blinky_c as the central. 

    Or you can test with  ble_app_uart and ble_app_uart_c.

  • I see. right now my end device is set as a non-connectable advertiser and just beacons data. 

    I have to change its role to a peripheral or connectable advertiser? 

    Does it increase my device power consumption? Can it still beacon if its role is peripheral? 

  • Hi Kaveh, 
    The reason the beacon was advertising in non-connectable is in fact to save power consumption. If a connection is not needed, you should advertise in non-connectable mode so that the advertiser doesn't have to switch to RX mode to wait for connect request packet.

    But in your case you do need a connection so you need to do it in connectable mode. The difference is not significant though. The main consumption is when the device in sleep mode, especially when you advertise with long interval (15 seconds for example)

  • When the peripheral sends connectable beacon, how long it should wait to hear back from central if there is BLE pairing to happen? 

  • Hi Kaveh, 

    Please don't use the term "pairing" when you want to say "connecting". 

    Usually after sending the advertising packet the peripheral will switch to RX mode. This take 150us to switch to RX mode and if there is no connect request received the RX period will terminate after 60us.

Reply Children
Related