コード例 #1
0
def is_bt_up():
    if connman.is_technology_available('bluetooth') == False:
        journallog('No bluetooth hardware available.')
        #exit()
        return False
    if connman.is_technology_enabled('bluetooth') == False:
        journallog('Bluetooth is disabled.')
        #exit()
        return False
    return True
コード例 #2
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
コード例 #3
0
ファイル: osmc_bluetooth.py プロジェクト: fernandog/osmc
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
コード例 #4
0
ファイル: osmc_bluetooth.py プロジェクト: danidomi/osmc
def is_bluetooth_enabled():
    connman_status = connman.is_technology_enabled("bluetooth")
    service_status = systemd.is_service_running(BLUETOOTH_SERVICE)
    return connman_status and service_status
コード例 #5
0
ファイル: osmc_bluetooth.py プロジェクト: darkflag/osmc
def is_bluetooth_enabled():
    connman_status = connman.is_technology_enabled('bluetooth')
    service_status = systemd.is_service_running(BLUETOOTH_SERVICE)
    return connman_status and service_status
コード例 #6
0
ファイル: osmc_network.py プロジェクト: jacobwindsor/osmc
def is_ethernet_enabled():
    return connman.is_technology_enabled(
        'ethernet') or not get_nfs_ip_cmdline_value() == None
コード例 #7
0
ファイル: osmc_network.py プロジェクト: jacobwindsor/osmc
def is_wifi_enabled():
    try:
        return connman.is_technology_enabled('wifi')
    except:
        return False
コード例 #8
0
ファイル: osmc_network.py プロジェクト: thewiep/osmc
def is_ethernet_enabled():
    return connman.is_technology_enabled('ethernet')
コード例 #9
0
ファイル: osmc_network.py プロジェクト: thewiep/osmc
def is_wifi_enabled():
    return connman.is_technology_enabled('wifi')
コード例 #10
0
ファイル: osmc_network.py プロジェクト: AlexanderLJ/osmc
def is_ethernet_enabled():
    return connman.is_technology_enabled('ethernet') or not get_nfs_ip_cmdline_value() == None
コード例 #11
0
ファイル: osmc_network.py プロジェクト: AlexanderLJ/osmc
def is_wifi_enabled():
    try:
        return connman.is_technology_enabled('wifi')
    except:
        return False
コード例 #12
0
ファイル: osmc_bluetooth.py プロジェクト: younes200/osmc
def is_bluetooth_enabled():
    connman_status = connman.is_technology_enabled('bluetooth')
    return connman_status
コード例 #13
0
ファイル: osmc_bluetooth.py プロジェクト: eskildsf/osmc
def is_bluetooth_enabled():
    return connman.is_technology_enabled('bluetooth')
コード例 #14
0
ファイル: osmc_network.py プロジェクト: mellebeek/osmc
def is_wifi_enabled():
    return connman.is_technology_enabled('wifi')