Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




60 posts

Master Geek


# 222894 2-Sep-2017 14:34
3 people support this post
Send private message quote this post

I've been finding recently that I've have to routinely reboot my Huawei B315 fixed wireless modem/router, in order to get any reasonable performance out of it. By routinely I mean every 1-2 days.

 

Anyway, I got tired of doing it manually via a web browser, so I wrote a PhantomJS script to automate the reboot. The script logs onto the web UI, and clicks through the reboot process.

 

PhantomJS itself doesn't require much in the way of external dependencies, and runs headless in a CLI. Given that, it can be scheduled to run in a cron job every night, or whatever.

 

 

 

I'm sharing it here in case anyone else wants an example (my JS is pretty rough btw, not my preferred scripting language):

 

https://gist.github.com/jonathanhoskin/0bc11f55d0ec926c0a457d4110b1f46f

 

 

 

PhantomJS:

 

http://phantomjs.org/download.html

 

 

 

Feel free to get in touch if you have any questions :-)

 

 


Create new topic
'That VDSL Cat'
11028 posts

Uber Geek

Trusted
Spark
Subscriber

  # 1857243 2-Sep-2017 17:18
Send private message quote this post

Simple approach to it, nicely done! 





#include <std_disclaimer>

 

Any comments made are personal opinion and do not reflect directly on the position my current or past employers may have.




60 posts

Master Geek


  # 1857340 2-Sep-2017 19:56
Send private message quote this post

hio77:

 

Simple approach to it, nicely done! 

 

 

Thanks!


 
 
 
 


1 post

Wannabe Geek


  # 2285290 29-Jul-2019 16:30
Send private message quote this post

Thanks for the code to reboot the router.  Can I ask if you are still having to reboot your router upwards of 2 years later.  I would have hoped there would be an updated firmware to fix this issue by now.




60 posts

Master Geek


  # 2285320 29-Jul-2019 18:37
Send private message quote this post

mikeifm:

 

Can I ask if you are still having to reboot your router upwards of 2 years later.

 

 

 

 

I abandoned fixed 4G towards the end of last year, Spark's network was so congested that DSL became a better option again. I've reverted back to 10/1 VDSL, which has worse upload speeds than 4G, but gets much more consistent download speeds.

 

 


Create new topic



Twitter and LinkedIn »



Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Microsoft New Zealand Partner Awards results
Posted 18-Oct-2019 10:18


Logitech introduces new Made for Google keyboard and mouse devices
Posted 16-Oct-2019 13:36


MATTR launches to accelerate decentralised identity
Posted 16-Oct-2019 10:28


Vodafone X-Squad powers up for customers
Posted 16-Oct-2019 08:15


D Link ANZ launches EXO Smart Mesh Wi Fi Routers with McAfee protection
Posted 15-Oct-2019 11:31


Major Japanese retailer partners with smart New Zealand technology IMAGR
Posted 14-Oct-2019 10:29


Ola pioneers one-time passcode feature to fight rideshare fraud
Posted 14-Oct-2019 10:24


Spark Sport new home of NZC matches from 2020
Posted 10-Oct-2019 09:59


Meet Nola, Noel Leeming's new digital employee
Posted 4-Oct-2019 08:07


Registrations for Sprout Accelerator open for 2020 season
Posted 4-Oct-2019 08:02


Teletrac Navman welcomes AI tech leader Jens Meggers as new President
Posted 4-Oct-2019 07:41


Vodafone makes voice of 4G (VoLTE) official
Posted 4-Oct-2019 07:36


2degrees Reaches Milestone of 100,000 Broadband Customers
Posted 1-Oct-2019 09:17


Nokia 1 Plus available in New Zealand from 2nd October
Posted 30-Sep-2019 17:46


Ola integrates Apple Pay as payment method in New Zealand
Posted 25-Sep-2019 09:51



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.