Hi, the docs says that it is recommended to setup your own UUID for beacons and distinguish beacons during ranging via major/minor values.
We are doing this for Beacons and we bought some Stickers as they are more suitable for some of our places but the UUID/major/minor can’t be changed via Estimote app (I tried only iOS).
Am I missing something or there is no way to change UUID/major/minor for Nearables?
Thanks
Tomas
At this time, there’s indeed no way to change Nearable’s UUID/major/minor, but that’s partially because the set of best practices for Nearables is different. As explained on http://developer.estimote.com/nearables/build-a-nearables-app/, for Nearables we recommend using ESTNearableManager instead of ESTBeaconManager/CLLocationManager, and the Nearable Manager operates on Nearable IDs, not UUID+major+minor.
We don’t exclude adding an option to change UUID/major/minor in Nearables in the future.
So, you want to tell us that we cannot develop iBeacon powered apps with your Nearables, but without Estimote SDK?
Actually, it’s a problem for us at the moment. We use your beacons in museums and recommend them as most stable solution with good quality / price average. But now I’m trying to support Nearables in our app (we don’t use Estimote SDK, because it’s closed and CLLocationManager is more flexible for us) and I can’t. UUID and major / minor are static and cannot be changed, but it can be solved, what we can’t solve is that strange decision to have different UUIDs for Nearables in one set. I don’t want to discuss recommended way for UUIDs in iBeacons world (UUID per company / service), but I want to hear an answer from you - why did you do this? What kind of problems do you solve? Is it reasonable or just an internal solution as is?
And I want to answer to myself I rechecked all possible options and it seems that we can change Primary Packet Type for Nearables to Apple iBeacons for example, so the Nearable behaviour should be the same as old good iBeacons from Estimote (I mean in the way we can discover them without Estimote SDK).
And… It doesn’t work I changed Packet Type to Apple iBeacon, updated UUID and minor / major parameters, but the only app that shows me correct data is Estimote iOS App, all other apps including my own shows the old data (initial UUID, major / minor for Nearables from the factory).
@heypiotr, any thoughts?
Can I change the Nearables settings now using SDK now? I am not abe to find any suitable support for this .
Indeed! Here’s some example code to do that:
class ViewController: UIViewController, ESTDeviceManagerDelegate, ESTDeviceConnectableDelegate {
let deviceManager = ESTDeviceManager()
var sticker: ESTDeviceNearable!
override func viewDidLoad() {
super.viewDidLoad()
self.deviceManager.delegate = self
self.deviceManager.startDeviceDiscovery(
with: ESTDeviceFilterNearable(identifier: "<#STICKER_ID#>"))
}
func deviceManager(_ manager: ESTDeviceManager, didDiscover devices: [ESTDevice]) {
guard let sticker = devices.first as? ESTDeviceNearable else { return }
self.deviceManager.stopDeviceDiscovery()
self.sticker = sticker
self.sticker.connect()
}
func estDeviceConnectionDidSucceed(_ device: ESTDeviceConnectable) {
self.sticker.settings.performOperations(from: [
ESTNearableOperationBroadcastingScheme.writeOperation(
withSetting: ESTSettingNearableBroadcastingScheme(value: .iBeacon),
completion: { (newSetting, error) in
if let error = error {
print("failed changing broadcasting to iBeacon: \(error)")
} else {
print("changed broadcasting to iBeacon")
}
}),
ESTNearableOperationIBeaconProximityUUID.writeOperation(
withSetting: ESTSettingIBeaconProximityUUID(value: UUID(uuidString: "<#PROXIMITY_UUID#>")!),
completion: { (newSetting, error) in
if let error = error {
print("failed changing broadcasting to iBeacon: \(error)")
} else {
print("changed broadcasting to iBeacon")
}
}),
ESTNearableOperationIBeaconMajor.writeOperation(
withSetting: ESTSettingIBeaconMajor(value: 123)!,
completion: { (newSetting, error) in
if let error = error {
print("failed changing major: \(error)")
} else {
print("changed major")
}
}),
ESTNearableOperationIBeaconMinor.writeOperation(
withSetting: ESTSettingIBeaconMinor(value: 123)!,
completion: { (newSetting, error) in
if let error = error {
print("failed changing minor: \(error)")
} else {
print("changed minor")
}
}),
]
)
}
func estDevice(_ device: ESTDeviceConnectable, didFailConnectionWithError error: Error) {
print("connection failed: \(error)")
}
func estDevice(_ device: ESTDeviceConnectable, didDisconnectWithError error: Error?) {
print("disconnected")
}
}