1
votes

I am brand new to developing for iOS devices. I am a long time apple user and will be finishing up my BS in electrical engineering this spring. I am currently working on a project for a design class and have some questions regarding Bluetooth Low Energy and how it is implemented in iOS (both 5 and 6).

First a bit of background about the project. We are designing a occupancy detection system for a building. The plan is to have BLE modules attached to walwarts throughout the entire building. These devices would communicate with a users smartphone and provide location information to a backend system. We want this system to require very little user interaction. Essentially they would download the app, enable BLE, and then forget about the app. At least at first. We plan to add further functionality to the app later.

I have done a bit of research and it sounds like all BLE control will be done via an app. I plan to build off of TI's demo app.

My first questions is regarding how backgrounding works with BLE. I understand that there are two different backgrounding methods, explained here. It sounds like we would want to use session backgrounding, to minimize user interaction as much as possible. But my question is does the backgrounding stay enabled indefinitely?

Backgrounding Questions

  1. Event or session backgrounding?
  2. Does the backgrounding stay enabled indefinitely?
  3. What happens when the phone is reset? Or if a restore is done (assuming the user backed up their apps)?
  4. Can other apps disable the BLE functionality?

My next category of questions involves the central and peripheral roles. Our main goal is to limit power usage on the smartphone so that users will not be tempted to disable bluetooth. I believe this should be possible with either mode.

Central or Peripheral

  • Do you see any benefits to having the iOS device being one over the other?
  • Would it be better to have the iPhone send out an advertisement periodically or the BLE wall-wart device?
1

1 Answers

2
votes

I can't answer the first part of the question.

However, central or peripheral?

The BLE Attribute Protocol (ATT) and Generic Attribute Profile (GATT) are designed to be asymetric so that the Peripheral device can be as low resource as possible e.g. in terms of processing and memory. Literally, the Peripheral is just a look up table of handles to attribute values with some extra coding to bang Hardware values into the right memory address, most of the time.

The Central device, when it connects to a Peripheral, needs to interrogate it's ATT database and work out which handles are related to which Attributes it may be interested in. This takes processing power and dynamic memory - a lot more than the Peripheral device has.

Therefore, the iPhone should be the Central device.

Not saying, it can't also be a Peripheral if the use case requires it.