2016-11-30 13:06:15 +01:00
# Avertise Url
Advertises a URL via the Eddystone protocol over Bluetooth.
## ~hint
### Eddystone
Bluetooth beacons are used to indicate proximity to a place or object of interest.
Beacons use Bluetooth advertising to broadcast a small amount of data,
which can be received and acted upon by anyone in range with a suitable device and software, typically a smartphone and application.
There are various beacon message formats, which define the way Bluetooth advertising packets are used as containers for beacon data.
iBeacon is Apple's beacon message format. Eddystone comes from Google.
Read more at https://lancaster-university.github.io/microbit-docs/ble/eddystone/ .
## ~
```sig
2017-07-24 22:39:27 +02:00
bluetooth.advertiseUrl("https://makecode.microbit.org/", 7, true);
2016-11-30 13:06:15 +01:00
```
### Parameters
2017-03-16 15:57:41 +01:00
* ``url`` - a [string ](/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 ](/types/number ) representing the power level between 0 (short) and 7 (maximum range).
2017-01-31 17:29:25 +01:00
* ``connectable`` - a [boolean ](/blocks/logic/boolean ) indicating whether or not the @boardname @ should accept connections.
2016-11-30 13:06:15 +01:00
### Example: Broadcast a secret code
```blocks
2017-01-05 16:37:46 +01:00
bluetooth.advertiseUrl("https://pxt.io?secret=42", 7, true);
2016-11-30 13:06:15 +01:00
```
## See Also
2016-12-23 17:58:38 +01:00
[stop-advertising ](/reference/bluetooth/stop-advertising ), [advertise-uid ](/reference/bluetooth/advertise-uid )
2016-11-30 13:19:17 +01:00
```package
bluetooth
2016-12-06 20:51:44 +01:00
```