I want to write that command in a .bat file and run it by windows scheduler at certain times of night and morning.
(for example: open connection at 23:00 and close it again next day at 9:00 automatically)
Already I am doing same procedure with using netsh command (in below) that can disable/enable my "Local Area Connection" and cause Ethernet light of my modem to be turned off (that is one of 4 lights of modem including: Power, Ethernet, DSL, Internet)
netsh interface set interface name="Local Area Connection" admin=disabled/enabled
And now I want to find a way to close the connection to the ISP (which cause DSL and Internet lights of the modem to be turned off) or a way to disconnect it (which cause Internet light of the modem to be changed from Green to Red).
My modem: ZyXEL "P-650R-T1v3"
--
Update 1: What about DSL connection and turning off its light or in other word closing connection to the ISP?
--
Update 2: In response to the good and detailed answer of MR. @Michael_Kjörling, I changed my question and now I think my ultimate goal as mentioned in update 1 is terminating/closing my connection to the ISP and vice versa.
(Option 2 of @Michael_Kjörling answer with a difference: I want to turn on the Internet connection during the night (from 23:00 to 09:00 o'clock of next day and also,) leave the computer on for a specific internet usage when I'm not in front of my PC to operate it manually and remember that I don't want to leave my pc with internet access before 23:00 and after 09:00)
When I use netsh command, it does not close my connection to the ISP and in connection log of my user in ISP website, I am still connected. But when I remove/unplug my telephone wire from modem or turn the modem off or using "Connect On-Demand" future of modem Web UI, then I can see the disconnection time in log page of ISP website and reach my goal physically! (However I want to reach my goal by command and scheduler or a similar way without using a timer because I don't want to pay for it if I can reach my goal without purchasing a Timer device.)
--
Update 3: What about Connect On-Demand ability?
It's not work fine for my goal.
And what about connect/disconnect Button in Web UI of Modem?
Is there anyway to handle that work by schedule? for example using a command that sends user-name and password of Web UI with a parameter to modem to tell it to be connected/disconnected.
-
2Not likely. You probably could if the device had SSH access, or the webui had a power off option (which is not terribly likely). Why not just use a timer? Something like this would do the job: belkin.com/us/p/P-F7C009MaQleod– MaQleod2014年03月22日 23:12:56 +00:00Commented Mar 22, 2014 at 23:12
-
@MaQleod Thank you, timer may be my last choice and is fine. now what about update 1?Victory Hymn– Victory Hymn2014年03月24日 12:26:41 +00:00Commented Mar 24, 2014 at 12:26
-
4You could perhaps build a Lego robot that unplugs and replugs the power and phone wiring going to the cable modem at appropriate intervals?user– user2014年03月24日 12:51:38 +00:00Commented Mar 24, 2014 at 12:51
-
@MaQleod ► I found that my Modem Web UI have a disconnect/connect option: i.sstatic.net/Rs2nz.jpg ► Is it useful?Victory Hymn– Victory Hymn2014年04月01日 10:52:22 +00:00Commented Apr 1, 2014 at 10:52
2 Answers 2
Honestly, I think you are trying to over-engineer this. I can see two obvious options, depending on what is your ultimate goal.
You want to eliminate the light from the modem, because you find it distracting. In this case, just cover the lights with something, perhaps something as simple as a piece of cardboard. Make sure to not cover any ventilation holes.
You want to turn off the Internet connection during the night, but leave the computer on. This is exactly what a timer (or more accurately, an electric time switch) does. Hook your modem to it, set it to turn off the power between 23:00 and 09:00, and call it a day (or night). I'd suggest caution with the cheapest models as they might not play very nicely with sensitive electronics.
Virtually any other alternative is going to basically replicate the functionality of either one of those options, likely for more effort.
Simple time switches often are 24-hours only, but there exist those that can be set to take into account the day of the week (here is one example that allows for eight on/off cycles per day for seven days, which I was able to find with a quick Google search; your local home supply store will undoubtedly be able to suggest possibilities).
Additionally, taking your question at face value:
now I want to find a way to power off/on my modem totally.
If the modem is truly powered off, how is the computer going to be able to turn it on (which implies that there's something still powered on, else there would be nothing for the computer to communicate with)? That is essentially the same question as in is it possible to wake up a Linux device at a specific time (full disclosure: the accepted answer is mine), except in this case we have much less control over the device in question.
-
Thank you Mr. @Michael, I was in trouble. now what do you think about changes in my question?Victory Hymn– Victory Hymn2014年03月30日 12:29:33 +00:00Commented Mar 30, 2014 at 12:29
its rough but here is how I did it on windows 8
@echo off
rem get the name of the adapter to turn off
wmic nic get name
rem turn off adapter
wmic path win32_networkadapter where name="SOME ADAPTER THAT NEEDS TURNED OFF" call diable 2>nul
rem turn on adapter
wmic path win32_networkadapter where name="SOME ADAPTER THAT NEEDS TURNED OFF" call enable 2>nul
exit
-
nope! it's work like netsh command that I wrote in question. It can't disconnect me from ISP.Victory Hymn– Victory Hymn2014年04月01日 11:30:25 +00:00Commented Apr 1, 2014 at 11:30
-
based off of what you said, and how I understand it, I would turn the router dchp off and make it a transparent bridge, then use the computer to authenticate the internet connection. I used to do this when I wanted to simulate a static ip on a dynamic ip configuration, the down side is it by passes all the router/modem security. then if you netsh or wmic your adapter your disconnected, then you can set the batch inside the scheduler to automate the connection. other than that, I have no clear understanding as to what your trying to do.Donald– Donald2014年04月04日 02:58:30 +00:00Commented Apr 4, 2014 at 2:58
-
Ok, I have done some research, to give commands directly to your adsl modem you need something called cli commands, researching the site your modem was manufactured, I found that there does not seem to be a ZyXEL "P-650R-T1v3" but there is a ZyXEL "P-660R-T1v3", and it does not have a cli commands list, so I am assuming that it can not receive direct commands, here is where I found the information. zyxel.com/us/en/support/download_library.shtml sorry if I have made this more confusing.Donald– Donald2014年04月04日 03:29:18 +00:00Commented Apr 4, 2014 at 3:29
You must log in to answer this question.
Explore related questions
See similar questions with these tags.