Пример #1
0
def handle_setup(environ, start_response):
    for i in range(10):
        iface = get_working_hotspot_iface()
        if not iface:
            gevent.sleep(2)
            continue
        ip, _ = get_ip_and_mac(iface)
        if '10.24.1.1' != ip:
            setup_networking(iface)
        start_response(httplib.OK, [('Content-Type', 'text/plain')])
        return []
Пример #2
0
def handle_is_started(environ, start_response):
    start_response(httplib.OK, [('Content-Type', 'text/plain')])
    yield 'TRUE' if get_working_hotspot_iface() else 'FALSE'
Пример #3
0
def is_alive():
    return get_working_hotspot_iface()
Пример #4
0
def is_wifi_repeater_started():
    if wifi.has_started_before:
        return wifi.get_working_hotspot_iface()
    return False
Пример #5
0
def is_wifi_repeater_started():
    if wifi.has_started_before:
        return wifi.get_working_hotspot_iface()
    return False
Пример #6
0
def handle_started(environ, start_response):
    start_response(httplib.OK, [('Content-Type', 'text/plain')])
    yield 'TRUE' if get_working_hotspot_iface() else 'FALSE'
Пример #7
0
def is_alive():
    return get_working_hotspot_iface()