Refer to my medium post for complete details and demo video:
UWBRanging.mp4
- Scan for peripherals and connect to UWB using its UDID. This is advertised by the beacon.
- Connect to this peripheral and set notification for
tx Characterisrics
. - Publish
accessoryReadyPublisher
event.
- Subscriber to
accessoryReadyPublisher
will sendinitialize
command to accessory. - Accessory sends configuration data and sends
accessoryConfigurationData
command. - Device (iPhone) receives config data and creates NISession.
- Runs NISession with
accessoryConfigurationData
and this generates shared config data. - Send shared config data in delegate method
didGenerateShareableConfigurationData
. - On receipt of shared config data, accessory will update its configuration.
- Accessory starts sending distance information to device.
- Device gets the distance through delegete method
didUpdate nearbyObjects
.