def toggle_bluetooth_state(state): if state: if not osmc_systemd.is_service_running(BLUETOOTH_SERVICE): osmc_systemd.toggle_service(BLUETOOTH_SERVICE, state) connman.toggle_technology_state('bluetooth', state) else: connman.toggle_technology_state('bluetooth', state)
def is_bluetooth_enabled(): connman_status = connman.is_technology_enabled('bluetooth') service_status = osmc_systemd.is_service_running(BLUETOOTH_SERVICE) adapterFound = False if connman_status and service_status: try: bluetooth.get_adapter() adapterFound = True except: # catch issue where connman reports BT but Bluez can't find an adapter adapterFound = False return connman_status and service_status and adapterFound
def is_bluetooth_enabled(): connman_status = connman.is_technology_enabled('bluetooth') service_status = osmc_systemd.is_service_running(BLUETOOTH_SERVICE) return connman_status and service_status
def is_ftr_running(): return osmc_systemd.is_service_running("ftr")
def is_ftr_running(): return osmc_systemd.is_service_running('ftr')