We often get asked what’s the best iBeacon? Unfortunately, there is no one best beacon for all scenarios. It depends on your particular project and business requirements. Having said this we have some favourites based on specific characteristics:
Best for Price: FSC-BP103 – Inexpensive beacon that transmits up to 10 channels simultaneously:
Best for Features:M52-SA Plus – Large easy replaceable battery, long range, temperature, humidity, accelerometer:
Best for Battery Life: SmartBeacon-AA Pro (no longer available) – Allows use of 4x AA batteries. Use lithium AA batteries for 7+ year battery life (also depends on settings).
Best for Setup App:Minew range – Minew’s latest BeaconPlus range (those supporting both iBeacon and Eddystone) provides the best in class app.
If you need a more rigorous description take a look at the book IoT Projects with Bluetooth Low Energy. It covers the fundamental aspects of Bluetooth Low Energy scanning, services, and characteristics. It goes on to describe examples of how to monitor health data, perform indoor navigation and use the Raspberry Pi for Bluetooth solutions. The book’s code is also available on GitHub.
If you are developing an app on Android it can be useful to view Bluetooth packets to debug problems. Johnas Nellen has an article on Medium that describes how to verify communication between Android and Bluetooth devices.
It involves enabling the Bluetooth HCI snoop log in the Android developer options and using ADB to generate a bug report that can be analysed using Wireshark.
We previously explained how iBeacons can be used with Apple Pass Kit to distribute things like coupons, boarding passes, store cards, event tickets, promotions, offers or just information.
We recently came across PassSlot that provides a framework for Apple Pass Kit. It provides a wallet pass designer, redemption system, payment integration and analytics.
There’s recent example code for the M5StickC, usable on almost any ESP32 device, that shows how to advertise iBeacon. The nice thing about this example is that it also shows the iBeacon parameters on the OLED display.
While adding iBeacon advertising to an ESP32 project can make sense, it’s often not the best choice if you only want advertising functionality. Stand alone beacons are more physically robust, use much less power and settings are configurable via ready-made apps rather than fixed in code.
Depending on the beacon, this can be setup either to only advertise when the key is pressed (button triggered) or advertising all the time and the advertising changes. The former is better for longer battery life while the latter is better when you need to continuously know the beacon is working.
Advertising can be detected:
In apps using standard Apple and Android Bluetooth APIs
On Macs and PCs using built in Bluetooth (on laptops) or using a Bluetooth dongle
On any devices that have a USB connection, using a scanning dongle
Keypress Detected via a GATT Connection
A few beacons allow a keypress to be notified to a connected application. Apps on iOS and Android, applications on single board computers and desktops/laptops can connect to a Bluetooth Service Characteristic to be notified when there’s a key press. Connection suspends advertising and prevents the button device from being seen/connected to from other devices.
Long pressing OFF does not cause the beacon to turn off but instead puts the beacon into ‘SOS’ mode where the configured advertising is stopped and the ‘SOS’ can be detected in the configuration app or your custom app and the ‘SOS’ state cancelled.
We sometimes get asked how many connections an iBeacon can support? The answer is ‘1’ but it’s often the right answer to the wrong intended question. The intended question is usually “How many receivers can see a beacon?”
Beacons don’t usually connect. They just advertise and can be seen by an infinite number of receivers that include phones, gateways or single board computers such as the Raspberry Pi.
The receivers only usually connect once, during setup via an app, to set the initial iBeacon parameters. When connected, the beacon doesn’t advertise which prevents extra receivers from connecting. Once set up, the app disconnects and the beacon starts advertising again.
Many gadgets and IoT devices need to connect to the Internet via WiFi. The problem is getting the WiFi credentials to the device when it isn’t connected yet. It’s a ‘chicken and egg‘ situation in that you need to connect to the device in order to set the WiFi settings but you can’t connect because you aren’t WiFi connected.
The usual, but complex, way to solve this is for the device itself to initially act as a WiFi router in ‘station mode’ while the user on a phone, laptop or desktop connects and uses a web interface to set the WiFi settings and then reboot. After rebooting, it’s not in station mode and instead connects to the assigned access point. The assigned local network DHCP IP address isn’t known to the user so they have to examine router settings or use some other contrived method to work out the URL to further administer the device.
None of this is simple for most users so alternative mechanisms are preferable. We previously mentioned Android WiFi Direct via Bluetooth and now there’s a new open standard, Improv, for setting up Wi-Fi via Bluetooth LE.
For Improv, the client (web or mobile) application sends the Wi-Fi credentials to the gadget via a defined Bluetooth LE Service (00467768-6228-2272-4663-277478268000). The device connects to the WiFi and returns a URL on the network that can be used to further administer the device.
How it works
Under the hood, a Bluetooth Characteristic is used to send a RPC Command to set up the Wi-Fi settings.
There’s a new Capacitor plugin for Bluetooth LE. Capacitor is new way to build web apps. Capacitor’s native plugin APIs allow easy access to common functionality, such as Bluetooth, across multiple platforms.
The plugin supports the web, Android and iOS. It allows scanning, GATT connecting, reading, writing and notifications. The source code is available on GitHub.
We have some new variants of the Meeblue M52 available.
The M52-PIR is a sensor beacon with built in passive infrared (PIR) sensor. It can be used to detect room occupancy.
The M52-PA is a long range version of the M52 Plus. It uses an extra Bluetooth output amplifier to achieve a range up up to 170m.
The M52-SA Plus Waterproof is an IP68 version of the M52-SA Plus sensor beacon providing temperature, humidity (SHT20) and acceleration (LIS3DHTR) sensors. The humidity sensor obviously isn’t useful when the beacon is waterproof.