Getting Started with iBeacon Overview
Introduced in iOS 7, iBeacon is an exciting technology enabling new location awareness possibilities for apps. Leveraging Bluetooth Low Energy (BLE), a device with iBeacon technology can be used to establish a region around an object. This allows an iOS device to determine when it has entered or left the region, along with an estimation of proximity to a beacon . There are both hardware and software components to consider when using iBeacon technology, and this document will give an introduction to both, along with suggested uses and best practices to help ensure a highly effective deployment leading to an outstanding user experience.
!iBeacon has 3 different audiences. You may fall into one, two, or possibly all three of these categories, depending on your role.
!1. App Developers If you want to add new location awareness to your application, you would use the Core Location APIs in iOS to be notified when the iOS device has moved into or out of a beacon region. You can also determine approximate proximities to a device generating iBeacon advertisements. Everything you need to get started is included in the iOS SDK, no additional license is required.
-
People Deploying Devices With iBeacon Technology Whether you manage a sports arena, a museum, a retail store, or any of the myriad other physical locations where beacons could be employed, you need to be aware of how these devices work, issues surrounding signal strength and materials, and understand how to calibrate and test your deployment. If you are interested in using the iBeacon Logo on signage at a venue, but will not make devices with iBeacon technology, you will need to obtain an iBeacon logo license before using the iBeacon logo. Please visit https:// developer.apple.com/ibeacon/ to apply for a license to use the iBeacon logo.
-
People Making Devices With iBeacon Technology If you are interested in manufacturing devices with iBeacon technology, you will need to obtain a license before building these devices. Please visit https://developer.apple.com/ ibeacon/ to apply for an iBeacon license. Licensees receive access to technical specifications, a license to use the iBeacon logo, and the iBeacon Identity Guidelines.
!
Devices with iBeacon Technology
Devices with iBeacon technology can be powered using coin cell batteries for a month or longer, or operate for months at a time using larger batteries, or can be powered externally for extended periods of time. iOS devices can also be configured to generate iBeacon advertisements, although this functionality is limited in scope. This would be appropriate for uses such as a Point Of Sale or kiosk application, or for an application that wants to become an iBeacon for a short time while someone is actively using the application.
!An iBeacon advertisement provides the following information via Bluetooth Low Energy: !
June 2, 2014
Field Size Description
[图片上传失败...(image-f1432b-1687190069755)]
UUID
Major
16 bytes
2 bytes
Application developers should define a UUID specific to their app and deployment use case.
[图片上传失败...(image-8b31e0-1687190069755)]
Further specifies a specific iBeacon and use case. For example, this could define a sub-region within a larger region defined by the UUID.
2 bytes
Allows further subdivision of region or use case, specified by the application developer.
[图片上传失败...(image-f9033b-1687190069755)]
[图片上传失败...(image-e1e3aa-1687190069755)]
Minor
!The UUID, major and minor values provide the identifying information for the iBeacon. Generally speaking, this information is hierarchical in nature with the major and minor fields allowing for subdivision of the identity established by the UUID. UUIDs can be generated by using the uuidgen command line utility in OS X, or programmatically using the NSUUID Foundation class.
!The following table shows examples of how these values may be used for a nationwide retail store. The UUID is shared by all locations. This allows an iOS device to use a single identifier to recognize any of the stores with a single region. Each specific store, San Francisco, Paris, and London, is then assigned a unique major value, allowing a device to identify which specific store it is in. Within each individual store, departments are given separate minor values, although these are the same across stores to make it easier for an app on a device to readily identify departments.
!
Minor
[图片上传失败...(image-4d3409-1687190069755)]
[图片上传失败...(image-a60bf0-1687190069755)]
[图片上传失败...(image-1ac8e7-1687190069755)]
Store Location
UUID
San Francisco
Paris
D9B9EC1F-3925-43D0-80A9-1E39D4CEA95C
London
[图片上传失败...(image-12b697-1687190069755)]
[图片上传失败...(image-ba0a1d-1687190069755)]
Major
1
Clothing
Automotive
10
20
30
2
10
20
30
3
10
[图片上传失败...(image-5e759e-1687190069755)]
Housewares
20
[图片上传失败...(image-dcc2ae-1687190069755)]
30
[图片上传失败...(image-d7c2ff-1687190069755)]
[图片上传失败...(image-346dac-1687190069755)]
[图片上传失败...(image-835a27-1687190069755)]
[图片上传失败...(image-6de49d-1687190069755)]
[图片上传失败...(image-507155-1687190069755)]
[图片上传失败...(image-2fb92e-1687190069755)]
!Using this information, an iOS device could identify when it has entered or left one of the stores, which specific store it is, and what department the user might be standing in. These values are determined by the person or organization deploying the beacon device. UUIDs, and major & minor values are not registered with Apple.
!iBeacon relies on BLE, and therefore require an iPhone 4S (or later), iPod touch (5th generation), iPad (3rd generation or later), or iPad mini.
!For more details about incorporating iBeacon technology in a product, you will need to obtain a license from Apple. Please visit https://developer.apple.com/ibeacon to apply for an iBeacon license.
June 2, 2014
!iBeacon Software — Core Location APIs Prior to iOS 7, Core Location used regions defined by a geographic location (latitude and
longitude) and a radius, known as a ‘geofence’. iBeacon enables a new level of flexibility by defining regions with an identifier. This allows beacons to be affixed to objects that are not tied to a single location. For example, a beacon device could be used to set a region around a movable object like a food truck or on a cruise ship. Furthermore, the same identifier can be used by multiple devices. This would enable a retail chain to use beacons in all their locations and allow an iOS device to know when it enters any one of them.
!Privacy and Location Because iBeacon is part of Core Location, the same user authorization is required in order to be used. Users will see the same location authorization alert when an application attempts to use the iBeacon APIs:
[图片上传失败...(image-cb8a9c-1687190069755)]
“AirLocate” Would Like to Use Your Current Location
Don’t Allow OK
Applications that use beacon region APIs in CoreLocation will appear in the Settings app under Privacy > Location Services and users can allow or deny an application’s access to iBeacon functionality at any time. Furthermore, any Bluetooth packets that are associated with iBeacon are excluded from the CoreBluetooth APIs.
!As with geofence region monitoring, when in active use the status bar will show a hollow arrow. When using ranging, the status bar will show the solid location arrow.
!Accuracy of iBeacon To ensure an effective user experience, it is important to consider how signals from a beacon are detected and used to determine accuracy. When an iOS device detects a beacon’s signal, it uses the strength of the signal (RSSI, or Received Signal Strength Indication) to determine both proximity to the beacon, as well as the accuracy of its estimation of proximity. The stronger the signal, the more confident iOS can be about the proximity to the beacon. The weaker the signal, the less confident iOS is about the proximity to the beacon.
!Accuracy can best be understood by relating it to how GPS works in iOS today. When an iOS device can clearly receive GPS signals, such as when a device is in the open outdoors with an unobstructed line of sight to the orbiting GPS satellites, the more accurately your location can be determined. This can easily be seen in the Maps application where the location accuracy is represented by a blue circle surrounding your current location indicator. If a device is indoors or the line of sight to the satellites is obstructed, a large blue circle indicates a lower accuracy. That is, the device could be located anywhere within the blue circle. As the line of sight to the satellites improves (e.g. the device is taken outdoor or removed from a backpack) the accuracy improves, represented by a smaller blue circle. With a better received signal strength the device can narrow the margin of error and be more confident of its location.
June 2, 2014
[图片上传失败...(image-de8096-1687190069755)]
[图片上传失败...(image-f5a9f0-1687190069755)]
[图片上传失败...(image-3eec23-1687190069755)]
[图片上传失败...(image-a05487-1687190069755)]
[图片上传失败...(image-e5c549-1687190069755)]
[图片上传失败...(image-e95dcc-1687190069755)]
[图片上传失败...(image-3ccef7-1687190069755)]
!
! !
Device indoors, low accuracy depicted by large blue circle. The device may be anywhere in the circle.
Device outdoors, but in a backpack. Greater accuracy than indoors represented by a smaller, but still present, blue circle.
Device outdoors, held in hand with clear view to the sky. Greatest level of accuracy.
With signals are received from a device with iBeacon technology, the signal strength is generally correlated to how far away a device is from the beacon. In an ideal condition (that is, unobstructed line of sight between a device’s antenna and the beacon) the closer the person is the more accurate the result.
!As shown in Figure 1, when a device is far away from a beacon, the signal strength will be lower than when it is close. Due to this diminished signal strength, iOS does not have high confidence on accuracy of the proximity estimate to the beacon. This is similar to the large blue circle in the GPS example above.
[图片上传失败...(image-e47ca6-1687190069755)]
[图片上传失败...(image-31db74-1687190069755)]
[图片上传失败...(image-93714b-1687190069755)]
[图片上传失败...(image-195591-1687190069755)]
[图片上传失败...(image-ec49e3-1687190069755)]
!As the device gets closer to the beacon, the received signal strength increases and therefore the accuracy of the proximity estimate increases. This would be analogous to the smaller blue circle in the GPS example. Shown in Figure 2, a device that is closer to a beacon will have a higher confidence about its proximity to the beacon emitting the signal.
Figure 1: When a device is further away from the beacon, signal strength is diminished and therefore the accuracy estimate will increase.
!However, just as GPS signal strength can be diminished by physical objects like buildings or being placed in a backpack, purse or pocket, so can a beacon’s signal strength. Signal attenuation, or the loss of intensity of a signal, can be caused by many factors. Physical materials surrounding the beacon, such as the wall depicted in Figure 3 between the device and the beacon will affect the received signal strength. This may cause the device to believe that the beacon is further away than it actually is.
[图片上传失败...(image-c5b6f0-1687190069755)]
!The human body itself is an excellent attenuator of Bluetooth signals. Simply having your back to a beacon (i.e. where your body is positioned between the device and the beacon) will affect the signal strength and thereby lower the accuracy. Figure 4 shows this signal strength being
Figure 2: Signal strength increases as a device moves closer to the beacon, leading to a better proximity estimate.
June 2, 2014
[图片上传失败...(image-1ec7e2-1687190069755)]
[图片上传失败...(image-e5d7b8-1687190069755)]
[图片上传失败...(image-f2f66-1687190069755)]
diminished when somebody is physically positioned between the iOS device and the beacon.
[图片上传失败...(image-5c9396-1687190069755)]
[图片上传失败...(image-acab35-1687190069755)]
[图片上传失败...(image-67a917-1687190069755)]
[图片上传失败...(image-d9bc80-1687190069755)]
[图片上传失败...(image-3b1a0d-1687190069755)]
!When building an application that uses either GPS or beacon, it is important to consider this accuracy. The values reported by the Core Location objects (the horizontalAccuracy property in the CLLocation class, or the accuracy property in the CLBeacon class) indicate this level of uncertainty, or the margin of error. Both are measured in meters. The higher the value, the lower the certainty of the position of the device or beacon. Keep in mind that depending on the physical surroundings a low accuracy may not be possible.
网友评论