0

I am developing the application layer for my peripheral and my central device using the bluez library. I would like to set up a publish-subscribe messaging pattern such that the peripheral is the publisher and the central is the subscriber. I have several questions about how this should work:

How should the peripheral publish its data? Should the peripheral send the data in an advertising packet, or should the peripheral send the data to the central through a socket connection? If the peripheral sends the data through a socket connection, then would the socket connection need to remain open for the entire duration that the central is subscribing to the peripheral? Does the central need to communicate to the peripheral to turn on its publication mechanism?

In summary, I need a short description of how publish-subscribe should work in order to keep the power consumption of the peripheral as low as possible.

Stephen305
  • 1,077
  • 3
  • 22
  • 30
  • The Bluetooth LE specification already defines the "notify" and "indicate" mechanisms. Which is basically a definition of how publish-subscribe works between LE devices. Is your question different to that? – kaylum Oct 21 '15 at 22:05
  • I will check it out. Thanks! – Stephen305 Oct 22 '15 at 12:00

0 Answers0