Parallax Wifi Module and the WWW

Hello, in the spirit of Mother's Day, I made a (very)basic webpage reflecting her, and loaded it on my Wifi Module. She sent the URL to my grandmother, and it only worked on OUR Wifi. I am sure that a webpage can be sent to the World Wide Web with Javascript, but I do not know how. Does anybody have any JavaScript syntax to do this?

Comments

  • 26 Comments sorted by Date Added Votes
  • Google search revealed little to nothing on the subject.
  • If you want the page to be visible on the WWW you'll have to setup your router to forward HTTP requests to the local IP address of the WX.
  • ???
    How would one do that? I do not have a router. Could I get another ESP8266 and make it function as a router that would do this?
  • Coder96Coder96 Posts: 42
    edited May 14 Vote Up0Vote Down
    Most likely your ip starts with a 10. or 192.168. these are private ip addresses and they do not exists on the Internet. Right now there is no path for a device out outside of your local network to reach your wx module. This is what you you want 99.99% of the time. Your wx module is connecting to a router.

    Assuming you have a simple network

    Internet<---->Router with Wifi<---->WX module

    You need to make changes on your router. You need to do port forwarding from the outside to the inside. It's normally under NAT section of your router. Some times call virtual servers. You will need to google your router type to find this out. Seems like every manufacture has a different approach.

    Or put you page on a free www service and skip all this.
  • ???
    How would one do that? I do not have a router. Could I get another ESP8266 and make it function as a router that would do this?

    How are you connecting to the Internet? In my case I've got a WiFi enabled router routing around me the addresses of 192.168.1.100 to 192.168.1.124, and it is connected to my service provider's gadget who also supplies my phone service. The router interacts with a DDNS service to make whatever I need it to be allowed to be available. For a while that was how, my website, gregg.levine.name delivered to the rest of you.

    When I switched service providers I switched to making it available from the same cloud based service that's handling our hosts service.

    Depending on your service provider's gadget methods it might be possible to have your device facing it and using a DDNS service to properly enable it. Look up DDNS providers in Google and pick one who can provide what you want for free from there it should be possible.

    Incidentally I strongly suggest that you should get a router, your computer's firewall may be working well for you, but you do need the router for its own methods. Do not buy a NetGear one or a D-Link one, both of those are impossible for what we do, they are nearly impossible to setup properly.
  • So, my Internet Connection is phone-line or fiber-optic, made wireless by a Century-Link modem(or router, I don't really know).
  • AwesomeCronkAwesomeCronk Posts: 316
    edited May 17 Vote Up0Vote Down
    What do you suggest that I do as far a a dedicated router(directing WWW https requests)?
  • Well AwesomeCronk,

    you are diving in uncharted waters.

    Generally your internet-provider does not at all want you to run a Webserver from Home. For that they have way more expensive contracts with a fixed IP-Address and a registered Domain-Name.

    So your provider gives you - mostly daily - a new public IP-Address and you can not register a Domain-name on it, because it is changing constantly.

    Furthermore usually the IPs also block all traffic to port 80 of your current public IP - the standard webserver port. They do not want you to run a Webserver, see above.

    Then they usually install a modem/router for you to access the internet over your dynamic IP, providing you with a internal network with internal IPs out of the 10.x.x.x range or the 192.168.x.x range, known as private internet addresses, not callable over the internet.

    And that modem/router/firewall combination is ALSO set to block all incoming transfer, by standard settings.

    Naturally this is all done to protect your home-connection to the internet from bad people. And to protect you from using your own Internet connection for PROVIDING services instead of using them.

    Except you buy a more expensive commercial contract.

    Or trick them out.

    To do the later you need to do the following steps.

    First you need access to the modem/router/firewall from your provider. That thing sitting in your house.

    Usually you find ip-address, name and password either on that box or in your documents.

    something like

    192.168.1.1 user admin passwort whatever

    Then you need to start your browser and type the ip in, some login screen might appear.

    If lucky you end up in some configuration web-site, but be aware that every model/provider/ region have different boxes, so there are hundreds of different configuration websites.

    So basically you are on your own there and have to scan the menus for port redirection settings.

    You need to configure the internal local IP-address for your WX module and give it a port number- usually on the WX

    And then you have to allow external requests on - say - port 3210 of your external address and redirect them to port 80 of your internal WX address.

    Good luck with that step, google might help.

    Then you finally are able to reach your WX module over another internet connection - your next door friends - on the current external ip address your provider gives you every 24 hours.

    you will need to type in the browser something like http://123.123.123.123:3210/

    where 123.123.123.123 is to replaced with your current external IP address and :3210 is to replaced by the port number you set up in your router.

    If you have done all of that successful it will work, but every 24 hours change the address.

    If you ever get to this point there are solutions like dyndns to solve that last hurdle.

    And you have to remember that all these steps are needed to protect you from the evil internet. If you want to serve websites instead of consuming them.

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • msrobots wrote: »
    Well AwesomeCronk,

    you are diving in uncharted waters.

    Generally your internet-provider does not at all want you to run a Webserver from Home. For that they have way more expensive contracts with a fixed IP-Address and a registered Domain-Name.

    So your provider gives you - mostly daily - a new public IP-Address and you can not register a Domain-name on it, because it is changing constantly.

    Furthermore usually the IPs also block all traffic to port 80 of your current public IP - the standard webserver port. They do not want you to run a Webserver, see above.

    Then they usually install a modem/router for you to access the internet over your dynamic IP, providing you with a internal network with internal IPs out of the 10.x.x.x range or the 192.168.x.x range, known as private internet addresses, not callable over the internet.

    And that modem/router/firewall combination is ALSO set to block all incoming transfer, by standard settings.

    Naturally this is all done to protect your home-connection to the internet from bad people. And to protect you from using your own Internet connection for PROVIDING services instead of using them.

    Except you buy a more expensive commercial contract.

    Or trick them out.

    To do the later you need to do the following steps.

    First you need access to the modem/router/firewall from your provider. That thing sitting in your house.

    Usually you find ip-address, name and password either on that box or in your documents.

    something like

    192.168.1.1 user admin passwort whatever

    Then you need to start your browser and type the ip in, some login screen might appear.

    If lucky you end up in some configuration web-site, but be aware that every model/provider/ region have different boxes, so there are hundreds of different configuration websites.

    So basically you are on your own there and have to scan the menus for port redirection settings.

    You need to configure the internal local IP-address for your WX module and give it a port number- usually on the WX

    And then you have to allow external requests on - say - port 3210 of your external address and redirect them to port 80 of your internal WX address.

    Good luck with that step, google might help.

    Then you finally are able to reach your WX module over another internet connection - your next door friends - on the current external ip address your provider gives you every 24 hours.

    you will need to type in the browser something like http://123.123.123.123:3210/

    where 123.123.123.123 is to replaced with your current external IP address and :3210 is to replaced by the port number you set up in your router.

    If you have done all of that successful it will work, but every 24 hours change the address.

    If you ever get to this point there are solutions like dyndns to solve that last hurdle.

    And you have to remember that all these steps are needed to protect you from the evil internet. If you want to serve websites instead of consuming them.

    Mike

    Hello!
    Mike..... That's exactly how I explained things. I know about Century Link. I certainly hope they are doing good things for you and yours. They have a very low to the ground reputation. Which is just above Comcast and Cox. Oddly enough TWCNY bought Charter to save them from being underground as far as providers goes, that is below that setting. And you don't want Cablevision, they needed to be bought out to prevent them from going out of business badly......

    Anyway both Mike and I have summarized it perfectly. Oddly enough most service providers want people to make use of a router to the Internet connection of the MODEM.. Oddly enough the company that I switched from did not. They just refused to believe that 99% of their customers knew more then they did. However Spectrum just does not mind in my case.

    So if you have any other questions? Please do ask.
  • So, I would have to mess with my mother's Wifi modem? I am trying to do this without touching the modem(I would like to survive). :smile:
  • msrobotsmsrobots Posts: 2,034
    edited May 20 Vote Up0Vote Down
    Yes,

    But all of this is just needed to allow incoming traffic to find your WIFFY module.

    If you have access to one existing webserver/webspace, say you own a domain and can access the files for the domain, you can build some web-pages, and scripts on that external webserver.

    Then use the wify-module to talk to that server to transfer information there and access the information from there.

    The configuration of modem/router/firewall usually just blocks INCOMING connections, OUTGOING connections are usually not blocked.

    So your WIFY module can call out into the internet, but the internet can't call in.

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • What I have gathered from all of this, is that I should just get domain space and use that for WX Wifi communication. Will I still be able to operate the WX if the page is on a domain?
  • All correct, most modem/routers will have a setting to use dydns or others BUT you end up with a name like your.domain.com or so forth. No registration.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 22,007
    edited May 21 Vote Up0Vote Down
    Go to this address:

    http://whatismyip.com

    Do it several days in a row. Contrary to what msrobots says, I'll bet the results stay the same. If they do, you can publish that address as a way to access your device -- at least until your power-off/reset your modem.

    But that's not the end. You'll also have to "punch a hole" in your modem/router's firewall to allow incoming connections. I can't go into that here, but there is plenty of help online for how to do that.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Phil,

    if you would have read the thread you might have noticed that the OP does NOT want to mess with poking a hole somewhere ...
    So, I would have to mess with my mother's Wifi modem? I am trying to do this without touching the modem(I would like to survive). :smile:

    So whatsmyip and dyndns does not cut it for him.

    Enjoy

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • I got that. But I'm assuming that "mess with" and "configure" can refer to two different activities, the latter being less intrusive.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Anything referring to an alteration in settings, configuration or firewall settings applies. :smile:
  • If the modem is "just" a modem, it's possible that no setting changes will be necessary. If it includes a router, though, you're probably out of luck if you can't reconfigure it.

    I only say this from my own experience. My cable modem lets anything through in both directions. So I've interposed a Linux computer between it and my home network. I configured the Linux firewall to be quite restrictive, but I was able to code some exceptions for external access to some IoT experiments.

    So if the modem does not include a router, and if it lets everything through, buy a cheap router to put between the modem and your equipment. Then you can configure that without touching the modem itself.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Alright! I'll have to look into that!
    I believe, however, that my Modem is both. My mother says that the firewall on it is designed to prevent anyone from accessing our network without a passphrase.
  • My mother says that the firewall on it is designed to prevent anyone from accessing our network without a passphrase.
    You're probably out of luck, then. You can always set up an external website, but I know that defeats the purpose of your project.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Shucks.
    So I will have to wait until I have my own network, then?
  • If you had an external website, you could still program your device to upload and update your HTML to it via FTP. No changes would have to be made to your modem/router, since all transmission initiations are outgoing, not incoming. It's not as cool, perhaps, as serving directly from your device, but it would still illustrate your and your device's capabilities.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Hey, you might be on to something, there!
  • @Phil Pilgrim (PhiPi)
    I have decided to go with your idea. I am exrtemely inexperienced with HTML, so I tried a google search, which revealed nothing. I tried W3 Schools, which I could not make any sense of. Do you know of any source that explains how to request info from another webpage?
  • Are you wanting your device to request info from an external site, or to upload a file to it? I was suggesting the latter, in which case you will want to learn about the FTP protocol:

    https://www.wired.com/2010/02/ftp_for_beginners/

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Thanks. I was think of having an external site receive info from the user, and then have my Wifi Module request info from it.
    Uploading a file, having the site edit the file based on input, and then having my module request the updated file also works.
Sign In or Register to comment.