iBeacon MAC Address on iOS

When working with iBeacons on iOS, people often wonder if they can access the Bluetooth MAC address of nearby devices. The short answer is no. iOS does not provide an API for retrieving the MAC addresses of Bluetooth peripherals, including iBeacons, even though devices openly transmit this information. This restriction aligns with Apple’s strong privacy and security policies, which limit developers to using only the officially provided Beacon identifiers: UUID, major, and minor values.

Despite this limitation, some users may notice that a beacon’s MAC address is displayed in certain contexts, such as being printed on the device itself or visible within a manufacturer’s setup application. This raises the question how these apps access the MAC address when iOS does not allow it.

The answer lies in proprietary or non-standard mechanisms used by some manufacturers. These methods can include embedding the MAC address within extra custom advertising data or requiring an app to establish a connection with the beacon and retrieve custom settings that include the MAC address. However, since these approaches are not part of a Bluetooth standard nor part of Apple’s official APIs for iBeacon detection, they should not be relied upon for application development.

Relying on MAC addresses for identification can lead to issues. Different beacon models and manufacturers use different undocumented techniques, making it difficult to ensure long-term compatibility when second sourcing. Connecting to a beacon to get its MAC address adds an extra step that significantly complicates things and makes slower compared to just reading advertising with no connection.

Mechanisms used to expose MAC addresses are often undocumented. Any firmware update or change for later purchased beacons could change or remove these features without warning, making the approach unreliable for long-term solutions.

Apple’s privacy restrictions mean that app developers should focus on the standard iBeacon identification mechanisms to ensure stability, compatibility and compliance with iOS policies.

Beacon Compatibility

We previously wrote a bit about beacon compatibility where we concluded that phone compatibility is more of an issue than beacon compatibility and that you might choose an Apple MFi certified beacon if you wanted additional assurance. However, what does MFi mean?

Certified beacons meet Apple’s beacon specifications. There was a time that these specifications were secret and only available to MFi partners. However, these have since become available after you have ok’d an agreement. If you wish to view them, go to the iBeacon for Developers web page and click on Download Artwork and Specifications.

iBeacon App Development Considerations

If you are considering writing apps to communicate with iBeacons, here are some high level things you need to think about that are specific to beacon app development:

  • Detecting whether Location and Bluetooth are on/off and alerting the user for permission to use these
  • Detecting beacons in background when the iOS app is closed or the Android app is in doze mode
  • On Android, taking account of the various Bluetooth APIs that exist for the different Android releases
  • Fetching data, associated with a beacon, from a service, such that it’s cached and not fetched every time
  • Arranging for some initial data bundled with the app so that it works straight away without a data connection
  • Fetching data before it is needed such that it’s available with no delay and when there’s no network connection
  • Re-fetching of data when it becomes stale
  • Fetching metadata from the server to control the behaviour of triggering
  • Arranging how Apple will test the app for app review otherwise complications will arise and the review will take weeks
  • Assessing whether to use the mobile OS or manufacturer supplied SDKs (or both)
  • If connecting to beacons, taking account of the unreliability of wireless connections
  • Collecting and uploading statistics/analytics to assess usage
  • Providing end user diagnostics to aid support troubleshooting

Need an experienced beacon app developer to get these things done quicker? Consider our development services.

Each Beacon Manufacturer Has its Own App

Each Bluetooth beacon manufacturer typically provides its own proprietary configuration app for several key reasons. Firstly, manufacturers use different internal components and designs, meaning a custom app is necessary to tailor configuration options specifically to the hardware. Many also implement proprietary Bluetooth communication protocols for setup, requiring a unique app to handle these configurations correctly.

Security is another factor, as manufacturers often include measures to prevent unauthorised reconfiguration, and custom apps allow for the necessary authentication and encryption. Customisation also allows manufacturers to highlight unique features that may not be available in generic tools, while a branded app ensures control over the look, feel and overall user experience during configuration.

Some beacons only permit configuration within a limited timeframe after being powered on or require a special mode to be enabled and custom apps are designed to accommodate these specific procedures. Firmware updates are also often delivered through these apps, while support and troubleshooting features, including diagnostic tools and links to support resources, are commonly integrated.

For beacons that store data locally, custom apps offer interfaces to manage that data according to manufacturer-specific formats. While universal configuration tools are theoretically possible, the wide variety of hardware, protocols and features in use makes them difficult to develop, and manufacturer-specific apps remain the most reliable way to fully manage proprietary beacon hardware.

