Proximity SDK: Get DateTime of Beacon?


#1

I’m using the Xamarin.IOS bindings of the Proximity SDK. How do I get the DateTime associated with the beacon when I enter enter/exit?

A problem with my app is I wanted to use a trusted time, and I was hoping the beacon would help me out here.


#2

You can’t really do that with the Proximity SDK, because Estimote Beacons don’t broadcast time for use with the enter/exit events.

Some Estimote Beacons (mostly Location Beacons) do have a Real-Time Clock, but accessing that data requires connecting to the beacon, and that’s the github.com/estimote/ios-sdk and github.com/estimote/android-sdk instead of the Proximity SDKs. Sadly, there’re no good Xamarin bindings for these. (Also, right now, we automatically seed the clock with the time from the smartphone, so it runs into the same trust issues. But I guess we could change that.)

Have you thought about e.g. using NTP? Or, if you’re trying to do things like, know when exactly somebody entered/exited the range of the beacon, you could have your mobile app send a request to your backend web service, and have the server (which is a trusted environment) record the time. (And for the latter, Secure Monitoring/Presence Verification helps make sure that the enter/exit event forwarded to the server from the mobile app is legit.)


#3

Thanks for response! Especially the part about how beacons are synced with device times.

My use case is that I just want a trusted offline datetime. It doesn’t need to be paired with the an enter/exit event. I just need to get it somehow.

I remember playing around with a C# solution that listened to beacons here. The UWP sample could get the broadcasted DateTime from Kontakt beacons without directly connecting ot them. But it’s a waste to buy beacons and not use their full functionality.

Maybe Proximity beacons broadcast datetimes in a similar way?

For what it’s worth, we’re planning on having a dedicated online kiosk. If the kiosk can seed BeaconTime, and users can’t casually seed BeaconTime, and if I can use universal-beacon SDK to eavesdrop, then it’ll do everything we need!

edit: Let me verify that is the actual correct sample, I’ll modify this post again when I’m done.

edit2:
It is the correct sample. It detects the Timestamp of… lots of bluetooth devices… and a handful of Eddystone beacons with matching BluetoothAddresses.


#4

Do you mean this Timestamp property in that C# library?

Note the documentation, “Timestamp when the last advertisement was received for this beacon.” So this isn’t what you’re looking for either. (It’ll be the receiver’s time, not the beacon’s time.)

Even if you had a beacon broadcast their time, you’d need some security mechanism to prevent somebody spoofing the advertisement, and feeding wrong time to the receiver. Like, maybe asymmetrically encrypt the timestamp with a private key in the beacon/broadcaster, and decrypt using a public key in the receiver.

This is venturing way outside the standard capabilities of Estimote Beacons though. Maybe with the exception of the programmable Estimote LTE Beacon—it has a Real-Time Clock, it can broadcast Bluetooth data, and you can program it yourself in a subset of JavaScript. I guess you’d also need to customize the C# receiving library to deal with the custom, encrypted advertisements.

More about the LTE Beacon:

https://blog.estimote.com/post/177348177680/estimote-lte-m-beacon
https://developer.estimote.com/lte-beacon/quick-start/