We would like to be able to distinguish between iPhones and Apple Watches when scanning for devices using a Laird BLE module. We know that we can identify an Apple device from the manufacturer data returned in the scan report. 0x004C is the registered identifier for Apple.
In the remaining data returned is it possible identify the device type? We note that empirically, 4C001005 seems to correlate to an Apple Watch. How reliable is this?
It is useful for us, because it means we do not need to connect to this device to see if it is advertising a service that we own. Connecting over BLE is of course an expensive operation.
Here is a simple snippet of a Swift App doing a similar thing, to illustrate the question:
func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber)
{
guard
let manufData: Data = advertisementData[CBAdvertisementDataManufacturerDataKey] as? Data
else
{
return
}
let hexEncodedManufData: String = manufData.map { String(format: "%02hhx", $0) }.joined()
print("Manufacturer Data: \(hexEncodedManufData): ")
// Manufacturer Data: 4c001007351ff9f9036238: Apple device
// Manufacturer Data: 4c001006331ec0640f88: Apple device
// Manufacturer Data: 4c0010052b18804eb1: Apple watch?
// Manufacturer Data: 4c0010052b18804eb1: Apple watch?
}