What Bluetooth Systems Can Track Working Using Their Smartphones?

Contrary to popular belief, it’s not possible to directly track smartphones using Bluetooth alone. Both iOS and Android devices have built-in privacy protections and limitations that prevent this kind of tracking.

For iOS devices, Apple has implemented randomised MAC addresses for Bluetooth transmissions. This means that the unique identifier broadcast by an iPhone or iPad changes regularly, making it impossible to consistently track a specific device over time. Android doesn’t continuously send out Bluetooth transmissions.

However, whilst smartphones themselves can’t be directly tracked via Bluetooth, there are systems that can perform location tracking using Bluetooth beacons and gateways. These systems rely on people carrying small Bluetooth beacons, often in the form of keyfobs or badges, which broadcast a unique identifier. Fixed gateway devices are then installed throughout an area to detect these beacons.

When a gateway detects a beacon, it records the beacon’s identifier and signal strength to infer distance, along with a timestamp. By combining data from multiple gateways, the system can estimate the location of the beacon, and by extension the person carrying it, within the covered area. This approach is often used in workplace settings for things like occupancy monitoring or contact tracing.

It’s important to note that these systems require active participation – people must choose to carry the beacon devices. This is quite different from the idea of passively tracking smartphones without user consent.

Some retailers have experimented with using Bluetooth beacons to track customers’ movements within stores. However, this still requires customers to have the store’s app installed and Bluetooth enabled on their phones. These work the other way around by having fixed beacons and the app detecting the beacons. It’s not a covert tracking system, but rather one that customers opt into, often in exchange for discounts or other benefits. It’s less reliable due to the nuances of ensuring the app runs on all phones, at all times.

In summary, whilst it’s not possible to directly track smartphones via Bluetooth due to privacy protections and limitations, there are Bluetooth-based systems that can provide location based services when users actively participate.

Turn Your iPhone into an iBeacon

If you into Beacon-enabled apps, there’s a new free iOS app now allows your iPhone to function as an iBeacon. This tool is particularly useful for developers looking to test their applications without the need for additional hardware. This eliminates the need for purchasing a physical beacon.

However, there are a few things to keep in mind. One notable downside is that using your iPhone as a beacon will drain your battery much faster. If you use this app, make sure the iPhone remains on charge.

Although this app is designed to mimic iBeacon functionality, neither the app description on the App Store nor the interface within the app mentions ‘iBeacon’. Instead, the term ‘Beacon’ is used. This is not an oversight but a deliberate choice, as Apple prohibits the use of the term ‘iBeacon’ by third-party developers. It’s a strange, pedantic restriction, but one that developers must navigate.

If you are serious about Beacon technology, investing in a physical beacon might still be the better route in the long run. They are relatively inexpensive and offer the advantage of not impacting your phone’s battery life.

Using Beacons with Smartphone Apps

Bluetooth beacons are a powerful tool for creating personalised experiences through mobile apps. They work by transmitting signals that can be detected by all smartphones. When a user comes within range, the app detects the beacon’s signal and identifies the user’s proximity to a specific location.

This enables the delivery of contextually relevant content, such as detailed information or reviews when a customer approaches a product in a retail store. It also allows for personalised recommendations based on a user’s location and past behaviour, offering tailored suggestions that match their interests.

Interactive experiences are another feature made possible by Bluetooth beacons. They can trigger app-specific actions based on user location, such as providing wait times and virtual queuing options in an amusement park. Additionally, they assist in wayfinding and navigation within large venues by providing directions and highlighting points of interest.

Utilising Bluetooth beacons for personalised experiences benefits businesses in numerous ways. They enable enhanced engagement with customers by delivering timely content, fostering a stronger connection and loyalty. They improve customer satisfaction by providing tailored information and recommendations, making customers feel more valued. Sales and conversion rates are also boosted by offering targeted promotions when customers are near specific products.

Bluetooth beacons gather valuable data that provides insights into customer preferences and behaviour, helping businesses optimise operations and make data-driven decisions to enhance their offerings and marketing strategies.

Android and iOS use included operating system APIs to detect Bluetooth beacons. When an Android application detects a beacon, it gets a callback to a function including the signal level (RSSI), where developers can specify the app’s operation. On iOS the framework includes classes to represent beacons and beacon regions, enabling monitoring and ranging, i.e., determining the approximate distance to a beacon. When an app registers to monitor a specific beacon region, iOS notifies the app if the device enters or exits that region. This happens even if the app isn’t running at the time. Furthermore, if the app is currently in use, it can continually receive updates about nearby beacons and their relative distance.

