示例#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
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
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
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
def is_ethernet_enabled():
    return connman.is_technology_enabled(
        'ethernet') or not get_nfs_ip_cmdline_value() == None
示例#7
0
def is_wifi_enabled():
    try:
        return connman.is_technology_enabled('wifi')
    except:
        return False
示例#8
0
def is_ethernet_enabled():
    return connman.is_technology_enabled('ethernet')
示例#9
0
def is_wifi_enabled():
    return connman.is_technology_enabled('wifi')
示例#10
0
def is_ethernet_enabled():
    return connman.is_technology_enabled('ethernet') or not get_nfs_ip_cmdline_value() == None
示例#11
0
def is_wifi_enabled():
    try:
        return connman.is_technology_enabled('wifi')
    except:
        return False
示例#12
0
def is_bluetooth_enabled():
    connman_status = connman.is_technology_enabled('bluetooth')
    return connman_status
示例#13
0
def is_bluetooth_enabled():
    return connman.is_technology_enabled('bluetooth')
示例#14
0
def is_wifi_enabled():
    return connman.is_technology_enabled('wifi')