Perhaps this question is repeated, but my situation is different from others. I have my own bluetooth kit. It puts information about the manufacturers when you click a button on the set. I get manufacturer data from android. But I can not access from ios app.
I am listening to advertising data as shown below:
func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) { for (key,value) in advertisementData{ print("key:\(key) value:\(value)") } }
And the result of the log:
key:kCBAdvDataIsConnectable value:1 key:kCBAdvDataServiceUUIDs value:(1802) key:kCBAdvDataLocalName value: R009
By the way, I tried the CoreLocation api to view my devices.
func startScanBeacons() { let uuid = UUID(uuidString: "b9407f30-f5f8-466e-aff9-25556b57fe6d")! let beaconRegion = CLBeaconRegion(proximityUUID: uuid, identifier: "mybeacon") beaconRegion.notifyOnEntry = true beaconRegion.notifyOnExit = true locationManager.startMonitoring(for:beaconRegion) locationManager.startRangingBeacons(in: beaconRegion) }
But that did not work. My device does not appear as a beacon. Some studies suggest that this is not possible. You can take a look at this answer: https://stackoverflow.com/a/166778/ But there must be a workaround to get manufacturer data. What should I do to overcome this problem? We can configure the firmware.
ios swift bluetooth-lowenergy
sorunluadam
source share