Created
July 7, 2014 06:57
-
-
Save dodysw/070a04fce79858a4a0e4 to your computer and use it in GitHub Desktop.
Bolt! Super 4G LTE modem restart script. Why? 1) I'm not sure why this works. Unbased explanation: This modem type frequently stucked to a bad signal probably coming from a far BTS. Restarting forces it to reacquire 4G signals, hopefuly getting a closer BTS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Bolt! Super 4G LTE modem restart script. | |
# Why? 1) I'm not sure why this works. Unbased explanation: This modem type frequently stucked to a bad signal probably coming from a far BTS. Restarting forces it to reacquire 4G signals, hopefuly getting a closer BTS. | |
# Copyright 2014 Dody Suria Wijaya <[email protected]> | |
import urllib, urllib2, base64 | |
PASSWORD = 'admin' | |
MODEM_IP = '192.168.1.1' | |
dataLogin = dict(isTest='false', goformId='LOGIN', password=base64.b64encode(PASSWORD)) | |
dataRestart = dict(isTest='false', goformId='REBOOT_DEVICE') | |
url = "http://%s/goform/goform_set_cmd_process" % MODEM_IP | |
headers = dict(Referer="http://%s/index.html" % MODEM_IP) | |
urllib2.urlopen(urllib2.Request(url, urllib.urlencode(dataLogin), headers)).read() | |
urllib2.urlopen(urllib2.Request(url, urllib.urlencode(dataRestart), headers)).read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment