× Introducing the Orbi 970 Series Mesh System with WiFi 7 technology. For more information visit the NETGEAR Press Room.
Nighthawk M6 Pro Unlocked Hotspot 5G mmWave
Reply

Re: Netgear Nighthawk M1 - data connection problem

Georgiana
Follower

Netgear Nighthawk M1 - data connection problem

MR1100 - Dear netgear support, I am writing because you are the last chance to fix the product otherwise I will have to throw it away. I have several problems, but the most important is that the device puts off connection at intervals of time, with this I do not mean the wifi signal (which I disabled standby in settings) but the data connection of the SIM card is inexplicably disabled. The only thing i can do is go to settings cellular and put the data field OFF apply and then put data ON and apply. It only works for a few hours, and then I have to do it again. My current firmware is NTG9X50C_12.06.02.00 Operator Sim is ILIAD.I verified that the problem occurs when the signal enters the G and 3G bands. Can you debug the problem and eventually send me an upgrade firmware? Thanks

Model: MR1100|Nighthawk LTE Mobile Hotspot Router (AU)
Message 1 of 17
Blanca_O
NETGEAR Moderator

Re: Netgear Nighthawk M1 - data connection problem

Hi @Georgiana

 

I have sent you a message. Please check your inbox.

 

Regards, 
Blanca 
Community Team
 

Message 2 of 17
Mexoh1To7k
Apprentice

Re: Netgear Nighthawk M1 - data connection problem

I have a made a script that automatically push the data button if you want, it succeeds at reestablishing the connection within a second. You need a computer for monitoring though.

 

You have Iliad, which is the company that operates Free Mobile in France. They have set a maximum time to live of 12 hours for the PPP sessions and the MR1100 fails to reestablish the connection after the hang up.

 

It's not difficult to fix but Netgear doesn't seem to care very much about it.

 

Lemme know if you want the script.

Message 3 of 17
Truster
Aspirant

Re: Netgear Nighthawk M1 - data connection problem

Est-ce que ce serait possible que vous publiez ce script pour que d'autres personne (dont moi) pouvions l'utiliser ?

Ce serait tres sympatic.

Model: MR1100|Nighthawk LTE Mobile Hotspot Router (AU)
Message 4 of 17
nokiahelp
Tutor

Re: Netgear Nighthawk M1 - data connection problem

 @Mexoh1To7k hello, I'm interested in the script too 😄

 

Model: MR1100|Nighthawk M1 Mobile Router
Message 5 of 17
Mexoh1To7k
Apprentice

Re: Netgear Nighthawk M1 - data connection problem

Hi,

 

Sorry for that long delay. I have attached the script.

 

Just adjust the 'ip' and 'pwd' variables to reflect your MR1100 and keep the script running.

 

This is a python 3 script.

 

#!/usr/bin/python3
import requests
import json
import time
import datetime

ip = "192.168.1.1"
pwd = "admin"

url_session = "http://{}/sess_cd_tmp".format(ip)
url_js_token = "http://{}/js/NetgearStrings.js".format(ip)
url_config = "http://{}/Forms/config".format(ip)
url_json = "http://{}/api/model.json".format(ip)
url_json_success = "http://{}/success.json".format(ip)
url_success = "http://{}/index.html".format(ip)
timeout = 3
first_run = True 

def router_reachable(r):
    global first_run
    try:
        s = r.get(url_session, timeout=timeout)
        first_run = False
        if s.status_code != 200:
            raise ValueError("Wrong status code")
        print("Connect OK.")
    except:
        print("MR1100 unreachable. Wrong IP?")
        exit(1)

def login(r):
    try:
        r.get(url_session, timeout=timeout)
    except:
        print("Connection failed. Wrong IP?")
        time.sleep(2)

    try:
        js = r.get(url_js_token, timeout=timeout).text
        global token
        token = js.splitlines()[11].split()[1].strip('"')

        data = {
            'token': token,
            'err_redirect': '/index.html?loginfailed',
            'ok_redirect': '/index.html',
            'session.password': pwd,
        }
    except:
        print("Token computation failed.")
    
    login_success = False

    try:
        redirect_url = r.post(url_config, data=data, timeout=timeout).url
        if redirect_url == url_success:
            login_success = True
        else:
            print("Failed to authenticate, incorrect password?")
            exit(1)

        return login_success
    except:
        print("Connection failed.")


def get_status(r):
    try:
        json_model = json.loads(r.get(url_json, timeout=10).text)
        status = json_model['wwan']['connection']
        return status
    except:
        print("Cannot retrieve connection status.")


def reconnect(r):
    try:
        disconnect = {
            'token': token,
            'err_redirect': '/error.json',
            'ok_redirect': '/success.json',
            'wwan.autoconnect': 'Never',
        }
        connect = {
            'token': token,
            'err_redirect': '/error.json',
            'ok_redirect': '/success.json',
            'wwan.autoconnect': 'HomeNetwork',
        }

        push = r.post(url_config, data=disconnect, timeout=timeout)
        push2 = r.post(url_config, data=connect, timeout=timeout)
        if push.url != url_json_success:
            print("Failed to disconnect.")
        elif push2.url != url_json_success:
            print("Failed to reconnect.")
    except:
        print("Connection failed.")
    

