From 30211aa0061a94d3659adc0398b5d27a82d149fb Mon Sep 17 00:00:00 2001 From: Owen Brotherwood Date: Tue, 6 Dec 2016 20:51:44 +0100 Subject: [PATCH 1/2] Correction for max. length of advertised url to 17 https://github.com/google/eddystone/tree/master/eddystone-url#frame-specification states 1-17 When one makes a general google for the max length, some have written 18 and some 17 :( The difference could lie in the https://github.com/google/eddystone/tree/master/eddystone-url#url-scheme-prefix which adds an extra byte but it's use is to in someway allow for more bytes in the 1-17. The implementation in the micro:bit Lancaster is unknown as to how the url-scheme-prefix is or is not used: there does not seem to be a scheme for "Just take the 1-17" for the url. At the moment, "play it safe" and write 17 ? --- docs/reference/bluetooth/advertise-url.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/bluetooth/advertise-url.md b/docs/reference/bluetooth/advertise-url.md index 9a0a808d..edc54042 100644 --- a/docs/reference/bluetooth/advertise-url.md +++ b/docs/reference/bluetooth/advertise-url.md @@ -23,7 +23,7 @@ bluetooth.advertiseUrl("https://pxt.microbit.org/", 7); ### Parameters -* ``url`` - a [string](/reference/types/string) containing the URL to broadcast, at most 18 characters long +* ``url`` - a [string](/reference/types/string) containing the URL to broadcast, at most 17 characters long * ``power`` - a [number](/reference/types/number) representing the power level between 0 (short) and 7 (maximum range). ### Example: Broadcast a secret code @@ -38,4 +38,4 @@ bluetooth.advertiseUrl("https://pxt.io?secret=42", 7); ```package bluetooth -``` \ No newline at end of file +``` From 3469ad6f8dadb3c626f5c7dc1deab49169440682 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 8 Dec 2016 12:01:35 -0800 Subject: [PATCH 2/2] Added note about protocol encoding. --- docs/reference/bluetooth/advertise-url.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/bluetooth/advertise-url.md b/docs/reference/bluetooth/advertise-url.md index edc54042..eeb1e7a7 100644 --- a/docs/reference/bluetooth/advertise-url.md +++ b/docs/reference/bluetooth/advertise-url.md @@ -23,7 +23,7 @@ bluetooth.advertiseUrl("https://pxt.microbit.org/", 7); ### Parameters -* ``url`` - a [string](/reference/types/string) containing the URL to broadcast, at most 17 characters long +* ``url`` - a [string](/reference/types/string) containing the URL to broadcast, at most 17 characters long, excluding the protocol (eg: ``https://``) which gets encoded as 1 byte. * ``power`` - a [number](/reference/types/number) representing the power level between 0 (short) and 7 (maximum range). ### Example: Broadcast a secret code