0

I want to make wireless doorbell. All that I need is to send notification from Arduino to iPhone via Bluetooth whenever button is pressed.

I am able to connect from iPhone to arduino via Bluetooth and then send notifications from Arduino to iPhone and vice verse. However, I can't connect from Arduino to iPhone whenever I want.

I know that in order to connect to iPhone its Bluetooth must be in peripheral mode.

After searching for a couple of hours all that I've found is that in most of the cases people are using Internet services for that purpose. I don't want to use Internet cause I want doorbell to be low energy consumption and work from battery as long as possible.

Please tell me, is it possible to do with Bluetooth technology? If not then what method I should use in order to send notification from doorbell to iPhone?

metal4people
  • 131
  • 2
  • 5

2 Answers2

1

As long as you are happy for the doorbell to only notify the phone whilst the phone is in Bluetooth range, then you would do it as follows:

  1. Set up the door bell as a Bluetooth peripheral and have an iPhone app that runs as a BLE central
  2. Use Bluetooth background mode in your iOS app
  3. Have the phone connect to the BLE doorbell and subscribe to NOTIFY on a specified characteristic
  4. When the doorbell button is pressed, have the BLE peripheral issue a NOTIFY on the characteristic
  5. When the app gets the callback triggered by the NOTIFY, have it issue a local notification that there is someone at the door
  6. If the iOS app gets notified that the doorbell has disconnected (presumably because the phone has gone out of range of the doorbell), have it immediately issue another connect to the peripheral; iOS will complete this connection when the peripheral comes back into range.

For more information refer to the Core Bluetooth Programming Guide

If you want the doorbell to be able to notify the phone when the phone is out of direct Bluetooth range then you will need to use WiFi and a server to send a push notification to the phone.

Paulw11
  • 108,386
  • 14
  • 159
  • 186
-1

I may be wrong, but I believe the answer to this question is still valid.

The short answer, if this is still the case, is that you cannot do it with bluetooth.

You can do it with Android though :D

Community
  • 1
  • 1
TooManyEduardos
  • 4,206
  • 7
  • 35
  • 66