New iOS CoreBluetooth Mock Library

Nordic Semiconductor, the manufacturer of the System in a Chip in beacons and other smart devices has a new iOS CoreBluetooth Mock Library. The library allows an app to be used with dummy Bluetooth calls rather than real APIs.

The main use is for automated testing. If testing code on a server or test bed you want tests to run reliably and predictably so that you can get a pass or fail indication. Replacing the wireless part of the app allows other parts of the app to be tested.

The library also has other uses:

  • Taking screenshots without setting up a particular physical scenario
  • Developing code quicker through better repeatability
  • Developing code without need of a physical phone or tablet
  • Developing code when a Bluetooth peripheral isn’t available yet and/or is still under development

A caveat is that this library is for CoreBluetooth and not for CoreLocation. The former is intended for communication with devices that are not iBeacon. Apple forces you to use CoreLocation to detect iBeacons because they don’t provide the standard Bluetooth advertising via CoreBluetooth when seeing iBeacons.

The CoreBluetooth Mock Library is useful for detection of non-iBeacon Bluetooth devices such as fitness trackers, health monitors, Eddystone beacons and sensor beacons.

Developing for Bluetooth LE

If you are developing code for Bluetooth LE, a great place to start is the GitHub bluetooth-low-energy topic.

GitHub currently lists 877 public repositories that cover every operating system. This includes programming with Java, Javascript, C, Python, C++, Swift, Kotlin, C# and Objective-C.

In many cases it’s best to use the repositories to see how to do things rather than use the libraries themselves. Most, but not all, libraries are thin layers over operating system APIs. Most libraries don’t get updated and it’s otherwise easy to later get trapped into dependencies you don’t need, particular ways of working or old ways of using the underlying OS.

App cross platform frameworks are another source of problems when programming Bluetooth LE. They also aren’t updated often nor provide optimal Bluetooth APIs. If you wish to ease Bluetooth LE development and retain flexibility for future changes then use the native programming languages and libraries.

Social Distancing Beacons on BBC News at Ten

The BBC had a piece last night on the use of social distancing beacons at Florence Cathedral in Italy.

The beacons are worn by visitors and vibrate and flash when people get too close to one another. The reporter, Mark Lowen, said that it was the first use of the devices which might be true of that device model but not of social distancing devices in general.

Read about Beacons for Workplace Social Distancing and Contact Tracing

How to Attach Beacons

The electronics inside beacons tends to be very similar because they are based on chip manufacturers’ standard designs. Instead, the main differences tend to be the batteries and the case. When it comes to the case, how to attach the beacons is usually a consideration.

The most common way of attaching beacons is with a double sided sticker supplied with many beacons. 3M VHB is popular due to the strong hold. The sticker can be attached to smooth surfaces such as wall or the back of lanyard id holders.

3M VHB Sticker
3M VHB Sticker

When using stickers, removing the beacons from walls can damage the paint surface. Also, some installations need a more theft resistant solution. Other’s need to be attached to rough surfaces or used in rugged situations. In these scenarios look for beacons with screw mounting. The screw holes are also sometimes used to plastic tie lock beacons to structures such as cages or plastic boxes.

For wearable beacons, many have a loop that can be attached to a lanyard or keyring. There are also wristband form factors.

Finally, a few beacons have the option to use a magnet for attaching to metallic objects.

Magnetic Beacon
ABSensor N03 with Magnet

View all beacons

New Thin Beacons in Stock

We have two new thin beacons in stock. The Meeblue U1 and UL1 are only 4.8mm x 45mm x 25.5mm and weigh only 7g.

These beacons are similar to the iB001M in that they are particularly suitable for wearing by humans or animals. These new models have twice the battery power of the iB001M and use the more battery efficient Nordic Semiconductor nRF52 series system on a chip (SoC).

An accelerometer can be used to provide for motion triggered advertising. The accelerometer is only used for motion triggered broadcast and has adjustable movement threshold. They can also be set up to only advertise when the button is pressed. Advertising can be iBeacon, Eddystone UID, Eddystone URI or user defined. In addition, the UL1, has a light sensor that can be set up to cause the beacon to advertise when it’s either dark or light.

Bluetooth Sensors for Analysing Sports

Nordic Semiconductor has a recent article by Petter Myhre Jun on Wireless Solutions Take Sports Tracking to New Level.

Bluetooth Sports Sensor
SpoSeNs 2.0 Professional Wearable

Petter talks about how location and movement sensors can be used to take athletic measurements for monitoring, analysis and performance improvement. He describes the SpoSeNs 2.0 Professional Wearable built round Nordic Semiconductor’s nRF52840 SoC.

However, many types of sports measurement can be implemented using off the shelf sensors. Standard beacons can be used for locating and Bluetooth sensors with accelerometers used for finer measurement of movement.

It’s also possible to measure heart rate that can lead into health related applications. We previously worked on Ultimate Sport Service’s heart rate tracking project. Ultimate Sport provide running race timing solutions. The heart rate tracking project allows Ultimate Sport to collect and display the real-time heart rates of a group of runners.

BeaconZone was a key part in succeeding with our custom heart rate tracking project. From assessing potential challenges in the Bluetooth framework on iOS and Android to evaluating hardware possibilities, we got valuable and accurate advice. The project was delivered on time and we are confident we will be working together again in the future.

Ultimate Sport Service Aps, Denmark

Read about Beaconzone Solutions

Improving Factory Productivity in the Age of Covid-19

Beaconzone founder, Simon Judge, has posted a new article on Linked on Improving Factory Productivity in the Age of Covid-19. It takes a look at how factories are needing to scale up (or down) while, at the same time, maintaining social distancing.

Digitising manual production lines provides visibility through the use of contact-less measurement that can be used to improve productivity. The article explains how to get started.

Q2 Nordic Wireless Quarter Magazine

Nordic, the manufacturer of the System on a Chip (SoC) in many beacons, has published the latest issue of Wireless Quarter Magazine. It showcases the many uses of Nordic SoCs.

Wireless Quarter Magazone

This issue has a special feature on how Nordic powered devices are helping the fight against Covid. This includes smart thermometers, smart pulse oximeters, smart soap dispensers, improved cleaning of VR headsets and social distancing/contact tracing solutions. Of social distancing solutions the magazine says:

Technology is needed to enforce social distancing. Bluetooth LE wearables are emerging as one of the most promising workplace solutions

There’s also product news such as Lynxemi’s vibration and temperature sensor platform for predictive maintenance and the Carv Bluetooth LE sensor ski training solution. The magazine also includes an article on ‘STEAM’ (science, technology, engineering, the arts, and mathematics) and how the MICRO:BIT is going global.