def unregister(self): bus = BleTools.get_bus() adapter = BleTools.find_adapter(bus) ad_manager = dbus.Interface( bus.get_object(BLUEZ_SERVICE_NAME, adapter), LE_ADVERTISING_MANAGER_IFACE) ad_manager.UnregisterAdvertisement(self.get_path()) print("GATT advertisement UNregistered")
def register(self): adapter = BleTools.find_adapter(self.bus) service_manager = dbus.Interface( self.bus.get_object(BLUEZ_SERVICE_NAME, adapter), GATT_MANAGER_IFACE) service_manager.RegisterApplication(self.get_path(), {}, reply_handler=self.register_app_callback, error_handler=self.register_app_error_callback)
def register(self): bus = BleTools.get_bus() adapter = BleTools.find_adapter(bus) ad_manager = dbus.Interface( bus.get_object(BLUEZ_SERVICE_NAME, adapter), LE_ADVERTISING_MANAGER_IFACE) ad_manager.RegisterAdvertisement( self.get_path(), {}, reply_handler=self.register_ad_callback, error_handler=self.register_ad_error_callback)