UWB Beacons concurrent connection and run in background

I am trying the UWB Beacons. Anyone know the possibility of multiple concurrent connection and getting the data from the beacons in background? I tested with the sample project and the position update will be suspended once the app go into background.

Out of topics, I found that I can’t get any vector data in iOS 16.

I can’t answer the multiple concurrent connections question, but for connecting to a session in the background see the following WWDC 2022 video:

Regarding Vector data, from what I’ve seen, the Estimote SDK will eventually start providing it, but it’s sporadic at best. Because the native NearbyInteraction framework as been updated for iOS 16 and the Estimote SDK has not, I’ve switched to using only native frameworks (CoreBluetooth, NearbyInteraction). The NearbyInteraction framework sends much more frequent vector updates.

@knyw I get vector data , and am using ios 16.3.1

app requested bluetooth always and nearby…

I have used both connect Automatically and manually and both work the same…

note that you need to add the nearby permission to the info.plist of your app

the sample app in the UWB toolkit doesn’t have an info.plist so apple allows it

1 Like

Thank you for the sharing. I am switching to use the native framework too. From the WWDC video, It seems that the application will not get any nearbyObjects didUpdate callback while in background. I don’t know is it the real case. Im going to test it on code.

my device is 16.0.1. I can get the distance but no direction. will have a try on newer iOS.

add the nearby permission to the app info.plist to enable the UWB reporting

i don’t know about in the background, as my app design is only foreground

@knyw I recommend this great article from Apple for your issues with vector Initiating and maintaining a session | Apple Developer Documentation

Hi @Jessica , does UWB beacon support Nearby Interaction background mode which released in iOS 16?

For others want to use native framework for the connection, can reference this sample code from apple Implementing Spatial Interactions with Third-Party Accessories | Apple Developer Documentation

Anyone know how to get same public id from EstimoteUWB SDK by CoreBluetooth? I checked the uuid of peripheral is not the same.

you cannot… they conceal/encapsulate that as part of their ‘solution’.

really this is about the software toolkit… the beacon doesn’t know anything about the accessing application…

From the WWDC video, seems the accessory “Beacon” need to update or support the latest UWB configuration which is used to setup connection via Nearby Interaction framework. Otherwise, the initialization on the NINearbyAccessoryConfiguration will fail.

I don’t see any issues… ios 16.3.1

Folks,

welcome to our community, this is Jakub - one of the founders of Estimote - will be more than happy to help.

BACKGROUND UWB RANGING
It is possible to range in the background on iOS, but you would need our latest firmware since the app has to “enable” background ranging on the UWB beacon. The experience is really magical and it works awesome - could be a game-changer for many hands-free experience, e.g. keyless entry, etc.
Please note it might drain UWB beacon battery.

FIRMWARE UPDATE
We are constantly improving firmware of our UWB beacons. If your purchased our UWB Dev Kit this year there is high chance it already supports OTA (Over-the-air firmware upgrade). In that case if you want to test BACKGROUND ranging shoot us a note to contact (at) estimote.com and we will send you instructions how to upgrade your firmware. We also fixed stability, power consumption and few other things.

RANGING TO MULTIPLE PHONES
At this very moment the entire FiRa / U1 compatible UWB sequence works like this:
UWB Beacon is advertising over BLE its presence. Nearby iPhone discovers it and requests BLE connection. Once they are connected over BLE they hand-shake, exchange some keys and start UWB radio both UWB Beacons and U1-enabled iPhone. Once these radios are up you can see UWB ranging sessions. If you kill the app or go outside the range the BLE connection will be lost and UWB radios will go to sleep. At this very moment when BLE connection between UWB beacon and iPhone is up other iPhones CANNOT connect. (Note: One iPhone CAN connect to multiple beacons).

So RANGING TO MULTIPLE PHONES is not supported by default, unless you do the following trick:

  1. You change auto-discovery and BLE connection to false
  2. Your app will “manually” discover and connect to UWB Beacons
  3. As soon as you connect to UWB beacon and get the ranging you disconnect()
  4. That way you will make it possible for other apps/phones to do the same

That might require some time synchronisation, etc. but is a doable work-around.
We are also working to natively support similar mechanism in firmware/SDK, but it’s not available yet.

ANGLE/ORIENTATION
In addition to distance you can get the vector to the UWB Beacon, but it only works if the beacon is in front of the phone. The 3 UWB antennas in Apple iPhones are not reachable in other positions.
Please also note there is a bug in one of the iOS versions, so you might need to update to the latest iOS 16.3.1 to see it.
Also note there is a bug on iPhone 14 Pro Max which is specific to that device and angle might not render there. Apple is already informed about it.

Feel free to post other questions on the forum and we will be more than happy to help.

thank you for an informative post.

concerning multiple concurrent phone ranging, (which we need)

for discovery we need to know what uuids would be involved,
or there must be other services available… the sample app

exposes the

public var shouldConnectAutomatically:Bool

method,
but does not expose anything about manual discovery

Happy to hear that there are more support and features on SDK/firmware. We have contacted your team and still waiting the feedback of how to update the firmware via OTA. Hope to test the background ranging feature as soon as possible.

Also note there is a bug on iPhone 14 Pro Max which is specific to that device and angle might not render there. Apple is already informed about it.

the ‘bug’ is much more fundamental… the iPhone 14 family does not implement nearby ranging like the 11-13. it doesn’t return the direction x/y/z vector on didUpdate, but the ‘angle’ and a 4 state enum for the vertical angle.

@jimiasty
has estimote released and updated IOS sdk with a compatible framework? I need it, as typical, my first users are on iPhone 14…