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