How to get beacon identifier in proximity sdk?

Hello Guys,

We need to fetch the beacon’s identifier from proximity SDK for below two methods,

func monitoringManager(_ manager: ESTMonitoringV2Manager, didEnterDesiredRangeOfBeaconWithIdentifier identifier: String) { } func monitoringManager(_ manager: ESTMonitoringV2Manager, didExitDesiredRangeOfBeaconWithIdentifier identifier: String) { }

Actually we know that we can get identifier from cloud using get device api but we don’t want to use them as our app is for any user regardless of fixed app token & app id , so can any one know that how to get beacon identifier for those beacons which are in range or for nearest beacon.

Thanks.

Hi @deep,

One way to get the identifiers is to scan for the Connectivity packet — you don’t need to connect to the beacon, but the packet itself has the identifier included.

    override func viewDidLoad() {
        super.viewDidLoad()

        self.deviceManager = ESTDeviceManager()
        self.deviceManager.delegate = self

        let deviceIdentifier = "36a0066e4f0ca3fa41c4bfd6dbd6c920"
        let deviceFilter = ESTDeviceFilterLocationBeacon(
                identifier: deviceIdentifier)
        self.deviceManager.startDeviceDiscovery(with: deviceFilter)
    }

    func deviceManager(_ manager: ESTDeviceManager,
                       didDiscoverDevices devices: [ESTDevice]) {
        guard let device = devices.first as? ESTDeviceLocationBeacon else { return }
        self.deviceManager.stopDeviceDiscovery()
        self.device = device // to be continued ...
    }

As per above method i Don’t want to pass static identifier as deviceIdentifier but I need the this identifier of any beacon which are in range, in didDiscoverDevices delegate method or any other method.

Like in ranging we can get automatically beacon’s all information like beacon.major, beacon.minor, beacon.UUID but we are not able to get beacon’s identifier in that method.So we would like to get this identifier for the beacon which are in range.

Hope you get my point.

Hey @deep,

Can you try a less restrictive deviceFilter?
For example:

    self.deviceManager = ESTDeviceManager()
    self.deviceManager.delegate = self

  
    let deviceFilter = ESTDeviceFilterLocationBeacon()
    self.deviceManager.startDeviceDiscovery(with: deviceFilter)

This will return an array of all the beacon identifiers in range. You can then feed that array to ESTMonitoringV2Manager’s startMonitoringForIdentifiers.

This should give you what you need — a list of the identifiers in range, without the need to connect to the Estimote Cloud.
Hope this helps!

Hello @Raphael Thank you for your reply.

I have tried as per your suggestions.

self.deviceManager = ESTDeviceManager()
self.deviceManager.delegate = self


let deviceFilter = ESTDeviceFilterLocationBeacon()
self.deviceManager.startDeviceDiscovery(with: deviceFilter)

I have tried as per above but the below delegate method does not called.

What is the reason behind that.I have also set delegate for ESTDeviceConnectableDelegate,ESTDeviceManagerDelegate.

func deviceManager(_ manager: ESTDeviceManager, didDiscoverDevices devices: [ESTDevice]) { guard let device = devices.first as? ESTDeviceLocationBeacon else { return } self.deviceManager.stopDeviceDiscovery() self.device = device // to be continued ... }

So i kindly request you to correct me if i am wrong.

As i have checked its always goes in failure.And invoke below method.

 func deviceManagerDidFailDiscovery(_ manager: ESTDeviceManager)
    {
      
    }

Thanks,
Deep.

Hey @deep,

Could we move this conversation to email? We’re at contact[at]estimote.com. I’d like to ask you about some additional details.

Hey @Raphael

I am ready to move this conversation to email but since last 8 days I haven’t received reply from contact@estimote.com. So I am worried if my problem will get resolved if I move to email messages. This is very critical issue and need to be addressed asap because I am working on very strict deadline.

If you are ok with Skype I am ready to move discussion to Skype as well.

Please let me know best and convenient way to get this fixed asap.

Thanks
Deep

Hi Raphael,

I am trying to get in touch with you about this topic and it is highly important to get some support. Can you please revert and let me know how can we achieve what we need. Can someone please join us over a skype call for this?

Waiting for your reply. It’s been too long since we raised this. Our client is getting nervous and loosing faith in estimote beacons usage for their concept. We want to solve this issue for them being their development partners.

Please reply soonest.

Thanks,