Tuesday, August 1, 2017

Android O and Bluetooth 5: Everything you need to know

Android O has full support for Bluetooth 5, so device makers don't have to do the work themselves.

The HTC U 11 and Motorola Z2 Force both shipped with Android N and Bluetooth 4.2 support. Both are gaining Bluetooth 5 support with their respective Android O upgrades. Let's talk about what that means and why they waited.

This is a software-only update

The Qualcomm Snapdragon 835 hardware supports Bluetooth 5. We know this is the case, not just because Qualcomm tells us, but because phones like the OnePlus 5 and Galaxy S8 and S8+ shipped with Bluetooth 5 support. HTC mentions this in its recent FCC filing:

The major change is to enable Bluetooth 5.0 by software without any hardware change. The source code/SW file about this SW enabling will ONLY be held by HTC Corporation and it is IMPOSSIBLE to release these source code/SW file to any other third party to effect the RF function, power, or rating of this device. Except for the changes mentioned above, no other modification is performed.

The change will come when these phones are updated to Android O (and no, we don't know when that will be), and you won't have to do anything or send your phones anywhere or get a new SIM card. It will just work.

That's cool, but what makes Bluetooth 5 better than 4.2?

Bluetooth specifications are a lot like USB specifications. They use a numeric system to track them, and to qualify as being compliant, the hardware must be able to meet certain thresholds for transfer and receive speeds, power consumption, and compatibility. That means a higher number will be newer and better in some ways than a lower number and a jump from 4.2 to 5 is more significant than a jump from 4.1 to 4.2.

Bluetooth 5 brings longer range, faster data speeds and a better way to connect.

Bluetooth 5 offers three major features: 4x longer range, twice the data speeds, and eight-times longer ADV packets (ADV stands for advertising, and advertising packets are used to broadcast what a device can do to all other Bluetooth devices in range). It's easy to understand why more range is good, but it's important to know that data transfer is more than just sharing files. For example, music is also digital data when streamed over Bluetooth and a higher speed means it can deliver more of the audio data for "better" sound and less chance for syncing errors.

Larger ADV packets are important, too. When a device can share more information about its capabilities, the handshake between two devices is faster and less error-prone. There are a lot of technical advantages to a longer ADV packet, and if you're interested, you should have a look. Just know that devices can't connect via Bluetooth without using ADV packets, and having more data in each makes for a better experience.

An example: Using Bluetooth 5, your phone can stream music to your headphones up to 120 feet away (versus 30 feet for older Bluetooth standards), send twice as much digital data so your music sounds fuller and won't stutter as much, and can connect with fewer errors because the two devices know more about what each is capable of. It's good all around.

So, why are HTC and Motorola waiting for Android O to make the switch?

We can't be 100% sure why they are waiting, but it's likely because of the extra support for Bluetooth 5 that comes in Android O.

The Bluetooth 5 standard was completed in December 2016, so everyone has known about the changes for a while. When Android N was finalized, the Bluetooth 5 standard wasn't complete yet, so there are some pretty significant features that aren't supported. Two important features, in particular, are missing from Android N.

  • The preferred PHY (Physical) Low Energy layer. When two devices communicate over Bluetooth they need to work out the best and most efficient way to send data. Each device has a set of checks to look for the "right" method to use here, and Bluetooth 5 support isn't being checked. This means that the connection would fall back to an earlier Bluetooth standard and the Bluetooth 5 features won't be used.
  • ADV packets longer than 60 bytes can't be checked. When two Bluetooth devices "talk" to each other, the ADV packets are scanned. In Android N, the packet is expected to be a certain length, so packets larger than 60 bytes can return an error or simply not be read. In Android O, this has changed and there is no expected length of each packet and the raw data is read until the end of the packet is reached.

In simpler terms, this means that on Android versions earlier than O, a Bluetooth 5 device isn't able to properly announce what it is and what it can do, and when the connection is finally set up, it will fall back to an older standard even if the hardware supports it.

Bluetooth 5 just wasn't ready when Android N was developed.

The Samsung Galaxy S8, for example, has to use code in the Bluetooth layer from Samsung itself to get around these issues because Android doesn't have the support. This costs a lot of money and takes a lot of time, and in the end, it might all have to be changed to be more compatible with Android O. It's more a business decision than a technical decision. Since Samsung took the time to add its own extras to Bluetooth, it wisely built in the Bluetooth 5 standard instead of an older standard.

Bluetooth is going to be awesome when we get Android O and Bluetooth 5 support, right?

Nope. Sorry.

All the benefits of Bluetooth 5 require both devices to be Bluetooth 5-compliant. If one device, for example, is Bluetooth 4.x-specified, the connection falls back to the 4.x standard. That means until your headphones or car system is Bluetooth 5 ready, none of this matters. Two Galaxy S8 phones connected via Bluetooth can have faster file transfers, but there's no guarantee that Samsung's version of Bluetooth 5 and Android O's version are 100% compatible, so a GS8 to HTC U11 connection might not benefit.

Bluetooth 5 benefits require both devices to be compliant.

When Bluetooth 5 becomes old news and everything supports it (which won't be anytime soon) this will change and we'll see the benefits. One good piece of news is that IoT (Internet of Things) devices are usually ahead of the curve and we'll see Bluetooth 5 support long before other devices start to use it. This can be a pretty big deal when talking about low-energy scanning, because of the longer ADV packets. You'll save battery life when looking for beacons or other LE devices.

Android has always been forward thinking when it comes to Bluetooth, and we see this with every new release. Just be on the lookout for other devices that are Bluetooth 5-complaint to take advantage of the new standards.



from Android Central - Android Forums, News, Reviews, Help and Android Wallpapers http://ift.tt/2uRuXNL
via IFTTT

No comments:

Post a Comment