18 07, 2017

Bluetooth 5 Advertisements: Everything you need to know

By | 2017-07-18T16:16:04+00:00 July 18th, 2017|Categories: BLE technology|Tags: , , , , , |5 Comments

You’ve probably heard so much about the recently released Bluetooth 5. You’ve seen all the hype on 2x Speed, 4x Range, and 8x Advertising data increase capabilities. But what does this all mean?? How does it achieve all these improvements? Is it really possible to achieve all these simultaneously?? What about power consumption? How is that affected? Look: There was so much media hype surrounding the release of Bluetooth 5, and lots of conflicting information with very few details. Many media articles made it sound like you can achieve all these simultaneously! In this first post of a series on [...]

27 06, 2017

Bluetooth GATT: How to Design Custom Services & Characteristics [MIDI device use case]

By | 2017-09-04T09:10:50+00:00 June 27th, 2017|Categories: BLE technology, GATT|Tags: , , , , , , |8 Comments

I’m sure you’re aware that implementing Bluetooth Low Energy (BLE) for devices that interact with smartphones is one of the best ways to achieve a great user experience for your IoT device. However, designing BLE devices can be a daunting process! You're probably thinking: "Where do I even start??" One thing I wish I had when I started developing for BLE is more blog posts that walk you step-by-step on how to tackle the different phases of the system design and implementation. The Bluetooth GATT (Generic Attribute Profile) is the foundation for the design of any BLE system and [...]

18 05, 2017

Getting started with Bluetooth Low Energy: Five action steps

By | 2017-09-05T11:44:10+00:00 May 18th, 2017|Categories: BLE technology|Tags: , , , , , , |2 Comments

Getting started with Bluetooth Low Energy (BLE): Five steps to take now If you're just getting started with Bluetooth Low Energy (BLE), just looking to learn more about it, or exploring different ways to stay up-to-date then read on. Here are a few steps to get you started: Read a book on BLE: I can recommend the book "Getting Started with Bluetooth Low Energy". The book is a bit dated especially with the recent release of Bluetooth 5, but many of the concepts are still the same and it's a great way to get started. You can buy it from Amazon here [...]

10 05, 2017

The complete nRF52 Mac development tutorial

By | 2018-04-10T20:16:52+00:00 May 10th, 2017|Categories: BLE technology|Tags: , , , , , , , , , |69 Comments

The complete tutorial for nRF52 Mac development and debugging [Update] I published a more up-to-date version of this blog post that covers all three major operating systems (macOS, Windows, and Linux) using a different IDE. Check it out here: The complete cross-platform nRF development tutorial Today's tutorial focuses on setting up the environment for nRF52 Mac development and debugging for Bluetooth Low Energy applications. Specifically, I will be using the new Nordic nRF52840 Preview Development Kit board that supports the enhanced features of Bluetooth 5 (including longer range, bigger advertisements and increased speed). A few notes about the setup/environment as well as the [...]

24 04, 2017

BLE power consumption optimization: The comprehensive guide

By | 2017-10-01T07:40:53+00:00 April 24th, 2017|Categories: BLE technology|Tags: , , |0 Comments

BLE power consumption optimization: a comprehensive guide on how to achieve maximum battery life for your BLE device In my search to find a comprehensive guide for maximizing power efficiency for Bluetooth low energy devices, I found multiple guides from different vendors. These guides were great, but were more focused on specific chips and modules from the vendors. My goal here is to summarize the findings and make this a comprehensive guide for anyone looking to optimize power consumption for a BLE device - no matter which vendor you end up choosing. Introduction Many new electronic products – whether [...]

11 11, 2016

Understanding SN and NESN in a BLE Link Layer packet

By | 2017-06-16T03:18:09+00:00 November 11th, 2016|Categories: BLE technology|Tags: , , , , |0 Comments

In my previous video looking at connection data captured via a BLE sniffer, I missed explaining two bits in the data that can be confusing to understand. The bits are the SN and NESN in the LL data packet. A few notes to better understand these bits: NESN and SN are used for data flow and making sure data is not missed (ACKs and NACKs). NESN and SN are looked at independently When the device sends a packet, the NESN is the next expected SN from the other side in the next packet coming back. When the device receives [...]

19 10, 2016

How do I choose a UUID for my custom services and characteristics?

By | 2017-06-19T17:23:13+00:00 October 19th, 2016|Categories: BLE technology|Tags: , , , |0 Comments

First, a few things to know:"A UUID is a universally unique identifier that is guaranteed to be unique across all space and all time" (Bluetooth 4.2 spec, Vol 3, Part B, section 2.5.1 UUID)A UUID is a 128-bit value.There are reserved UUIDs by the Bluetooth SIG that are generally represented by their 16-bit aliases. These aliases are used for convenience and represent a 128-bit value computed as follows:128-bit value = 16-bit-value * 2^96 + BluetoothBaseUUIDwhere the BluetoothBaseUUID is 00000000-0000-1000-8000-00805F9B34FBExamples include: 0x180F -> Battery Service UUID (128-bit UUID: 0000180F-0000-1000-8000-00805F9B34FB) 0x2A00 -> Device Name Characteristic UUID (128-bit UUID: 00002A00-0000-1000-8000-00805F9B34FB)The reserved UUIDs cannot be used for [...]

19 10, 2016

What is the maximum size of data that can be encapsulated in a characteristic?

By | 2017-06-16T03:12:43+00:00 October 19th, 2016|Categories: BLE technology|Tags: , |0 Comments

