Hello Everybody,
I'm new in this forum. I have the idea for a little Arduino project and wanted to know if it is even possible to do so.
So, i have this WAN accès box (witch is some kind of router) from my provider in france. Unfortunately in the LAN config page there is no option to configure an activation time slot of the wifi. The idea is to connect a Arduino via the LAN, who connect at a given time to the config page of the box (router) to switch off the wifi.
So is it even possible that a LAN equipment interact with the config page of a router? And if yes, how would you guys do?
Possible? Yes.
Easy? No, mimicking the user interaction over pages made for humans is not an easy task, especially of you don't have some kinda experience in Arduino TCP client, HTML pages and syntax, and how your access point (or whatever it is, I suppose it's a classic modem-router anyway) builds its responses and forms.
This means you need to call the router homepage, then send your credentials as if they've been typed in the login text boxes, wait for the main page, mimick the click over something (link, button, what?) then as soon as you get the Wifi settings page, click to disable it (again, a link, a button, a radiobutton, a selection from a listbox, what?). And everything could be even more dificult if some user interacion is made via Javascript code (a browser executes it, while Arduino can't).
So, I don't think is a good idea.
IDK, but most of the modern routers or access points I have seen let the user set an activity daily timer: what is the exact brand and model of the device your provider gave you?
PS: if it's an access point you could use a simple timer between the power socket and the power cable to turn it off at specific hours of the day...
Thanks for your quick response!
It is a Internet access box delivered from my provider, a french SFR BOX8x. And yes it is truth for some reasons they didn't included this function.
The simple timer is a good idea but it is the "box" it self who provide the WIFI, and we want actually keep the LAN network and the internet access awake in the night.
I have some basic knowledge in Phyton and Arduino language, and for me personally, projects like this makes me learning. On the other hand i have zero experience with Arduino TCP and Html but i learn fast.
Could you maybe point me to some good tutos?
I checked if there is java script on the settings page with the my browsers "Inspector", i think there isn't because the first line of all pages is: Am i right?
Thank you!
Ok, you mean "the box provides Internet connection", not only wifi, so you can't power it off because it's your main device (a single box integrating a modem, a router, a firewall, a LAN switch, and Wifi Access Point).
If you want to automatically/programatically switch WiFi off and on, I'm sorry to say we can't help you much: you need to investigate on how your specific box responds to queries (starting from authentication phase), understand how to get to the WiFi settings page, and then activate or deactivate it and logout. They're probably some POST (on the authentication form) and GETs (to "click" over the menu options), but if you want to do that you should start reading some information around for those concepts, have a look to some similar example HTTP client applications (start HERE, for example), and make tests, unless you reach your goal.
PS: But let me honestly say I still wonder why you need to power Wifi off. If you're worried about electromagnetic fields, some technical and physics considerations should be made:
what you should keep in mind first is its power decreases with the square of the distance (so the power at 10 m distance is 1/100th of the one at 1 m)
walls decrease the received power, especially for 5 GHz Wifi networks
WiFi access points are strictly regulated by EU to not exceed 100mW (20dBm), and that's 1/30th of the maximum power of your cell phone!
they also have an "Eco mode" mode often, meaning the box automatically keeps WiFi transmitting power low when not transferring data
So, unless you have your router under your bed or on the night table (and I hope not), it's safe to keep Wifi on, especially if it's located on another room of your apartment.
And if you are really worried by EM fields, if you sleep with your cell phone on the night table, you should be more worried by that, than your WiFi...
Ok, nothing to say.... You are certainly right, will show this to my roommates.
Thanks for the link, it seems to be exactly for what I'm looking (looked) for.
So even if i don't start the project i learned already a lot in my two hour reading about HTTP interaction.
Will see if my idea leaves me alone with the context you gave me or if i have to do it just for fun and learning purposes.
Thank you a lot for the time you have took to help me!
I will certainly come back with other strange ideas.