Shop OBEX P1 Docs P2 Docs Learn Events
Testing Spinneret Web Server outside of my home network — Parallax Forums

Testing Spinneret Web Server outside of my home network

Beau SchwabeBeau Schwabe Posts: 6,557
edited 2013-01-31 18:21 in Accessories
Anyone care to test this Spinneret Web Server? ...See it with Web-cam feedback

http://24.253.241.231:5555/

... works internally within the home network, but I wanted to make sure it could be seen on the Web as well.

Thanks!

Code available here:
Spinneret Web Server Demo v1.0

Spinneret Web Server Demo v1.1 <- Simple JavaScript Test (Implementing a Counter)

Spinneret Web Server Demo v1.2<- Simple JavaScript Test (Implementing Graphics)
«1

Comments

  • seulaterseulater Posts: 2
    edited 2010-12-30 23:04
    Yup it works
  • Ding-BattyDing-Batty Posts: 301
    edited 2010-12-31 08:04
    Works for me too -- I was listed as visitor number 5.
  • Mike GMike G Posts: 2,702
    edited 2010-12-31 08:24
    I was able to hit it.

    You are visitor number: 0024
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-12-31 08:25
    I was visitor 22.
    Looks okay on Safari Version 5.0.3.
  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-12-31 08:41
    With Chrome clicking on the link brings up a blank tab. Clicking on refresh brought up the text.

    John Abshier
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2010-12-31 09:19
    Thanks everyone for helping me test.

    I removed the :5555 requirement I previously had...

    http://24.253.241.231/

    had to add 5555 requirement back

    http://24.253.241.231:5555/
  • Mike GMike G Posts: 2,702
    edited 2010-12-31 13:41
    The request timed out. Not sure if you still have the Spinneret up and running though.
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2010-12-31 14:03
    Ok...

    http://24.253.241.231:5555/

    ...should be back up. I was hoping to eliminate the extension.
  • Mike GMike G Posts: 2,702
    edited 2010-12-31 17:08
    I can see it now.

    My ISP, Cox, blocks the standard HTTP port 80. I image your ISP does the same thing. You can get around the port address in the URL by using a proxy(s). On the back end you're still using port 5555 though.

    The same thing goes for client access. You'll need to setup the spinneret on a port other than 80 to hit an external site and see the response. Again you could use a proxy.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-01-01 08:45
    Unable to connect from China. I tried everything but no luck. Proxy server was no help.
  • KMyersKMyers Posts: 433
    edited 2011-01-01 09:39
    Got it today from the mountains of WV using Vista am IE 7. If tat set up worls everyone should!!

    Happy New Year everyone!
  • Mike GMike G Posts: 2,702
    edited 2011-01-01 10:33
    @Humanoido, Beau would have to setup the proxy not you. You need to hit the URL with the port addresses. If it's not working, then you have a routing issue on your end.

    Cool, you added the HTTP request.
    Happy New Year everyone!
    
    
    
    You have connected to PARELECTS Spinneret Web Server ... Next meeting is January 4th, 2011
    
    You are visitor number: 0007
    
    Packet from your browser:
    
    GET / HTTP/1.1 Host: 24.253.241.231:5555 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: http://forums.parallax.com/showthread.php?128385-Testing-Spinneret-Web-Server-outside-of-my-home-network 
    
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2011-01-01 11:49
    Mike G,

    Thanks! ... also have a "Bare Bones" version running that does not use the micro SD card. I'll post something later as far as how I setup the router... <- I am kinda green though, I'm not sure how to properly setup a proxy as you suggest.

    The arrangement that I currently have is a Cable/Modem that obtains a DHCP (24.253.241.231)

    The Cable modem is then connected to a wireless router (Netgear 54 Mbps Wireless Router WGR614v4) with access to 4 direct ports.

    The Spinneret is assigned to a local static IP address of 192.168.0.45 with port forwarding directed to 5555 (<-- This could be 'almost' any number between 1 and 65534)
  • Mike GMike G Posts: 2,702
    edited 2011-01-01 12:08
    Here's my Spinneret
    http://spinneret.servebeer.com:5000/index.htm

    A simple proxy would be to use the parallax domain like
    www.parallax.com/spinneret
    

    When a users hit the Parallax domain above the request is forwarded to your spinneret URL. This can be done through code or your web server. The user never sees the port appended to the URL. However, you still need the port address on the back end because ISPs generally block port 80 traffic. The same kind of thing goes for requesting data as a client. The Spinneret requests a resource but it though a computer on your local network.
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2011-01-01 12:16
    Mike G,

    right, but this is comming from my house, not the parallax domain ... I get a new dynamic DHCP assigned every time I reboot the cable modem, or when my provider decides to do maintenance at 1:00am.
  • Mike GMike G Posts: 2,702
    edited 2011-01-01 12:23
    Thinking about this... I could whip up an application on one of my sites that allows Spinneret user to forward requests to their internal IP and port. That would help folks troubleshoot as their routers will always look outside the internal network for the URL. Then you could better stress test the Spinneret application.
  • Mike GMike G Posts: 2,702
    edited 2011-01-01 12:27
    Beau, I understand that you're in your house. You need another computer to work on your behalf if you want to remove the port from the URL. That proxy will handle all request to the Spinneret located inside your network.

    You can look to a free service like no-ip to monitor the dynamic IP address assigned by your ISP. That's what I'm doing with the address http://spinneret.servebeer.com:5000/index.htm
  • Daniel HarrisDaniel Harris Posts: 207
    edited 2011-01-02 21:03
    Beau,

    It was working for me a bit earlier but it stopped. (While it was working, it looked really good :D) Now, it looks like my browser (Chrome) times out on the request.

    Quick question, is your serving code based on the example web server code for the Spinneret? I.E. Does it only check that the first byte in the request is a "G" and then serve the page if it is? I set up a test Spinneret on my home network and was having what appears to be similar issues. I was just using the example program "Brilldea W5100 Web Page Demo indirect Ver 001". I havent gotten the chance to check it out with WireShark yet, but when the problem showed up, the browser said that an empty response was received from the web server. Have you figured out how to get around that problem?
  • Daniel HarrisDaniel Harris Posts: 207
    edited 2011-01-02 21:04
    oh, it just came back, Im now visitor # 6. I was like 42 earlier.
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2011-01-02 21:54
    Daniel Harris,

    Yes, I am playing around with a few things and I temporarily crashed it.

    It may be off and on for a little bit as I clean it up and test it out further.


    "Brilldea W5100 Web Page Demo indirect Ver 001" <-- Not sure in answer to your question... I'm using the latest version that I could find version 006
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2011-01-02 23:59
    Attached is the code that I am using. Thanks to all that have contributed to the drivers.

    I got started on this over the break... well, towards the end of the break through a robotics club that we have that meets up on Saturday evenings (and sometimes other nights during the week) ... anyway one of the guys there says "here, make this work!" ... that was on the 29th

    So I basically took what was already out there and distilled it into something that we could easily work with.

    If you setup the HTML code correctly the amount of parsing that is required is very little. For example...

    using a <FORM> header the 'ACTION' argument can be used as a unique search, and is always (<--at least for the Spinneret) at the beginning of the packet. Additionally, the 'NAME' argument is the actual value you want to pass from the Web browser into the Spinner and ultimately into SPIN code.

    Example:
    <FORM ACTION='button_action'method='get'>
    <BUTTON TYPE='submit' NAME='P24'><FONT COLOR=RED  >P24</FONT></BUTTON>
    </FORM>"
    

    ... in this case what follows the 'ACTION' argument is 'button_action' but this could be anything you wanted.

    ...What follows the 'NAME' argument is what is sent, following the button press.

    The resulting data packet looks something like this ...
    GET /button_action?P24 .......
    

    ...Where if you look for 'GET /button_action' you are certain that a button was pressed... reading the string further would reveal which button was pressed, and since this information always occurs at the beginning of the data packet, it's easy to determine the correct position to read the data.
  • kf4ixmkf4ixm Posts: 529
    edited 2011-01-03 05:30
    Was able to see it, left my name and toggled a few pins. thanks for sharing Beau!
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2011-01-03 18:40
    Daniel Harris,

    Not until you mentioned it am I seeing something similar. There appears to occasionally be a 'lockup' that requires a Spinneret reboot on this end .... perhaps only checking that the first byte in the request is a "G" as you had mentioned, but I am not sure.

    I can 'see' the red and blue lights on the Spinneret flash when it is in this condition, consistently when I hit refresh from the browser, but the browser appears to be locked. This to me says that the data request is making it's way to the Spinneret, but the software running is waiting for something else to happen.

    Should there be a timeout implemented if the received 'Data Packet' is greater than Zero and isn't cleared upon receiving after a certain amount of time? I don't know
  • Daniel HarrisDaniel Harris Posts: 207
    edited 2011-01-04 10:24
    I just tried accessing your server, Beau, but it is currently unresponsive. I tried pinging your IP and that failed too, but that doesn't mean a whole lot - especially since I don't know if your network is configured to respond to the request. Just a friendly heads up :)
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2011-01-06 20:25
    All,

    With this demo, you need to point to two URL's ... I just set mine up with a split screen. See attached

    URL #1 - Web Cam pointing at the Spinneret
    URL #2 - Spinneret Web Server

    ... Ok, right now you just get some visual feedback lighting some LED's. Ultimately, the idea would be to drive a robot around via a web browser. The camera that I'm using is a 2.4GHz wireless camera, combined with an Xbee that was connected to a 'fixed' Spinneret you would have the freedom to drive about.

    Note: The connections to the Web-Cam are limited to a maximum of 10 users
    1024 x 819 - 88K
  • Ding-BattyDing-Batty Posts: 301
    edited 2011-01-06 20:31
    That was fun!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-06 20:36
    Works for me!

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-01-06 21:23
    ...
    With this demo, you need to point to two URL's ... ....

    This is so COOL!
    It's really an inspiration - the idea I can run things via the internet and see them, too.
    I can't wait until all you smart people have all of this up and running, smooth as silk, so I can glide in and effortlessly get it working, too. I'm looking forward to standing on the shoulders of you giants, you know. :)
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2011-01-06 21:40
    Thanks!

    I'm going to turn in tonight, but I'll leave this running ... hopefully it will stay up. I'm running a test version on the Spinneret that checks for a valid status and performs a 'correction' routine if it becomes out of sync. So if someone wants to 'kick' the Spinneret-Web-Server they can but I won't be around to re-set it if it goes down.
  • bee_manbee_man Posts: 109
    edited 2011-01-07 05:40
    Working perfect! Turned all the LEDs on from Illinois.

    Just might make me want to join the contest. Thanks alot, now I need to find 200 free hours for R&D,
    50-100 more for programming and debugging. Ugh, I think I'll go back to bed.


    Jim
Sign In or Register to comment.