def main():
    r = requests.Session()

    if first_run:
        router_reachable(r)

    login(r)
    status = get_status(r)
    
    if status != "Connected":
        reconnected = False
        while not reconnected:
            reconnect(r)
            time.sleep(5)
            status = get_status(r)
            if status == "Connected":
                timestamp = datetime.datetime.now()
                s = "Reconnect successful {}".format(timestamp)
                reconnected = True
                print(s)
    time.sleep(2)

if __name__ == '__main__':
    while True:
        try:
            main()
        except KeyboardInterrupt:
            exit(0)
        except SystemExit as e:
            exit(1)
        except:
            time.sleep(2)
            main()
Message 6 of 17
nokiahelp
Tutor

Re: Netgear Nighthawk M1 - data connection problem

@Mexoh1To7k Many thanks !

Maybe a stupid question but the script needs to run on a PC connected to the router, right ?

Is it possible to execute the script on an android device (like a tablet) ?

Thanks again 🙂

Model: MR1100|Nighthawk M1 Mobile Router
Message 7 of 17
Mexoh1To7k
Apprentice

Re: Netgear Nighthawk M1 - data connection problem

Yes, the machine on which you run the script must have access to the web interface of the MR1100.

 

Android generally doesn't ship with Python, but there's a terminal emulator called Termux that seems to include it. Feedback appreciated.

 

Message 8 of 17
nokiahelp
Tutor

Re: Netgear Nighthawk M1 - data connection problem

OK, thank you

 

I've installed Termux but there is a problem when importing requests (and maybe the two others). Please see the screenshoot in attachment

Model: MR1100|Nighthawk M1 Mobile Router
Message 9 of 17
Mexoh1To7k
Apprentice

Re: Netgear Nighthawk M1 - data connection problem

Try running "pip install requests" from the terminal.

Message 10 of 17
nokiahelp
Tutor

Re: Netgear Nighthawk M1 - data connection problem

Yep it's working I guess : "Connect OK." and then command prompt (I can write a command).
I'll let the script running on my phone during night and see tomorrow morning.
Thank you again, and good night !
Model: MR1100|Nighthawk M1 Mobile Router
Message 11 of 17
Mexoh1To7k
Apprentice

Re: Netgear Nighthawk M1 - data connection problem

Yes, it means that it's working.

 

It will prompt a message when a reconnection occurs followed by the date and time.

Message 12 of 17
nokiahelp
Tutor

Re: Netgear Nighthawk M1 - data connection problem

Right ! As you can see on my screenshoot (see attachment) your script is running fine on Android.

Thank you very much !

Model: MR1100|Nighthawk M1 Mobile Router
Message 13 of 17
Mexoh1To7k
Apprentice

Re: Netgear Nighthawk M1 - data connection problem

Great.

 

See also, the few connection errors are usually due to wireless congestions.

 

Message 14 of 17
nokiahelp
Tutor

Re: Netgear Nighthawk M1 - data connection problem

The instructions for installing on Android being scattered and incomplete, here's a complete tutorial on

How to run the python script on Android:

 

  1.  First, download and install Termux on Google Play: https://play.google.com/store/apps/details?id=com.termux&hl=en
  2.  Open Termux and type the following commands (press the Enter key after each):
  • apt update && apt upgrade

If there is an error, check your internet connection and try again:

img_1.jpg

 

If updates are found, type y then press the Enter key and wait until the end:

img_2.jpg

 

If a prompt appears during the installation, press the Enter key (keep default) and wait until the end:

img_3.jpg

 

 

  • termux-setup-storage (in order to access your files)

img_4.jpg

 

 

  • apt install python

Type y then press the Enter key and wait until the end:

img_5.jpg

 

 

  • pip install requests

At the end of the installation, if you have the message "You should consider upgrading via 'pip install --upgrade pip' command", ignore it:

img_6.jpg

 

 

  • cd storage/shared

You are now in your internal storage.

If the script is in the Download folder, type cd Download and press the Enter key to go into it.

Mine is in a folder named _install, so I type cd _install and I'm inside.

If you want to go back (in the parent folder), type cd .. and press the Enter key.

If you want to show what's in your folder, type ls and press the Enter key.

img_7.jpg

 

Now you are in the correct folder, type python script_name.py and press the Enter key, where script_name is the name of the script file.

Mine is restart_connection, so I type python restart_connection.py in order to execute it.

If everything is working, you should see the message Connect OK. Now let the script run in background.

img_8.jpg

 

If you want to stop it, access the quick settings and click on Exit.

If you want to re-execute it, follow the instructions from the #5 point "cd storage/shared".

img_9.jpg

 

Voilà! And sorry for English mistakes, I'm french Smiley Tongue

Thanks again @Mexoh1To7k 

Model: MR1100|Nighthawk M1 Mobile Router
Message 15 of 17
elmheeer
Aspirant

Re: Netgear Nighthawk M1 - data connection problem

Hi. I've got some problems with my data connection too. I can only get 3G or H signal. Before I can get a 4G connection now I don't know what happened. I can't anymore get a 4G connection with my Saudi internet sim. Tried to use the sim in other mobile hotspot/router and the sim can get a 4G connection. I hope you can help me if somehow you resolve yours. Thanks
Message 16 of 17
nokiahelp
Tutor

Re: Netgear Nighthawk M1 - data connection problem

Hi @elmheeer , you should create a new topic for your problem Smiley Wink

Model: MR1100|Nighthawk M1 Mobile Router
Message 17 of 17
Top Contributors
Discussion stats
  • 16 replies
  • 17193 views
  • 9 kudos
  • 6 in conversation
Announcements

Orbi WiFi 7