'Can you permanently change the name that a bluetooth low energy device advertises?

I am trying to get around Apples "no mac addresses" decision by creating unique names for each device to transmit so users can bluetooth connect via the name rather than the UUID generated by Apple. There is a bit of a security concern that someone may be able to change the name of a device after we have set it internally. Is there a way to make the name change permanent or another way to secure it?

One solution we have come up with is to have a user connect for the first time via the device name and then once the UUID is discovered, to from that point on utilize the UUID instead of the name so if some random person goes and changes the name, the user will still be able to connect. However, since each Apple device has a different UUID for the same device, if the user gets a new iPhone, and someone has changed the name, they won't be able to connect to their device at all. So, it almost seems like the best solution would be to generate a permanent identifier as I mentioned in the first paragraph of this question.

Overall, my question is how can I permanently change a bluetooth le device's name?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source