Esempio n. 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 []
Esempio n. 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'
Esempio n. 3
0
def is_alive():
    return get_working_hotspot_iface()
Esempio n. 4
0
def is_wifi_repeater_started():
    if wifi.has_started_before:
        return wifi.get_working_hotspot_iface()
    return False
Esempio n. 5
0
def is_wifi_repeater_started():
    if wifi.has_started_before:
        return wifi.get_working_hotspot_iface()
    return False
Esempio n. 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'
Esempio n. 7
0
def is_alive():
    return get_working_hotspot_iface()