# kill bluetoothautomationd before running this script
from CoreAutomation import *

device = CAMEmbeddedDevice.allDevices()[0]
device.simply().asRoot()
device.simply().loadBundle_("/AppleInternal/Library/Frameworks/PurpleBluetoothAutomation.framework")
leaAlloc = device.simply().allocClass_("PurpleLEAPeripheral")
lea = leaAlloc.init()
b = lea.startAdvertiseWithName_stereo_channel_ID_("blah123", False, 0, bytearray((0xBE, 0xEF)))