This example creates a BLE beacon: a method of advertising a small amount of information to nearby devices. The information doesn't have to be human-readable; it can be in a format that only an application can use. Beacons are very easy to set up: the code for all beacons is the same, and only the information you want to advertise - the beacon payload - needs to change. he canonical source for this example lives at https://github.com/ARMmbed/mbed-os-example-ble/tree/master/BLE_Beacon
Diff: source/main.cpp
- Revision:
- 83:d0596095a535
- Parent:
- 82:7f3513808f75
--- a/source/main.cpp Thu Mar 19 00:25:22 2020 +0000 +++ b/source/main.cpp Wed Jan 26 01:12:40 2022 +0000 @@ -159,10 +159,11 @@ * * Note: please remember to calibrate your beacons TX Power for more accurate results. */ - static const uint8_t uuid[] = { 0x74, 0x27, 0x8B, 0xDA, 0xB6, 0x44, 0x45, 0x20, - 0x8F, 0x0C, 0x72, 0x0E, 0xAF, 0x05, 0x99, 0x35 }; +// static const uint8_t uuid[] = { 0x74, 0x27, 0x8B, 0xDA, 0xB6, 0x44, 0x45, 0x20, +// 0x8F, 0x0C, 0x72, 0x0E, 0xAF, 0x05, 0x99, 0x35 }; + static const uint8_t uuid[] = { 0xA0,0xB1,0x37,0x30,0x3A,0x9A,0x11,0xE3,0xAA,0x6E,0x08,0x00,0x20,0x0C,0x9A,0x66 }; uint16_t major_number = 1; - uint16_t minor_number = 3; + uint16_t minor_number = 8; uint16_t tx_power = 0xC8; uint16_t comp_id = 0x069e;