New ibeacons not found in my application

I am developing a beacon detection application and currently works very well for kontakt brand beacons.

A client sent me some new beacons that I have never seen and I have searched on Google but I cannot find what brand they might be.

The following information related to this beacon they gave me:

uuid: fda50693-a4e2-4fb1-afcf-c6eb07647825
pass: 000000
name: ion_beacon00021
major: 16789
minor: 24532

      

enter image description here

I changed my code to control both uuids without making it work

for (index, beaconID) in beaconsIds.enumerated() {

  let beaconUUID = UUID(uuidString: beaconID)!
  let identifier = "BLERegionBeacon \(index)"

  let beaconRegion = CLBeaconRegion(proximityUUID: beaconUUID, identifier: identifier)
  self.locationManager?.startMonitoring(for: beaconRegion)
  self.locationManager?.startRangingBeacons(in: beaconRegion)
}

func configureLocationManager() {
    self.locationManager = CLLocationManager()
    self.locationManager!.delegate = self
    self.locationManager!.desiredAccuracy = kCLLocationAccuracyBest
    self.locationManager!.distanceFilter = kCLDistanceFilterNone;
    self.locationManager!.activityType = CLActivityType.automotiveNavigation;

    for region in self.locationManager!.monitoredRegions {
      self.locationManager?.stopMonitoring(for: region)
    }

    if CLLocationManager.authorizationStatus() != CLAuthorizationStatus.authorizedAlways {
      self.locationManager?.requestAlwaysAuthorization()
    }

    self.locationManager!.startUpdatingLocation()

}

      

When you learn how to make this new job IBeacon, I had recourse to third-party applications (eg MyBeacon

, Detector

, Beacon Demonstrator

, Locate

) to get confirmation if the information I have at this lighthouse is correct, but in any application I could not find it ibeacon.

I bought a new battery to make sure it wasn’t that easy, but it’s not: '(

I got the idea to use any app that detects bluetooth devices and I found BLE Scanner

. I was lucky with this app, and I realized that at least the name I have was correct, but nothing to do with major or minor or pass

. I also thought that the long id seen there might be correct and that I didn't have ... But I dropped it because when I connected the kontakt brand it also gave me a different uuid.

enter image description here

enter image description here

ISCONNECTABLE

Move between YES and NO.

When I use BLE Scanner

to detect beacons Kontakt

, show me more information titled SERVICEDATA

and ISCONNECTABLE

more at YES.

enter image description here

- What else needs to be done to find these beacons?

- Can anyone understand what might be going on?

Many thanks

EDIT

With the help of davidgyoung I figured out that the Locate app, if it works, but only in its Android version. And in fact, it correctly returns the information that I received from this beacon.

I found that these beacons are configured using the BeaconFlyer app and there I understood the reason that this password was sent to me. I was able to change uuid

, although strangely I just put numbers and letters. I changed it to 32 zeros following the same 8-4-4-4-12 pattern. I still don't get any results on IOS, but works on Android, even after changing the uuid.

It is possible that some brands need to be certified to be discoverable by iOS devices and do not have these restrictions.

EDIT 2

Considering all these details, it seems that the problem is in IOS and not in android, so it occurred to me that maybe if I created a simple Android project to test the functionality of the beacons, I should have discovered this.

The test was done by registering this UUID f7826da6-4fa2-4e98-8024-bc5b71e0893e

, which always works for me and with which I detect beacon labels without any problem Kontakt

.

To my surprise, I discovered this without issue even without registering the UUID I have for this brand. This is very strange considering that only register 1 UUID which was the markKontakt

+3


source to share


5 answers


If you find another beacon with the same code, the simplest explanation is that the ProxmityUUID provided is incorrect.



You won't be able to determine the correct ProximityUUID from BLE Scanner on iOS as iOS blocks access to iBeacon ads if you don't know the ProximityUUID in front. If you can access your Android device, you can use the Locate app to view any beacon regardless of its ID. https://play.google.com/store/apps/details?id=com.radiusnetworks.locate&hl=en You can use this to find out what it really sends. Similar apps for macOS are also available if you have access to a Mac.

+5


source


It is very clear that your client has sent you "beacons" and not necessarily " i beacons". As Davidung pointed out, what constitutes an iBeacon is stated (rather strictly) by Apple . Download the specs from there and see if you're so inclined.

I have used several BLE scanners to check which uuid, major and minor numbers are of the various iBeacons I have worked with, among them the mentioned BLE scanner. I think the spec does not prevent in some way from adding additional services to iBeacon, which leads to different brands of iBeacons potentially showing slightly different data in different scanners. However, what you are showing in the screenshot, and the fact that the parameter value isconnectable

changes the values, makes me think that these beacons are not working correctly.

There will be no way to make them work on iOS this way. You can write your own Bluetooth protocol code to do something like this with them, but then it won't rely on Apple's iBeacon mechanics. This will mean nice things like monitoring the region even when the app is paused and so on won't work. It also likely drains the battery more and generally more work.




I also said that I was not a Bluetooth expert, but I learned a lot: UUIDs are all specifications. The UUID you are accessing (and Apple) is part of the data packet that the iBeacon is supposed to send, but I have also seen that BLE services are generally identified by UUIDs in (non-Apple) reference docs. It can get confusing when scanning such a beacon and see UUIDs (or at least lines that look like one) in several places. So even if the beacons you follow the spec (or can tweak it anyway), I'm guessing someone messed up. For example, they could edit (maybe even with a hard connect and tool) the wrong UUID, not set the one you need to use, but accidentally overwrite the part.which specifies the device as an iBeacon (bytes 5 and 6 of the data packet come to mind), making them unusable.

As a tip, I would suggest the following: if your client is interested in the actual functionality of iBeacon, tell them they should buy the right beacons. in fact, the contacts are very good. I tested cheap porcelain fakes and advised them as they quickly became unreliable. It might be tempting to save a few dollars at first, but if you have to constantly replace beacons it ends up being more expensive in the long run.

+3


source


Another theory about what could happen:

The beacon ad package that implements the iBeacon must have an Apple manufacturer code 004c to be discovered by iOS. Android has no such limitation. If this beacon sends a different vendor code, that explains why only Android can detect it.

How do you know if this is true? You need to see the raw ad bytes somehow.

+2


source


The lighthouse brand is Iotton and it looks like the one we sell: https://www.beaconzone.co.uk/ibeacon/ton9108

It is unlikely that the Kontakt app shows the Iotton beacon because the local name is incorrect. Most likely your Kontakt beacon - disable it now. With this or any beacon, the best app to get the UUID and view the beacon is Nordic nRF Connect.

+1


source


Are you sure you have set the delegate to CLLocationManager

? The code does not display it, so if not above or below, you need to add:

self.locationManager?.delegate = self

Then make sure your class implements a method CLLocationManagerDelegate

didRange(beacons: region:)

to receive callbacks.

If you think you already have this setup, showing that this code might detect something else that is missing so that it doesn't work.

+1


source







All Articles