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

Two Peripherals Without Central

I've got a use case that can essentially be boiled down to two battery-powered devices that have a button and an LED; when the user presses a button on device 1, the LEDs on both devices toggle; the same thing happens when the user presses a button on device 2.

Battery life is important, so I'd like to avoid having one of them act as a central.

I'm struggling trying to find a good approach to this--is there an obvious solution I'm missing? Is there a good resource for determining my power consumption as a central if I need to do that?

  • If you want to determine power, Nordic's "Online Power Profiler" might be a good start.

    Your concern as to not having one act as a central is of course correct if you would like to minimize power consumption; since you would not know when the button is pressed and you want to have a quick response I guess, it seems the connection must be established with a small connection interval to get responsive two-way communication.

    So, I even wonder whether BLE might be the way to go for this application as it is the core assumption for BLE that the Scanner/Central is a device with relative more power.

    If I would be to design such a system I would look into designing a simple wireless protocol (alternating Rx-Tx, i.e. ping-pong like) with the interval equal to the response time you would require. You could still use the nR52 for that though ;-)

  • Agree, bluetooth connection in your case just makes an overhead. Your task requires some response time that you know (as I understand, it's quite short). So, in any case both devices should wake up and listen for peer no less often that this interval. Your power consumption will depend mostly on what's happen every time the device wakes up - for example, in case of BLE connection this would be an exchange with two packets, each of them is at least 80 usec long (at 1 Mbit). That seems not too much, but when devices come out of visibility, central will drain a lot in scanning mode.

    The easiest way I see is to listen for a specific packet (containing only access address) on both devices for very short periods with acceptable interval, and transmit a burst of such packets when button is pressed.

Related