+ Reply to Thread
Results 1 to 15 of 15

Thread: Webserver server restart switch

  1. #1

    Default Webserver server restart switch

    Greetings, First posts. i am just curious on actually quite a few things. I just ordered one of these babies and what I want to do is create a hard reset button for my server.

    Occasionally my server locks up or i need to restart it and it does not come back up. This is a major problem because I am running its remotely. So all i can do is a "soft" reset. I have looked at commercial options at their all like 300 bucks. Which i deff don't want to spend. currently what I have in place of this is I hooked up a crappy router to my server. There are the hard reset pins on the motherboard i took those and hooked it up to some random places on the router. By power cycling the router it sends a signal to the reset switch in turn hard resting it.

    Obviously not the most ideal solution and its very annoying to do because i have to another computer to remote into, log into the router webpage and reset it.



    So getting to the solution. I have rummaged around on here and I found source code for a mini webserver its already presetup etc. Really in theory the only thing I need to do it create the webpage I want . do a basic authentication. then have a button that I can press reset and it sends signal to one of the outputs on the spinneret to the motherboard to reset it. hopefully this makes sense so far yes? problem is. I have never programmed one of these in my life. The most ive done is basic pic chips via USB in a class one time. im good at programming webpages not chips.

    so in my head this is possible right?

    Also is there anyone that can help me with this? (when i get the spinneret in about a week )

  2. #2

    Default Re: Webserver server restart switch

    Welcome to the forum davidginn524.

    It's real easy to drive a pin high.

    Tutorial
    http://spinneret.servebeer.com:5000/

    Example
    http://www.agaverobotics.com/spinneret/controlpanel.htm

    Wouldn't a better solution be to figure out why your server is becoming unresponsive?

  3. #3

    Default Re: Webserver server restart switch

    haha you're right, but this is cooler! Sorry maybe I made it to seem like it crashes a lot. Its only crashed 1 time in the past month and sometimes when i restart it , it doesn't get passed my raid card bios's which i still haven't figured out. I have been on tech support with the manufacturer for forever and their complete morons. o well it happens

  4. #4

    Default Re: Webserver server restart switch

    gosh ! these things are freaking SAAAWEETT. I think im going to have to buy a few more of them. Even though i haven't even gotten my first one yet. Ill hook some up to my lights and my fan ultimate laziness. Just need to modify the code a little of BillyChasen 's door unlock one and ill prob even do the door unlock thing also

  5. #5

    Default Re: Webserver server restart switch

    Have you seen the stuff that Tux Graphics did with their (AVR & ENC28J60) board. This monitored, via pings, the life of a connection and if it didn't reply within 6 attempts then a reset was issued, via a relay for two seconds etc. there could be some ideas there for you.

    http://tuxgraphics.org/electronics/2...watchdog.shtml

  6. #6

    Default Re: Webserver server restart switch

    wow sorry for such a late response LIKE 2 MONTHS. well, the I ordered the webserver from DIYbin.com and i pretty much got scammed out of 50 bucks. they don't return calls or email. It still says in processing/awaiting shipment. that was almost 3 months ago. I have not ordered another one since. I will hopefully once I get paid order 1 from a different location.I did have one question on it though. i was looking to buy it and then the website said I needed this http://www.hobbyengineering.com/H4304.html It was my understanding that I could just use the microsd card . Do I have to have the above? or is that more for convenience of not having to unplug and plug the sd card in every time you make a change to the code. Also I wanted to wait to see how much up-time I could have without failure and I went 4 months and 2 days till a power blip or something went wrong because all my drives failed and it started going crazy and shutdown by itself in like 3 min while i was remoted in to it. I will look into the link you provided also Toby
    Last edited by davidginn524; 03-09-2012 at 05:44 PM.

  7. #7

    Default Re: Webserver server restart switch

    Also toby , I saw on the website they have a garage door opener application. couldn't in theory you do the same thing with this? by driving the pin high for a second would be the "on" switch to tell the garage door to open. it would be the same thing as the garage door opener right?

  8. #8

    Default Re: Webserver server restart switch

    ok I FINALLY got my web server. I will be setting it up tonight after much trouble. Anyway the above tutorial about driving a LED high looks fairly simple. The only problem I see is when i go herehttp://www.agaverobotics.com/spinneret/controlpanel.htm#I look at the web server. I see an extra board attached to it. Do I have to have that to do this tutorial? because in the tut. it says i believe pin 23 is the user controlled LED. looked at the documentation there is no pin 23 even though it does list it on part of the documentation. I guess I'm asking for clarification.?!?If I don't have to get the extra board (which I hope I dont have to) how do I go about doing that? Anyone?

  9. #9

    Default Re: Webserver server restart switch

    Quote Originally Posted by Spinneret Web Server Manual Page 3
    User Button and LEDs
    The user button and LEDs share an I/O pin. When the P23 is an input, it is pulled
    low but will read high on button press. When P23 is driven high the user LEDs will
    turn on. When the button is pressed while P23 is an input, the user LEDs may glow
    dimly, so it is recommended to drive the pin low unless actively reading it.
    Spinneret Web Server Manual

  10. #10

    Default Re: Webserver server restart switch

    Thank you
    Yes I saw that in the documentation. But since I do not program chips/hardware for a living I am a little confused on that. Because In the documentation it only has 12 pins on the main connector. I get that you can press the button and it will drive the LED

  11. #11

    Default Re: Webserver server restart switch

    I get that you can press the button and it will drive the LED
    No, a high on pin 23 lights the LED. The user LED is on the Spinneret board next to the status LEDs. See page 3 and 4 in the Spinneret manual.

  12. #12

    Default Re: Webserver server restart switch

    Good morning! I finally got around and setup everything, and I got the led working. Fairly simple and straight forward. What I see in the code was this function PRI LedStatus(state) dira[23]~~ outa[23] := state returnsince it puts the user led high or low. which is on pin 23. I am assuming that if i change the 23 to a pin i want it would set it to high or low? is that correct

  13. #13

    Default Re: Webserver server restart switch

    I am assuming that if i change the 23 to a pin i want it would set it to high or low? is that correct
    Correct. Pin 24, 25, 26, and 27 are available.
    http://www.agaverobotics.com/spinneret/controlpanel.htm

    If you read further into the tutorial you will find you can simply send an HTTP GET with an LED parameter in the URL.

  14. #14

    Default Re: Webserver server restart switch

    Quote Originally Posted by Mike G View Post
    Correct. Pin 24, 25, 26, and 27 are available.http://www.agaverobotics.com/spinneret/controlpanel.htmIf you read further into the tutorial you will find you can simply send an HTTP GET with an LED parameter in the URL.
    Ahha! I finally get it!, Sorry about that. I was reading the diagram wrong. the pins 24 25 etc are on the main Jtag, But I was correlating the numbers (24) to an actual physical pin. Not a pin that is linked to a different number pin Thanks

  15. #15

    Default Re: Webserver server restart switch

    You lost me, pins 24, 25, 26, and 27 are the actual Propeller Pins.

+ Reply to Thread

Similar Threads

  1. Help with single socket HTTP server on Spinneret Web Server
    By JohnR2010 in forum Propeller 1 Multicore Microcontroller
    Replies: 9
    Last Post: 09-02-2011, 11:14 PM
  2. A complete web server in a box - WIB (Web server In a Box) - Silicon Chip Artic
    By Bob Lawrence (VE1RLL) in forum General Discussion
    Replies: 0
    Last Post: 11-30-2009, 08:57 AM
  3. How to restart cog zero?
    By william chan in forum Propeller 1 Multicore Microcontroller
    Replies: 10
    Last Post: 09-16-2008, 08:08 AM
  4. webserver red-i
    By hijker in forum BASIC Stamp
    Replies: 1
    Last Post: 03-17-2005, 01:04 AM
  5. Red-i Webserver
    By Bart in forum BASIC Stamp
    Replies: 5
    Last Post: 03-17-2005, 01:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts