GATTCentral scanning will now wait for a scan response if actively scanning (which is now the default), and report a new peripheral discovery once the scan response is reported by the HCI.
GATTCentralOptions was adding allowing for MTU and Scan Parameters customization.
All properties in AdvertisementDataProtocol are now optional. This is the correct behavior to reflect whether the TLV value was actually encoded in the advertisement data.
Fixed AdvertisementData to properly decode localName, txPowerLevel, etc.
AdvertisementDataProtocol now uses GAPManufacturerSpecificData for its manufacturerData property instead of Data.
DarwinAdvertisementData has been refactored to store the original CoreBluetooth advertisement data dictionary, instead of parsing individual items. This should result in a performance improvement since realistically we can never use all the possible values (only 31 bytes). It also ensures the ABI stability, reduces the size of the struct stored on the stack, and helps with Equatable conformance on Swift 3.0.2.
Added initial Android support for parsing 31/62 byte raw advertising data. Since Android does not provide the actual length for the advertisement data, we will truncate the zeroed suffix to account for that behavior.
Updated unit tests and fixed bug in CentralHostController.
Issue
Fixes #15.
What does this PR Do?
GATTCentral
scanning will now wait for a scan response if actively scanning (which is now the default), and report a new peripheral discovery once the scan response is reported by the HCI.GATTCentralOptions
was adding allowing for MTU and Scan Parameters customization.AdvertisementDataProtocol
are now optional. This is the correct behavior to reflect whether the TLV value was actually encoded in the advertisement data.AdvertisementData
to properly decodelocalName
,txPowerLevel
, etc.AdvertisementDataProtocol
now usesGAPManufacturerSpecificData
for itsmanufacturerData
property instead ofData
.DarwinAdvertisementData
has been refactored to store the original CoreBluetooth advertisement data dictionary, instead of parsing individual items. This should result in a performance improvement since realistically we can never use all the possible values (only 31 bytes). It also ensures the ABI stability, reduces the size of the struct stored on the stack, and helps withEquatable
conformance on Swift 3.0.2.CentralHostController
.Where should the reviewer start?
GATTCentral.swift
Sweet giphy showing how you feel about this PR