google / eddystone

Specification for Eddystone, an open beacon format from Google
Apache License 2.0
3.08k stars 762 forks source link

Support for Data Type URI? #169

Closed dalyand closed 8 years ago

dalyand commented 8 years ago

Will the eddystone App (or what ever receives the beacon) support BLE ADV packets of type URI? Instead of type 0x16 (Service Data) , type 0x24 URI could be used (see https://www.bluetooth.org/en-us/specification/assigned-numbers/generic-access-profile).

Of course it would not be an eddystone beacon anymore, but it would still advertise an URI that could be handled by the same receiver.

What I want to know in general is, if Android phones will handle all known BLE ADV types or if they will be limited to eddystone formatted beacons only.

mashbridge commented 8 years ago

Android's Bluetooth Low Energy APIs can hand you the raw bytes of the scan record so your code can walk the Length/Type/Value structures and you can find the 0x24 type you're interested in.

(The four Eddystone frames -- UID, URL, TLM and EID -- that a beacon can broadcast are all ServiceData data types broadcast under the 16-bit Eddystone Service UUID. Apps, services, and other things that are looking for Eddystone broadcasts won't recognise a URI data type broadcast.)

scottjenson commented 8 years ago

I was involved in the definition of the URI parameter type 0x24 and was very excited to see it finally be approved. In fact, it was one of the first attempts we made (as the original URIBeacon project) in getting URIs into a BLE packets. Unfortunately, the short answer is that to use it properly, with all the other parameters needed to be scanned properly, there just wouldn't enough room left in the adv packet to make it's use viable. The URIBeacon (and the resulting Eddystone) format was the result, a more compact means of compressing a URL into an adv packet. However, with BLE5 coming, that is no longer an issue and using parameter 0x24 as a means of broadcasting a URI should be revisited (at least for Physical Web scanners) However, that is still a ways out. Let's discuss this again in a year when we'll have a better understanding of BLE5's adoption.

dalyand commented 8 years ago

Thank you @scottjenson, that's the answer I was looking for.

And thank you @mashbridge, thats exactly what we are doing ;).