The
setbluetoothname function modifies the name of the device as broadcast to other Bluetooth devices, setting it to the string expression
bluetooth_name. When other Bluetooth-enabled devices scan for nearby devices to connect to, this is the name that they will see.
When using Bluetooth for synchronization between two devices, the Bluetooth name of the device is what is shown in the screen asking the user which device to connect to. The Bluetooth name of one device may be passed as an argument to the
syncconnect function on the other device in order to connect directly to that device, bypassing the screen asking the user which device to connect to.
On Windows, you may need to run your application with administrative privileges to successfully change the Bluetooth name.
The function returns a logical value of 1 (true) if the Bluetooth name was set and 0 (false) on error.