9 years, 11 months ago.

How do I change the UUID?

Sorry... getting lost in the code... How do I chance the UUID in the Beacon sample application? Cheers!

Question relating to:

The nRF51822-mKIT is a low cost ARM mbed enabled development board for Bluetooth® Smart designs with the nRF51822 SoC. The kit gives access to all GPIO pins via pin headers …

1 Answer

9 years, 11 months ago.

Are you referring to beacon advertising UUID?

Open "main.cpp" in BLE_Beacon sample code, the code is on line# 58. I think you have to write it backward. (little/big endian). For ex, in the comment it said, 128-bit UUID = E2 0A ... A9 61 -> the real UUID should be "61A9... 0AE2"; Put that on beaconPayload[] starting from the 4th index.

Sorry, forget about the byte order. It is Manufacture Specific Data, and the UUID is not reversed like other data type. So the UUID is as is "E20A...A961".

Off topic. I can not see the beacon using iPhone/iPad (using free app like, Locate iB, beaconharvester, etc. they required to add UUID because they are using apple framework). But I can find it using Locate iB with Samsung Note 3. (most of iPhone App, like LightBlue, BLE Explorer, BLE Finder, BLE Utility won't show iBeacon Manufacture Specific Data/UUID, perhaps it is filtered out by CoreBluetooth?). On Android, I think the API just pass the advertisement data as is.

posted by devsar devsar 20 May 2014

In case you didn't notice,

Rohit has updated the BLE_Beacon sample code, and he make it more readable. If you already had create the project based on the old code, you can update it: Open your compiler, on Program Workspace panel, select BLE_Beacon, right click and from menu select "Update". After that, open "main.cpp", the check out line 67-76.

posted by devsar devsar 21 May 2014

Seems sensible... but alas no. Changing the beaconPayload array has no effect on the UUID sniffed by various BLE monitors.

posted by Doug Shade 21 May 2014

What various BLE monitors (sniffer) do you use?

I just change the UUID ( to all 0x00, and 0x01..0x02) , and check with "iBeacon Finder" on Android 4.3 (Samsung Note 3) and confirm the change. (Also changing minor/major number works fine too).

I have TI's and Nordic dongle that can be used as sniffer to check this out, but I don't think that would be necessary.

Anyway, as said before, I can not check (see the beacon) with my iPhone (iOS7), but that should be another problem and not specific to nordic mbed beacon sample code. If you are able to check with iPhone, can you turn on/off the bluetooth setting, and try again. Apple might have some cache mechanism in their code.

Edit: I can see nordic mbed null beacon using "Locate iB" (Radius Networks) on my iPhone now.

posted by devsar devsar 21 May 2014