Force reconnection in Repeater Mode

Hello all.

I have a GL-MT3000 (Beryl AX) and firmware was updated last week to latest version.

I’m on a cruise ship (Carnival Mardi Gras). The travel router connected to the wifi in repeater mode no problem. [I used the first time I connected any devices to the network, so it would have been the first MAC address the network saw - I read some people might have an issue with this, so I wanted to point this out].

However, it keeps randomly disconnecting - typically when nobody’s been on it for a bit. Is there any way to force it to reconnect? (b/c it doesn’t)

Or to force a small amount of traffic through the router so that the ship’s network doesn’t think that the router is a ‘stale’ connection and terminate it? [not sure if this is actually the issue or not]

Thanks!

The logic of the current repeater design is to automatically reconnect and It will stop reconnecting unless the repeater connection shows an incorrect password. what are the prompts on the ui?

If goodcloud is turned on, a small amount of traffic will always pass through.

I thought that mwan3 would already be sending out repetitive pings to detect Internet accessibility, which should be a small amount of traffic.

I do not work for and I am not directly associated with GL.iNet

Hi, is there a way to let the router keep scanning forever?
I am using a SFT1200 to connect to a wifi camera locally and occasionally I enable the hotspot in my mobile phone.
I thought the router would be able to work in this scenario but like you say it stop trying to reconnect after a while.
It could pass days between each time the hotspot is enabled, is there a way to workaround this?
I have setup the router for some people who doesn’t understand anything about tech at all, I cannot ask them to go to the web interface to reconnect every time.

Could you provide some logs about the time when it stops to reconnect?

I solved it, by updating to the latest 4.x beta firmware. It seem 3.x firmware have a different behaviour for reconnection, once it gives up it never reconnect automatically.

Advanced Solution using python (GL-SFT1200 Opal Firmware 4.x tested)
2. Install python3 opkg update && opkg install python3
3. Modify the python script to match your creds and wifi (at the bottom of this comment)
4. Upload the python script (you can copy and paste it with vim vim ~/scripts/repeater-reconnect.py). (I uploaded as~/scripts/repeater-reconnect.py) You might need to create the folder first mkdir -p ~/scripts
5. Assign exec permissions chmod +x ~/scripts/repeater-reconnect.py
6. Configure a cron tab via http://192.168.8.1/cgi-bin/luci/admin/system/crontab (mine runs every 10 mins) */10 * * * * /usr/bin/python3 ~/scripts/repeater-reconnect.py
7. Restart the cron service via http://192.168.8.1/cgi-bin/luci/admin/system/startup
8. Enjoy

import http.client
import hashlib
import json
import subprocess

#CONFIG VARIABLES (CONFIGURE HERE!!!!!)
router_password = 'xxxxxx'
username = 'root'
wifi_password = 'xxxxxxx'
wifi_ssid = 'xxxxxxx'

def generate_hash(password, salt, nonce, username):

   # Generate the password hash using openssl
    pwd_process = subprocess.run(
    ["openssl", "passwd", "-1", "-salt", salt, password],
    capture_output=True,
    text=True
    )
    pwd = pwd_process.stdout.strip()

    # Create the combined string and generate its MD5 hash
    combined_string = f"{username}:{pwd}:{nonce}"
    hash_object = hashlib.md5(combined_string.encode())
    hash_value = hash_object.hexdigest()


    return hash_value

conn = http.client.HTTPConnection("192.168.8.1")

payload = "{\"jsonrpc\":\"2.0\",\"id\":63,\"method\":\"challenge\",\"params\":{\"username\":\"root\"}}"

headers = {
    'Accept': "application/json, text/plain, */*",
    'Accept-Language': "en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7,es-US;q=0.6,es;q=0.5",
    'Cache-Control': "no-cache",
    'Connection': "keep-alive",
    'Content-Type': "application/json",
    'Origin': "http://192.168.8.1",
    'Pragma': "no-cache",
    'Referer': "http://192.168.8.1/",
    }

conn.request("POST", "/rpc", payload, headers)

res = conn.getresponse()
data = res.read()

# # first request
result_nonce = json.loads(data.decode("utf-8"))
salt = result_nonce['result']['salt']
nonce = result_nonce['result']['nonce']
hash = generate_hash(router_password, salt, nonce, 'root')


# Second query for authentication
conn2 = http.client.HTTPConnection("192.168.8.1")

payload2 = f'{{"jsonrpc":"2.0","id":64,"method":"login","params":{{"username":"{username}","hash":"{hash}"}}}}'

headers2 = {
    'Accept': "application/json, text/plain, */*",
    'Accept-Language': "en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7,es-US;q=0.6,es;q=0.5",
    'Cache-Control': "no-cache",
    'Connection': "keep-alive",
    'Content-Type': "application/json",
    'Origin': "http://192.168.8.1",
    'Pragma': "no-cache",
    'Referer': "http://192.168.8.1/",
    }

conn2.request("POST", "/rpc", payload2, headers2)

res2 = conn2.getresponse()
data2 = res2.read()

result_login = json.loads(data2.decode("utf-8"))
sid = result_login['result']['sid']

# Connect Wifi

conn3 = http.client.HTTPConnection("192.168.8.1")

payload3 = f'{{"jsonrpc":"2.0","id":828,"method":"call","params":["{sid}","repeater","connect",{{"protocol":"dhcp", "ssid":"{wifi_ssid}", "key":"{wifi_password}", "remember":true, "manual":false}}]}}'

headers3 = {
    'Accept': "application/json, text/plain, */*",
    'Accept-Language': "en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7,es-US;q=0.6,es;q=0.5",
    'Cache-Control': "no-cache",
    'Connection': "keep-alive",
    'Content-Type': "application/json",
    'Origin': "http://192.168.8.1",
    'Pragma': "no-cache",
    'Referer': "http://192.168.8.1/", 
}

conn3.request("POST", "/rpc", payload3, headers)

res3 = conn3.getresponse()
data3 = res3.read()

print(data3.decode("utf-8"))