In both Android and iOS, the apps don’t connect with the beacons. Instead, they detect the Bluetooth signals that the beacons broadcast. Also, both systems require the user’s permission for the app to access Bluetooth and location services.

Which Beacons Transmit a MAC Address?

A MAC (Media Access Control) address is a hardware identification number that uniquely identifies each device. In the context of Bluetooth, a MAC address is used to identify a specific Bluetooth device, such as a smartphone, headset or a Bluetooth beacon. All beacons transmit a Bluetooth MAC Address which is a 48-bit address usually represented in hexadecimal format like this: 0123456789AB.

All devices such as smartphones can see the incoming MAC addresses that are sent as part of the device discovery stage rather than the main Bluetooth LE advertising payload. iOS is a bit strange and non-standard because it hides detected Bluetooth MAC address from apps, and hence from users, when detecting beacons and other Bluetooth devices.

No such restriction happens on Android or any other device. The rationale is probably that Apple wants you to use their ids, the iBeacon UUID, major and minor or the Peripheral Id rather than the MAC address. Apple also probably think they are protecting privacy in some way. A few beacons and other devices such as sensors and fitness trackers additionally put the MAC address into the advertising payload which circumvents Apple’s restrictions and allows reading of the MAC address by apps.

Can I Use My Phone as Bluetooth Beacon?

A question that often arises is, “Can I use my phone as a Bluetooth beacon?” The answer is ‘yes’.

Before we get into the details, it’s essential to understand what a Bluetooth beacon is. In simple terms, a Bluetooth beacon is a small wireless device that transmits a periodic signal to other Bluetooth-enabled devices within its range. This technology is often used for indoor positioning, sensing and other location-based services.

Technically, yes, a smartphone can function as a Bluetooth beacon. Both Android and iOS platforms offer apps to turn your phone into a beacon transmitter. However, there are some caveats.

Using your phone as a Bluetooth beacon can be a significant drain on your battery. Beacons are designed to be low-energy devices that can run for years on a single battery. Your phone, on the other hand, has many other functions that consume power, so using it as a beacon will lead to the need for frequent charging.

The range of a dedicated Bluetooth beacon can be up to 100 metres, depending on the model and settings. A smartphone’s Bluetooth range is generally much shorter, limiting its effectiveness as a beacon.

While there are apps such as Locate Beacon, Beacon Simulator (for iOS), Beacon Simulator, nRFConnect (for Android) that can turn your phone into a beacon, these are often not as reliable or feature-rich as dedicated beacon hardware. You won’t be able to change all the settings such as power, advertising period and advertising type as you would with a dedicated hardware beacon. Additionally, running such an app in the background may interfere with other phone functions and some phones eventually close long running services.

Despite these limitations, there are scenarios where using your phone as a Bluetooth beacon could be useful. If you’re a developer or a business looking to experiment with beacon technology, using a phone can be a cost-effective way to test your ideas before investing in dedicated devices.

While it’s possible to use your phone as a Bluetooth beacon, it’s generally not the most efficient or reliable method for most applications. However, for personal use or small-scale use, it can serve as a convenient alternative. If you’re considering implementing beacon technology on a larger scale, investing in inexpensive dedicated hardware is usually the better option.

View Bluetooth beacons

Processing on Bluetooth Device or Smartphone?

There’s often a dilemma when creating Bluetooth systems whether to place the processing on the smartphone or on the Bluetooth device.

The efficient and accurate prediction of an individual’s heart rate using wearable devices is crucial for various personal care applications. A new study Energy-efficient Wearable-to-Mobile Offload of Machine Learning Inference for Photoplethysmogram-based Heart-Rate Estimation (pdf) from the Universita di Bologna, Italy, looks into the trade-offs between carrying out heart rate tracking on the device itself or delegating the work to a mobile device.

The research introduces CHRIS, an inference system that uses the interconnectedness between a smartwatch and a smartphone. This system assesses the balance between energy consumption and heart rate tracking error. Depending on the connection status, a user-specified error, energy constraints and an estimate of the input difficulty, CHRIS employs two heart rate prediction algorithms. These are executed on either the smartwatch or the phone.

CHRIS showed the potential to achieve up to 2.03 times energy reduction on the smartwatch by deferring processing off the smartwatch, without a reduction on the tracking accuracy.