Testing, Testing, 1 2 4...

Discussion in 'Off-Topic' started by BillO, Feb 3, 2013.

  1. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    Okay folks,

    I am in the middle of building a new web based controller for a water pump based on an ATmega328. Actually, it could be used to control anything. The whole web server and logic runs on the MCU and currently takes about 8K of code compiled (from Arduino C). I have set up a test platform of the basic server to see how robust it is. This version does not allow data entry, nor is it hooked up to a pump, but just has some buttons to send simple commands. This is the interface I need to be robust, so I have temporarily opened it up to the web.

    The IP addrress is 10.37.116.30 and will be active for a few hours if anyone is interested in trying it out.

    There is no malicious code on my MCU there, so it will be safe.

    If you do try it out, please do it for only a few clicks or so (maybe a dozen or thereabouts) and let me know what part of the world you accessed it from.

    When I'm done with the test, I'll update this thread as to the status.

    Thanks!:)
     
    Last edited: Feb 3, 2013
  2. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    I get this error after several seconds of waiting, with FF.
    Capture.PNG

    Timeout on Chrome.
     
  3. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Same here...
     
  4. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    Thanks guy's. No sure what's happening, but can you try to enter just the IP address (10.37.116.30) into your browser?

    Strange that you see a <div> tag error Geo. There are no <div> tags in the HTML code.:confused:
     
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,015
    I simply get a timeout in Firefox.
     
  6. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    The 10.0.0.0 address space is private. You'll need to configure your router/firewall to forward incoming port 80 traffic to that address behind your firewall.

    You can Find your IPs here.
     
  7. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    Ahh, just realized, this is a private subnet. I can see out, but only others served by my ISP will see in .

    Oh well. Thanks for trying guy's. I contact some locals to give it a go.
     
  8. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    Unfortunately I've no control of the ISP's router. My own router is properly configured to go between their10.*.*.* to my 192.68.1.*, but that's not going to get far.

    Just checked their web site and it would cost me more than $300 a month for a visible IP address.

    :(
     
  9. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Ouch. $300/month just for a static IP? It's $15 here (just for IP block), but not the same provider, or country.
     
  10. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    Really? I'm jealous. Maybe I could get them to just do domain forwarding. My IP address within their private subnet never changes. I'll give them a call tomorrow. Surely a domain name and forwarding service can't cost too much.
     
  11. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    Looks like I could get a VPN based static IP from a US company for about $20 a month, but would go directly to a single server. I am pretty sure I would not be able to access local assets.
     
  12. jaygatsby

    New Member

    Nov 23, 2011
    185
    23
    Log in to your wifi router and look around. There's probably something that will put this IP address outside for you... port forwarding on 80/8080. 10.* are internally routable addresses for local use. But again many wifi routers can fake it for you.
     
  13. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    A possibility might be to get a web site and hosting package. Mine costs around £40 a year. You can then have a page which the micro can send data to and then the web page can then broadcast the information. If the micro needs data input from humans interacting with the web page I think it has to essentially keep refreshing the page which maybe isn't ideal. To your ISP it just looks like a web browser.
    I've actually got part of the web server code needed which you can have a look at, make changes to, and try on my site if you want.
    I wouldn't want the actual page name to be public information so I'd have to PM you the address if you want me to set it up.
    Details are here, but I took the web page down:
    http://forum.allaboutcircuits.com/showthread.php?t=71204
     
    BillO likes this.
  14. nerdegutta

    Moderator

    Dec 15, 2009
    2,517
    785
    BillO likes this.
  15. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    It's the ISP that has the 10.*.*.* subnet. When my router get's an IP, it get's a 10.*.*.* from my ISP. Means nothing to the rest of the world and I have no way of getting to the ISP's router to route a real world IP to that 10.*.*.* address I get.
     
  16. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    Hi Mark,

    Yes, that makes sense. I'd be interested in the code for the web page. It won't properly test my UI for the Arduino, but It may be of other use.

    I tried your demo and it seems to work. Are two separate pages required?
     
  17. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    I'll look into that, thanks for the lead.


    Edit:
    Okay, just had a look at the free version. Like all the other dynamic DNS services, it sees my IP address as 204.16.103.??? wich is not the IP of my router. It's the IP of a MikroTik router admin interface. Probably belong to my ISP.
     
    Last edited: Feb 7, 2013
  18. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    All the code is on the thread I linked to. It's very simple, I just did it as a proof of concept a while ago. It could all be done on one page, and you can add buttons, passwords, really anything that an average web page can do.
    It's written in Python, but other languages are available depending on what is installed on your providers web server.
     
    BillO likes this.
  19. BillO

    Thread Starter Well-Known Member

    Nov 24, 2008
    985
    136
    Thanks Mark!
     
  20. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    This thread has given me inspiration to learn a bit more on CGI scripting. The page now looks like this:
    [​IMG]
    Anything put in the text box is saved in the text file when "send data" button is pressed. Pressing the on or off buttons also gets saved in the file.
    It's all on one page now.
    For controlling the water pump for example, the on and off buttons would be on the web page for you to control it and the pump would check the page periodically to see if it needs to do anything. The input box (could be hidden or on another page) could be for the pump to send data back to the page to display.
    If you want to test it Bill, increment the number in the name of the input page name.
     
Loading...