Performance of Smartphones while scanning low power Bluetooth Smart Beacons (Presented at Embedded Computing Conference Winterthur, 5 th of September 2017) Cornel Brülisauer, Philipp Bachmann, Marcel Meli Contact: Prof. Dr. Marcel Meli Marcel.Meli@zhaw.ch Embedded Computing Conference, Winterthur 5 th September 2017 page 1
Outline 1. Our Activities 2. Introduction and Motivation 3. Bluetooth Smart Background 4. Testing Procedure 5. Tested Devices 6. Results 7. Conclusion Embedded Computing Conference, Winterthur 5 th September 2017 page 2
Our Activities Institute of Core Competences FPGA-based systems for network communication Time synchronization and high availability Networks Real-Time-Ethernet, safe and dependable Systems Wireless Communication Low Power, Energy Harvesting, Power mgt Different wireless/rfid systems Source: ZHAW Embedded Computing Conference, Winterthur 5 th September 2017 page 3
Our Activities: Light as Energy Source Source: ZHAW LED powered energy autonomous sensor for BLE Energy from 4 red LEDs Sends data using BLE ADV frames Update rate of less than a minute possible Works well outdoors and also works indoors Architecture/development from ZHAW Embedded Computing Conference, Winterthur 5 th September 2017 page 4
Our Activities: Piezo as Energy Source Source: ZHAW Dynapic Wireless Press to send a wireless message Solely powered by piezo energy Thin, robust, small, adaptable Fits on many surfaces No clicks Over 10 000 000 key presses Cooperation Algra, Microdul, ZHAW Embedded Computing Conference, Winterthur 5 th September 2017 page 5
Our Activities: Piezo Presenter Dynapic Wireless Innovative application of the Dynapic Wireless Piezo Use the piezo to provide energy to control a presentation (Power Point, etc. ) Two piezo buttons for navigating through the presentation Source: ZHAW Embedded Computing Conference, Winterthur 5 th September 2017 page 6
Our Activities: Low Power Pairing Source: ZHAW Security and Usability are important BLE tag with NFC or optical pairing Temperature-, humidity-, pressure sensors and accelerometer Simple Touch and Pair with RFID method (NFC) Simple Place and Pair with optical method Tag and phone exchange key through random optical pattern Versatile low power beacon using components from Nordic, Renesas, ST Embedded Computing Conference, Winterthur 5 th September 2017 page 7
Introduction and Motivation Beacon Beacon Accelerometer Battery Energy Source Temperature Sensor Beacon Beacon Solar Cell Humidity Sensor Beacon Battery Peltier Element Embedded Computing Conference, Winterthur 5 th September 2017 page 8
Introduction and Motivation Many applications use beacons and smartphone apps. The quality of the application also depends on how well the beacons and smartphone can work together Receiver works in scanning mode many beacon frames are not seen redundancy needed more energy required from beacons Beacons have a limited amount of energy at disposal To improve beacon energy efficiency, it is crucial that as many Bluetooth packets as possible are received by the smartphone Embedded Computing Conference, Winterthur 5 th September 2017 page 9
Introduction and Motivation Manufacturers constantly want to increase the battery life of their smartphones They introduce different scanning profiles (Android) in order to find a good compromise between reception reliability and energy consumption Less scanning means that beacons need to send even more frames to improve reliability Embedded Computing Conference, Winterthur 5 th September 2017 page 10
Introduction and Motivation Beacons are mostly powered by batteries today Frame redundancy more expensive EH However, frame redundancy empties batteries faster A smartphone with a good scanning success improves the consumer experience and allows for low-power beacons Goal of this work: Create a benchmark to determine the scanning behaviour of different smartphones User has more possibilities to choose the right smartphone for his/her application Developer can optimize smartphone/beacons Embedded Computing Conference, Winterthur 5 th September 2017 page 11
Bluetooth Smart Background Smartphone Bluetooth Smart beacon Source: https://i.stack.imgur.com/cqm49.png Advertising event: One advertising packet is sent on all three advertising channels Advertising interval: time between two advertising events Scan interval: time between two consecutive scans (channel switches) Scan window: time in which the Smartphone scans inside a scan window These parameters are different for every smartphone! Embedded Computing Conference, Winterthur 5 th September 2017 page 12
Bluetooth Smart Background Scan interval and scan window can NOT (or only) indirectly be modified by the user Android (before Android 5.0) and ios devices do not allow changes of those parameters Android (after Android 5.0) allows setting different scan modes Affects the duty cycle of the scan interval and scan window No information on exact timings Manufacturers use different Bluetooth transceivers and antennas affect the frame reception Every smartphone has a unique start-up/wake-up behaviour Focus was on determining the scan interval and window of different phones Embedded Computing Conference, Winterthur 5 th September 2017 page 13
Testing procedure Bluetooth scanning behaviour is analysed for different Android and ios smartphones Nordic NRF52 DK (with appropriate firmware from ZHAW) is used as beacon Bluetooth Smart Events are sent in short succession to one another -> simulating asynchronously operating beacons in a network Smartphone logs the events with custom app Cypress CySmart BLE Dongle is used as a reference receiver Analysis of the scan interval and window with Matlab Embedded Computing Conference, Winterthur 5 th September 2017 page 14
Testing Setup Tested Smartphone Nordic nrf52 DK Packet CH37 Packet CH38 Packet CH39 Source: Nordic Semiconductor Cypress Cysmart BLE dongle To PC Source: Cypress Semiconductor Embedded Computing Conference, Winterthur 5 th September 2017 page 15
Testing Procedure Advertising interval = 12ms -> good compromise between data size and measurement time resolution Low interval is a simulation of asynchronously operating beacons 2000 advertising events in total Equals to 6000 packets in total and a test duration of ca. 25s Tests are conducted in an office environment and the distance between beacon and smartphone is < 1m Packets contain: Advertising channel number Advertising event number Embedded Computing Conference, Winterthur 5 th September 2017 page 16
Testing App Functionality iphone 5C (ios 10.3.1) Nexus 5 (Android 6) Android: Packet with 15 bytes payload App filters the packets with the correct advertising address out of all received packets Sorts the packets according to the channel Calculates the percentages of received packets and on which channel they were received Apple: Has no option to filter out the advertising address individually -> analyses the whole packet Otherwise the same as the Android app Embedded Computing Conference, Winterthur 5 th September 2017 page 17
Tested Devices Android Devices Samsung Galaxy J3 (Android 5.1.1) Motorola G (Android 4.4.2) Google Nexus 5X (Android 7.1.1) Samsung Galaxy S5 (CyanogenMod) Google Nexus 5 (Android 6.0.1) ios Devices iphone 5C (ios 10.3.1) ipad 3 rd Generation (ios 9.3.5) Embedded Computing Conference, Winterthur 5 th September 2017 page 18
Results Scan windows and intervals Google Nexus 5X (Android 7.1.1): Scan interval 400 ms Scan window 330 ms ADV Interval 12ms Channel 37 Channel 38 Channel 39 Embedded Computing Conference, Winterthur 5 th September 2017 page 19
Results Scan windows and intervals Nexus 5 (Android 6.0.1): Scan window & interval 5 s ADV Interval 12ms Channel 37 Channel 38 Channel 39 Embedded Computing Conference, Winterthur 5 th September 2017 page 20
Results Scan windows and intervals Samsung Galaxy S5 (Cyanogenmod): Scan window & interval 5 s ADV Interval 12ms Channel 37 Channel 38 Channel 39 Embedded Computing Conference, Winterthur 5 th September 2017 page 21
Results Scan windows and intervals Motorola G (Android 4.4.2): Scan parameters of Motorola G cannot be determined Results are too random ADV Interval 12ms Channel 37 Channel 38 Channel 39 Embedded Computing Conference, Winterthur 5 th September 2017 page 22
Results Identification of scan interval/window for Samsung J3 devices is difficult due to its rather short scan interval and window The results for the Apple product were also not sufficient to find out the scan parameters Decreasing the advertising interval to 1.3ms allows for a higher measurement resolution Embedded Computing Conference, Winterthur 5 th September 2017 page 23
Results Scan windows and intervals Samsung Galaxy J3 (Android 5.1.1): Scan window 18 ms Scan interval 62 ms ADV Interval 1.3ms Channel 37 Channel 38 Channel 39 Embedded Computing Conference, Winterthur 5 th September 2017 page 24
Results Scan windows and intervals Apple iphone 5C (ios 10.3.1): Scan window & interval 40 ms ADV Interval 1.3ms Channel 37 Channel 38 Channel 39 Embedded Computing Conference, Winterthur 5 th September 2017 page 25
Results Scan windows and intervals Apple ipad 3 rd Generation (ios 9.3.5): Scan window & interval 30 ms ADV Interval 1.3ms Channel 37 Channel 38 Channel 39 Embedded Computing Conference, Winterthur 5 th September 2017 page 26
Results Overall Reception: Samsung J3 Motorola G Nexus 5X Samsung S5 Nexus 5 Scan Duty Cycle 29 % - 83% 100% 100% Event Count 533 26.65% 1456 72.80% 1801 90.05% 1952 97.6% 1952 97.6% iphone 5C ipad Scan Duty Cycle 100% 100% Event Count 1703 85.15% 1580 79.00% Cypress Sniffer Scan Duty Cycle 100% Event Count 2000 100.00% Embedded Computing Conference, Winterthur 5 th September 2017 page 27
Conclusion Every model has a different scanning pattern Scanning behaviour is solely dependent on the phone model and which Bluetooth module in the phone is used The manufacturers modify the stock Android and probably also the Bluetooth drivers As mentioned, they seek a compromise between reception reliability and energy consumption Apple products are behaving similarly Newer Android versions allow multiple scanning options Behaviour of upcoming Android 8 not yet measured Embedded Computing Conference, Winterthur 5 th September 2017 page 28
Questions and contact Questions??? Contact: marcel.meli@zhaw.ch Embedded Computing Conference, Winterthur 5 th September 2017 page 29