Setting Up Wi-Fi via Bluetooth LE

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.

The code area of the Improv site has an SDK for JavaScript using Web Bluetooth and an SDK for Android. There’s also a device side library for ESP32 devices.

Capacitor Plugin for Bluetooth Low Energy (BLE)

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.

New M52 Variants in Stock

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.

View MeeBlue Beacons

View Sensor Beacons

View Using Bluetooth Wireless Sensors

Mr Beacon Podcast with Minew

There’s a new Mr Beacon podcast with Eason Huang of Minew. It describes how Minew focus mainly on hardware rather than full solutions and how they provide re-branded hardware for many platforms and beacon providers. Steve Statler (Mr Beacon) provides the insight that many of those platforms don’t really want to sell hardware and they are often focussing on software their customers might not necessarily want.

The conversation turns to the growth and challenges of IoT. The main challenges are lack of clarity of return on investiment (ROI), proof of concepts (POC) taking too long and end results not being scalable. Eason identifies that better preparation is required before starting. Steve suggests projects should initially bring in consultants to provide expert and neutral advice.

The podcast resonates with what we do at Beaconzone. We set up Beaconzone because we identified the reliance on subscription-based cloud platforms and beacons locked to platforms was limiting the available information, products and solutions. We set up BeaconZone in 2015 to provide for standalone solutions, using original manufacture beacons, not locked to subscriptions. We use and stock Minew and tens of other manufacturers’ beacons and gateways.

The issues of IoT projects also resonates with what we have seen through providing consultancy. Too many people come to us, too late, with projects that shouldn’t have been started because they had obvious technical limitations or have been developed in a direction that makes them technically or financially non-viable. A small amount of expert advice, early on, can make a huge difference and reduce risk.

Even when organisations know they should seek initial help and contact us, we sometimes find they are reticent about investing what is a relatively small amount of money compared to a failed POC cost. The reason is that these organisations have no experience of using Bluetooth for IoT so don’t know the unknown unknowns. Everything looks feasible until they are deep into the POC. It’s for these situations that we also offer quick, low priced Micro Consultancy.

New Bluetooth to LoRaWAN® Probe

We have the LW003-B Bluetooth LoRaWAN® Probe in stock that scans for Bluetooth LE devices and sends detected advertising via LoRaWAN®. This extends Bluetooth sensing up to 15Km.

LoRa provides relatively low throughout so it’s important not to send data for unwanted detected devices. The probe provides extensive filtering options to ensure only the data required for specific Bluetooth devices is sent via LoRa:

Read Using Bluetooth with LoRa™ and LoRaWAN®

Improving Indoor Locating Using Kalman Filtering and a Particle Filter

There’s recent research from Korea on Particle Filtering-Based Indoor Positioning System for Beacon Tag Tracking. The paper looks into how to improve positioning accuracy, reduce system complexity and reduce deployment cost through the use of a Particle Filter-based Indoor Positioning System (PFIPS).

A Kalman Filter is used to preprocess collected Received Signal Strength Indication (RSSI) data followed by a Particle Filter (PF) to approximate the location of a tag which improves the location certainties.

Simulations and experiments showed the system outperformed the legacy indoor positioning systems in terms of location accuracy by 24.1% and achieved median accuracy of 1.16 m.

Read Using Beacons, iBeacons for Real-time Locating Systems (RTLS)

Beacon Placement Optimisation for Indoor Positioning

There’s recent research into Sensor placement optimization for critical-grid coverage problem of indoor positioning (PDF). The paper investigates how to reduce deployment cost by placing more sensors in areas that require higher accuracy rather than using a uniform deployment scheme.

Areas are differentiated as either being ‘critical’ or ‘common’. For example, in a railway station, critical areas are elevator entrances, boarding gates, toilets and the service centre. Critical and common areas have different positioning needs leading to different sensor deployment densities.

The paper examines the variation of RSSI with distance and develops a critical-grid coverage model. A NSGA-II algorithm is used to optimise the placement of iBeacon nodes.

The results showed that the new placement scheme obtained a lower error and a greater reduction of sensor deployment cost than the uniform deployment scheme. The proposed method reduced the cost of sensor deployment while ensuring the accuracy of indoor positioning for critical areas.

Beacons in Digital Signage

Digital signs can be found inside retail stores, shopping malls and increasingly at transit locations and even on the street. A growing number of digital signs use Bluetooth beacons.

Digital sign in a bus shelter

iBeacon transmissions allow digital signs to work with apps. An app detects the Bluetooth transmission and displays appropriate content in the app. This allows the app to react with what’s being shown on the sign and even control the digital sign. A way of achieving two way communication is to have the app send messages back to a server that causes new data to be shown on the smart sign:

If you are a smart sign manufacturer, the easiest way to add iBeacon support is to use a USB beacon. All your smart sign needs is a spare USB slot. Once set up, the beacon is usually ‘Set and forget’ but there are additional interaction possibilities if the smart sign can send out different advertising at different times and thus become a dynamic beacon. This can be arranged by using a USB beacon that can be controlled via a UART COM port. In this scenario the USB port is used for control as well as power.

View USB beacons

Positioning, Tracking and Flow Using Bluetooth Signals

There’s new research into Developing a Solution for Mobility and Distribution Analysis Based on Bluetooth and Artificial Intelligence.

The paper describes an efficient solution for locating, tracking, analysing distribution and flow of people and/or vehicles. Filters and algorithms including artificial intelligence and angle of arrival (AoA) were employed.

Locating using Triangulation
Triangulation Using Angle of Arrival (AoA)

The resultant system provided for analysis of location, traffic flow and passenger movement along routes.

3D RSSI Variation with distance

The researchers found that accuracy was improved when multiple measuring stations were used. Improved positioning was achieved using geometry algorithms (Voronoi) and the k-mean cluster algorithms. Artificial intelligence allowed for deeper analysis of the data for more accurate positioning, trajectory estimation and density evaluation.

New Nodejs Bluetooth Library

Modblue is a new open source Bluetooth library for nodejs that supports central and peripheral mode using hci and dbus. It supports Linux, OS and Windows native via WinRT/UWP.

The library can be used to advertise, scan, connect via GATT, discover services, characteristics and read/write values.