Example #1
0
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)
Example #2
0
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)
Example #3
0
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
Example #4
0
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
Example #5
0
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
Example #6
0
def is_ftr_running():
    return osmc_systemd.is_service_running("ftr")
Example #7
0
def is_ftr_running():
    return osmc_systemd.is_service_running('ftr')
Example #8
0
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