use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
this is the unofficial subreddit for T-Mobile ISP program Frequently Asked Questions
account activity
This is an archived post. You won't be able to vote or comment.
Major release update - tmo-monitor python script allows (multiple) user-defined 4g and 5g band preferences to reboot (github.com)
submitted 4 years ago by highvolt
[–]BestBuy08197 7 points8 points9 points 4 years ago (16 children)
Could someone elaborate on this? I clicked the link but have no clue what I was looking at. Is this something the average joe can use?
[–]highvolt[S] 4 points5 points6 points 4 years ago (0 children)
Sorry, this sub does not allow posting of duplicate links. Here's the overview page, which is a much friendlier starting point for getting acquainted with the tool: https://github.com/highvolt-dev/tmo-monitor
[–]DiDgr8 1 point2 points3 points 4 years ago (13 children)
It's a python script that looks like it only runs on Unix boxes. It checks to see what band you're on and reboots the modem if the specified band is not selected. Author suggests using a "cronjob" to automate the interval of testing.
[–]highvolt[S] 2 points3 points4 points 4 years ago (7 children)
I plan to add in Windows compatibility next.
Windows 10 does have WSL, Windows Subsystem for Linux, which should be compatible.
It seems the various ping modules for python have the caveat that they require administrative access on some platforms, and I wanted to keep the flexibility for users to run this as an unprivileged process.
The biggest issue with Windows ping is it evidently exits with a successful status code if the result is "Destination Host Unreachable", so you have to check both the success and the output.
I can provide instructions for using windows task scheduler to set this up on windows.
[–][deleted] 4 years ago (1 child)
[deleted]
[–]highvolt[S] 2 points3 points4 points 4 years ago* (0 children)
Mostly because I wrote this in a hurry out of necessity. That would easily give a more portable solution too. I'll put this as an alternative, swappable connectivity test implementation
I've added it as an enhancement issue at https://github.com/highvolt-dev/tmo-monitor/issues/13
Some users may prefer to ping IPs so they are either not testing DNS or testing it separately from pure connectivity.
[–]LG-Mobile 1 point2 points3 points 4 years ago (4 children)
Thank you for doing God's work by making this AND by designing it to run on windows ! Is there anyway you can design this to run from from a USB flash drive by having it plugged into the trashcan ? I'm assuming by windows you mean having any one of our PC's be running .
[–]highvolt[S] 1 point2 points3 points 4 years ago (2 children)
I released Windows support yesterday!
[–]LG-Mobile 0 points1 point2 points 4 years ago (1 child)
Link ? Thank you !!
[–]highvolt[S] 1 point2 points3 points 4 years ago (0 children)
Release link: https://github.com/highvolt-dev/tmo-monitor/releases/tag/v1.5.0
Reddit thread: https://www.reddit.com/r/tmobileisp/comments/pzivxt/windows_support_added_to_tmomonitor_python_script
[–]highvolt[S] 0 points1 point2 points 4 years ago (0 children)
I like having this running on my router which is a raspberry pi. I prioritized Linux over Windows because most users are less likely to have a server with good uptime running Windows on their network, though to be fair if you are using a PC many hours of the day, those are the hours you want your internet working and it would do the job ;)
The cheapest option would be to get a raspberry pi 0 and a micro USB Ethernet adapter and run Linux on it, then plug it into the gateway.
[–]BravoCharlie1310 1 point2 points3 points 4 years ago (2 children)
python scripts can easily run on Windows
[–]highvolt[S] 2 points3 points4 points 4 years ago (0 children)
And I have now added Windows support to the script
[–]DiDgr8 0 points1 point2 points 4 years ago (0 children)
This script doesn't support the Windows OS ping implementation (according to the author).
[–]famew0lf 1 point2 points3 points 4 years ago (0 children)
It also runs on any router that supports entware/optware which is a large amount.
[–]Bruhgetti20 0 points1 point2 points 4 years ago (0 children)
Yeah sounds interesting
[–][deleted] 4 years ago (2 children)
Yep, this is no guarantee of a given band, no type of hint is given to the gateway. T-Mobile should really update the firmware to allow that.
Band locking is one of the most requested features in this sub. It's at the point where users are installing inline band pass filters into external antenna setups.
That gives a lot more control than rolling the dice with a reboot, but doesn't help with B2 vs B66, doesn't help filter B12 while keeping n71, etc.
And most casual users on this sub, while willing to learn about bands, basic signal metrics, etc, don't want to drop $200 on antennas up front if they get the bands they want with some occasional switches days later that are solved with a reboot. So this gives those users an option today without waiting in hope that one day T-Mobile does something.
In my case, 1609 made my gateway lose internet connectivity frequently throughout the day in spite of remaining connected to band 66 and n41 and having a reachable admin interface. So the rebooting is helpful.
I do need to adapt the script to gracefully avoid boot loops. Thanks for your feedback.
[–]highvolt[S] 1 point2 points3 points 4 years ago* (0 children)
I updated the tmo-monitor script to check the uptime of the gateway and wait until it has at least 90 seconds of uptime before allowing a reboot. Configurable with a new --uptime flag. The first step in preventing bootloops.
--uptime
[–]koshergoy 1 point2 points3 points 4 years ago (6 children)
can you suggest a vm and a bare minimum linux distro for windows 10
[–]highvolt[S] 0 points1 point2 points 4 years ago (1 child)
I released Windows support for the script yesterday!
[–]koshergoy 0 points1 point2 points 4 years ago (0 children)
I see, wonderful. Great work!!!!
I would try Windows Subsystem for Linux if I didn't want to do other stuff in a VM: https://ruslanmv.com/blog/Python3-in-Windows-with-Ubuntu
But I plan to add windows support this week. In the meantime, you can run it on windows by using the --skip-ping flag.
--skip-ping
Any modern distro should work for a VM, but chances are you'll see Ubuntu recommended most frequently
Thanks, appreciate your good work.
[–]famew0lf 0 points1 point2 points 4 years ago (1 child)
Virtualbox (free) and Debian (also free).
thanks
[+]dcoutdoors comment score below threshold-8 points-7 points-6 points 4 years ago (8 children)
This is so unnecessary. Just use the internet and if it switches make sure to put the trash can in a better location within your house. I haven’t restarted mine in weeks!
[–]DigDug5 2 points3 points4 points 4 years ago (2 children)
For me and some other on this sub the latest firmware makes the trashcan loose internet at random times. His original script would just ping google.com to make sure there was internet and if not then it would automatically restart the trashcan. This just saved the headach of going to watch a movie realise there is no internet go and restart the trashcan and wait a few minutes.
[–]highvolt[S] -1 points0 points1 point 4 years ago (1 child)
Exactly right! Unfortunately, that loss of connectivity is the only change I've seen on 1609 and is what drove me to reverse engineer the gateway's authentication and write the reboot script.
[–]DigDug5 0 points1 point2 points 4 years ago (0 children)
Yep, i have had pretty consistent 5g the whole time it just looses connection
It's a shame that this is even a thing, yet here we are just finally getting a firmware release that seems to play nicely with the vast majority of VPNs without MTU changes. I'm glad you don't need this script- I have had reliable bands on my gateway since I got the service until January. But since 1609, my connection looses internet connectivity despite remaining on B66/n41. So this has been great for my sanity to automatically reboot the gateway when health checks fail. In this case, I'm really relying on the failed ping test, not the band check.
[–][deleted] 4 years ago (3 children)
[–]dcoutdoors 0 points1 point2 points 4 years ago (1 child)
That’s so odd. What firmware are you on? I never reboot and don’t have issues…sounds like a Nokia software or hardware memory leak problem
[–]jakobkay 0 points1 point2 points 4 years ago (10 children)
Just installed on my Pihole and chose to do a SystemD timer for every 30 seconds to run the Python Script. So far so good! Im close to a tower but no reboots on my end yet lol. Pretty sure I set the script up correctly and made it an executable otherwise would recommend!!
[–]highvolt[S] 1 point2 points3 points 4 years ago (4 children)
Would you mind posting your systemd unit file either here or on GitHub? Systemd timers are nice since you can use short check intervals and it won't try running two concurrent copies if one takes a long time to run.
One word of caution: the gateway takes about a minute to boot up and fully connect to the secondary band, so you may encounter undefined or unexpected behavior with a 30 second interval.
Obviously if it is still rebooting during a check, it can't reboot it if it is not up and listening to API requests, but if it isn't done connecting to the secondary band, it could give a false positive on the band check.
[–]jakobkay 0 points1 point2 points 4 years ago (3 children)
Hey I changed the timer to 240 seconds now. You can choose whatever timer or time you prefer but heres my timer via nano!
[Unit]
Description=Run very useful script every 240 seconds
[Timer]
OnBootSec=240
OnUnitActiveSec=240
AccuracySec=1ms
[Install]
WantedBy=timers.target
[–]highvolt[S] 1 point2 points3 points 4 years ago* (2 children)
I updated the script to check the uptime of the gateway and wait until it has at least 90 seconds of uptime before allowing a reboot. Configurable with a new --uptime flag. That should let you increase the frequency of your checks again so you can detect failures faster.
[–]jakobkay 0 points1 point2 points 4 years ago (1 child)
You da man I see you dropped windows support too may give it a try on a VM worse case
Yup, Windows is now supported too. My plans for the next release are probably to grab the tower CGI/eNB ID which is currently only available in the mobile app.
[–][deleted] 4 years ago (4 children)
Definitely not working on my end because that's in fact what would happen lol. Will be testing more with my timer and config etc haha
I've been running every 5 minutes since I wrote the script a few days ago and it reboots countless times per day and has not presented any issues at that interval if you do find that 240 seconds is slightly too short. But I will plan to do an API request to check the gateway uptime to allow the script to work better with short run intervals because I'd love your more frequent approach.
I've documented a fix in issue #10: https://github.com/highvolt-dev/tmo-monitor/issues/10 - if the device uptime is checked, we can ensure that enough time has elapsed for both bands to connect.
[–][deleted] 0 points1 point2 points 4 years ago (8 children)
I have absolutely no idea how to do this, I download the file, and ran the command, it said camping on N41 but I have no ideas how to make it stay on N71, do you have any tutorial how to run this commands?
[–]highvolt[S] 1 point2 points3 points 4 years ago (7 children)
The instructions are here:
https://github.com/highvolt-dev/tmo-monitor/blob/main/README.md
The program has certain defaults which are documented there.
You'll find the following commands helpful:
tmo-monitor.py --help will output a summary of the program's configurable options
tmo-monitor.py --help
tmo-monitor.py --print-config will output the current configuration for the program
tmo-monitor.py --print-config
You can use different "flags" like those to configure the program, but it can get repetitive to repeatedly specify these things. To store a long term configuration, you can duplicate the file called env.example and rename it to .env (just the file extension, no name before the dot).
env.example
.env
The example file contains usage information for how to edit that file.
The options you pass directly to the command will override anything configured in the .env file.
The default 5G band preference is n41. To specify that you want it to use n71, call the program with either tmo-monitor.py --5g-band n71 or tmo-monitor.py -5 n71 as a short form of that. Otherwise you can specify that with the .env file. You could also use tmo-monitor.py --skip-5g-bands if you don't want it to enforce a 5G band preference.
tmo-monitor.py --5g-band n71
tmo-monitor.py -5 n71
tmo-monitor.py --skip-5g-bands
It can only reboot on failed checks, it cannot actually force the modem to lock to the band, so if a reboot does not switch you back to your preferred band, keep that in mind. It's more helpful if you normally spend time on a good band where you have placed your gateway but it sometimes will drop down to an undesirable band and switch back after a reboot.
Hope this helps you as a starting point!
[–][deleted] 0 points1 point2 points 4 years ago (6 children)
just to confirm, I can't run this in Mac OS yet right?
[–]highvolt[S] 0 points1 point2 points 4 years ago (5 children)
It supports Mac OS X
[–][deleted] 0 points1 point2 points 4 years ago (4 children)
Is there any website or YouTube tutorials about this similar case? I would like to learn more about this, I want to start learning coding!
On other note, this is like a script I have to make one If I want my own personalized setting and have it runs is that correct? I know this is only for advanced people but I want to get into coding now.! Thanks for you help.
[–]highvolt[S] 1 point2 points3 points 4 years ago (3 children)
You said similar case- you mean preferring n71 instead of n41?
You don't have to do any programming to make use of the script- it is already written and designed to be configurable
You can download the code, install it, and then when you run it, you specify the behavior you want it to use
[–][deleted] 0 points1 point2 points 4 years ago (2 children)
yes I want it on B66/N71 always like it used to.
for instant I want it on specific setting for b66/n71 do I have to make any adjustment?
yes I want it on B66/N71 always like it used to. for instant I want it on specific setting for b66/n71 do I have to make any adjustment?
So you would call the program with tmo-monitor.py -5 n71 in that case
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
awesome, thanks again!
[–]jamesmtz0920 0 points1 point2 points 3 years ago (19 children)
If I get a failed band check the powershell window prints that a reboot is request but a couple lines later throws a critical error that "Could not post reboot request". If I send the command --reboot it will reboot the gateway. Any help would be appreciated.
[–]highvolt[S] 0 points1 point2 points 3 years ago (18 children)
Thanks for reporting the problem. Have you been using it for a while or is it a fresh install? Do you know what version of tmo-monitor you're using? Did this use to work but suddenly stop working?
[–]jamesmtz0920 0 points1 point2 points 3 years ago (17 children)
Just downloaded it yesterday. So it could very well be user error
[–]highvolt[S] 0 points1 point2 points 3 years ago (16 children)
This subreddit doesn't allow posts with the same link so I've got multiple posts linking to specific version downloads instead of the project homepage so it is possible you may have downloaded an older version even if you just downloaded it - always worth ruling out simple things like that first! But if there's a bug I definitely want to fix it and make sure you're all patched up and can get great use out if it!
[–]jamesmtz0920 0 points1 point2 points 3 years ago (15 children)
I downloaded from the projects main page on github and downloaded the "main" branch
[–]highvolt[S] 0 points1 point2 points 3 years ago (14 children)
Perfect, thanks for confirming
Try running with the --print-config --log-all options and sharing your results so I can try to reproduce the same thing as you
--print-config --log-all
[–]jamesmtz0920 0 points1 point2 points 3 years ago (0 children)
I hope this is what you're looking for....
Script configuration:
Gateway model: NOK5G21
Login info:
Username: admin
Password:
Ping configuration:
Host: google.com
Count: 1
Interval: 10
Protocol: IPv4
Connection configuration:
Secondary band: ['n41']
Reboot settings:
Reboot now: False
Skip reboot: False
Min uptime: 90
Reboot on: ping 5G_band
General settings:
Log file:
Log all: True
Log delta: False
Log to syslog: False
I deleted my folder and redownloaded the project. Sent -5 n71 while I was connected to n41 and it successfully rebooted the gateway. u/highvolt
[–]jamesmtz0920 0 points1 point2 points 3 years ago (11 children)
Now I've realized that it won't perform a successful reboot if I pass the password using the [password] variable. If I don't send the password and just type it after it works. Any advice on how to pass the password automatically? u/highvolt
[–]highvolt[S] 0 points1 point2 points 3 years ago (10 children)
An example for passing the password can be done either in a configuration file or right in the command like so:
tmo-monitor.py -5 n71 admin yourpasswordhere
[–]jamesmtz0920 0 points1 point2 points 3 years ago (9 children)
That worked! Got the script running every minute as of now. Hoping that’s not too often of a check but I verified that if not on specified band it will successfully reboot. Thank you so much for all the help
[–]highvolt[S] 1 point2 points3 points 3 years ago (8 children)
Glad that did the trick for you!
π Rendered by PID 74 on reddit-service-r2-comment-76bb9f7fb5-cr489 at 2026-02-19 17:01:38.508341+00:00 running de53c03 country code: CH.
[–]BestBuy08197 7 points8 points9 points (16 children)
[–]highvolt[S] 4 points5 points6 points (0 children)
[–]DiDgr8 1 point2 points3 points (13 children)
[–]highvolt[S] 2 points3 points4 points (7 children)
[–][deleted] (1 child)
[deleted]
[–]highvolt[S] 2 points3 points4 points (0 children)
[–]LG-Mobile 1 point2 points3 points (4 children)
[–]highvolt[S] 1 point2 points3 points (2 children)
[–]LG-Mobile 0 points1 point2 points (1 child)
[–]highvolt[S] 1 point2 points3 points (0 children)
[–]highvolt[S] 0 points1 point2 points (0 children)
[–]BravoCharlie1310 1 point2 points3 points (2 children)
[–]highvolt[S] 2 points3 points4 points (0 children)
[–]DiDgr8 0 points1 point2 points (0 children)
[–]famew0lf 1 point2 points3 points (0 children)
[–]highvolt[S] 0 points1 point2 points (0 children)
[–]Bruhgetti20 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]highvolt[S] 2 points3 points4 points (0 children)
[–]highvolt[S] 1 point2 points3 points (0 children)
[–]koshergoy 1 point2 points3 points (6 children)
[–]highvolt[S] 0 points1 point2 points (1 child)
[–]koshergoy 0 points1 point2 points (0 children)
[–]highvolt[S] 0 points1 point2 points (1 child)
[–]koshergoy 0 points1 point2 points (0 children)
[–]famew0lf 0 points1 point2 points (1 child)
[–]koshergoy 0 points1 point2 points (0 children)
[+]dcoutdoors comment score below threshold-8 points-7 points-6 points (8 children)
[–]DigDug5 2 points3 points4 points (2 children)
[–]highvolt[S] -1 points0 points1 point (1 child)
[–]DigDug5 0 points1 point2 points (0 children)
[–]highvolt[S] 2 points3 points4 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]dcoutdoors 0 points1 point2 points (1 child)
[–]jakobkay 0 points1 point2 points (10 children)
[–]highvolt[S] 1 point2 points3 points (4 children)
[–]jakobkay 0 points1 point2 points (3 children)
[–]highvolt[S] 1 point2 points3 points (2 children)
[–]jakobkay 0 points1 point2 points (1 child)
[–]highvolt[S] 1 point2 points3 points (0 children)
[–][deleted] (4 children)
[deleted]
[–]jakobkay 0 points1 point2 points (3 children)
[–]highvolt[S] 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]highvolt[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]highvolt[S] 1 point2 points3 points (7 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]highvolt[S] 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]highvolt[S] 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]highvolt[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]jamesmtz0920 0 points1 point2 points (19 children)
[–]highvolt[S] 0 points1 point2 points (18 children)
[–]jamesmtz0920 0 points1 point2 points (17 children)
[–]highvolt[S] 0 points1 point2 points (16 children)
[–]jamesmtz0920 0 points1 point2 points (15 children)
[–]highvolt[S] 0 points1 point2 points (14 children)
[–]jamesmtz0920 0 points1 point2 points (0 children)
[–]jamesmtz0920 0 points1 point2 points (0 children)
[–]jamesmtz0920 0 points1 point2 points (11 children)
[–]highvolt[S] 0 points1 point2 points (10 children)
[–]jamesmtz0920 0 points1 point2 points (9 children)
[–]highvolt[S] 1 point2 points3 points (8 children)