The answer: 512 bytes. But to understand where that came from, let's first look at what a characteristic really is. Attributes are the generic term describing the smallest element in the Generic Attribute Profile (GATT). So each of Services, Characteristics, and Descriptors is actually an attribute, and according to the Bluetooth 4.2 spec (Volume 3, Part F, section 3.2.9): "The maximum length of an attribute value shall be 512 octets" which leads us to the answer: 512 bytes.

19 09, 2016

The best Bluetooth low energy sniffer tutorial (Connections)

By | 2017-06-16T03:13:37+00:00 September 19th, 2016|Categories: BLE technology|Tags: , , , , |4 Comments

A BLE sniffer can be very handy. 3 primary use cases come to mind: Debug problems with BLE connections Reverse engineer a BLE device Last but not least, as a way to learn about how BLE works and understand how data gets transferred between Central and Peripheral In the previous blog post and video on BLE sniffers we went over how to use the TI CC2540 BLE sniffer to detect advertisement data. In this video we'll go over how to use the same BLE sniffer to capture and follow connections between a Central device and Peripheral device. https://youtu.be/NSqrYcwmTeE To illustrate [...]

15 08, 2016

The best Bluetooth low energy sniffer tutorial (Advertisement Data)

By | 2017-06-16T03:13:41+00:00 August 15th, 2016|Categories: BLE technology|Tags: , , , , |2 Comments

In the previous blog post we went over the different BLE sniffers available in the market and compared the pros and cons of each. In this video below we walk through a live demo of capturing BLE advertisements using the TI CC2540 USB Dongle BLE sniffer. We look at the different aspects of the captured advertisement data and understand each part. https://www.youtube.com/watch?v=K7ByRmElA5Y Bluetooth low energy Advertisement Data Packet number: the sequence of packets received by the sniffer. Timestamp: (starting from 0) and the time difference since the previous packet was received. Channel number: (depends on what channel you set [...]

21 07, 2016

How to use a Bluetooth (BLE) sniffer without pulling your hair out!

By | 2017-06-16T03:13:46+00:00 July 21st, 2016|Categories: BLE technology|Tags: , , , , , , , , , |8 Comments

How to use a Bluetooth Low Energy sniffer without pulling your hair out! While working on a client project it became necessary to use a Bluetooth Low Energy sniffer to debug some weird behavior happening with the data transfers between the master and slave device. I had read quite a bit about BLE sniffing before and talked to a few people in the industry to get their feedback on the different options out there, but I hadn’t actually done much with one until recently. The purpose of this blog post to be the first of a series covering the topic of Bluetooth Low [...]

17 06, 2016

This one crucial feature is missing in Bluetooth 5

By | 2017-06-16T03:14:06+00:00 June 17th, 2016|Categories: BLE technology, News|Tags: , , , , |0 Comments

Bluetooth 5 Bluetooth has been around for almost 2 decades, and if you haven't heard of Bluetooth then you've probably been living under a rock! :) The last major version of Bluetooth (version 4.0) was released back in 2010. There have been major changes in the wireless and electronics industry since then -with the Internet of Things (IoT) being the "next big thing". Bluetooth 4.0 introduced BLE (Bluetooth low energy) which has been a major player in two areas: the wearable industry and beacons (e.g. iBeacons, Eddystone...etc). It has enabled many other IoT technologies as well including industrial and enterprise [...]

28 05, 2016

BLE connection intervals and events in under 5 minutes

By | 2017-06-16T03:12:51+00:00 May 28th, 2016|Categories: BLE technology|Tags: , , |0 Comments

Understand BLE connection intervals and events in under 5 minutes A BLE connection interval is the time between two data transfer events (BLE connection events) between the central and the peripheral device. The theoretical value ranges from 7.5 ms to 4 secs (with increments of 1.25 ms). A few notes regarding BLE connection intervals: The connection is established with the interval parameter value set by the master (central) device. However, the peripheral may suggest/request different values. The master still has the final say in the values and may end up choosing values different than but closer to the requested values. [...]

4 05, 2016

The basics of Bluetooth Low Energy (BLE)

By | 2017-06-16T03:14:23+00:00 May 4th, 2016|Categories: BLE technology|Tags: , , , , |3 Comments

Basics of Bluetooth Low Energy (BLE): the ultimate guide Introduction BLE (Bluetooth low energy) was introduced by the Bluetooth SIG in the 4.0 spec of Bluetooth. As the name suggests, BLE focuses on low energy consumption. Low energy focus comes with some sacrifices particularly around data transfer rates and the range of operation. But that's not a bad thing, in fact BLE is very suitable for many applications. With all the hype around IoT (Internet of Things) and the slew of technologies and devices out in the market, BLE is attempting to position itself as a leader for the future of IoT. [...]

18 04, 2016

An honest review of Bluetooth Developer Studio (BDS)

By | 2017-06-16T03:14:48+00:00 April 18th, 2016|Categories: BLE technology|Tags: , , , |1 Comment

What is Bluetooth Developer Studio? Bluetooth Developer Studio (BDS) was officially released by the Bluetooth SIG back in October, 2015. It allows you to focus on the high level design of your Bluetooth low energy devices, whether it's a central or peripheral device. It offers a clean and simple interface where you can drag and drop profiles, services and characteristics to design your system. This is very useful because you can start designing your system before even deciding what your target platform will be. It consists of two main views: Designer view: used to design the system and grants access to [...]