[Contest Entry] Multi-Socket Server
Mike G
Posts: 2,702
This is my [url=[Contest Entry] Home (garage) automation logger ]original entry[/url]. At that time, I was less knowledgeable then I am now. When I set off to build my project, the existing demo code did not work well for me. So I decided to make a multi-socket server to handle concurrent socket requests. Well, that took me a long time to build. Once I worked out the bugs, I started goofing around with other stuff like sending a binary to the Spinneret and programming a second Propeller, sending email, and HTTP file upload.
Long story short, I did not automate my garage rather I built a Multi-Socket web server. There is no way that I'll be able to write up everything the web server does by by next Sunday. So here is my in progress documentation. Everything is running off the Spinneret.
http://spinneret.servebeer.com:5000/
Reviewers... this is my project submittal. I plan to add more How-To pages this week. Anyway, everything will be on the Spinneret.
EDIT: still need to check spelling and grammar.
Long story short, I did not automate my garage rather I built a Multi-Socket web server. There is no way that I'll be able to write up everything the web server does by by next Sunday. So here is my in progress documentation. Everything is running off the Spinneret.
http://spinneret.servebeer.com:5000/
Reviewers... this is my project submittal. I plan to add more How-To pages this week. Anyway, everything will be on the Spinneret.
EDIT: still need to check spelling and grammar.
Comments
your tutorial is really great, nice job!
I look forward to see more and cannot wait to see the REST of it (no pun intended).
Hope to read the client tutorial soon
How would i run this on my spinneret at home? Is there an archive that rolls it all up nicely?
These are archives stored on the Spinneret SD Card as I build the tutorial. Please be aware that the file locations might change in the future.
LED Example
Begining Examples
http://spinneret.servebeer.com:5000/index.htm
All source files can also be found in the Google repository.
http://code.google.com/p/spinneret-web-server/source/browse/#svn%2Ftrunk%2FMultiSocketServer_MikeG
I setup a web camera so you can interact with the Spinneret.
http://www.agaverobotics.com/spinneret/controlpanel.htm
Open a new browser window and resize the windows so you can see both the video stream and the new browser window.
Feel free to issue the LED services.
Turn on LED connected to PIN 24
http://spinneret.servebeer.com:5000/led/24/on
Turn off the LED connected to PIN 24
http://spinneret.servebeer.com:5000/led/24/off
Available LED pins, 23, 24, 25, 26 , 27.
You can also request the current Spinneret time.
http://spinneret.servebeer.com:5000/xmltime
This project consists
* Motorola phone charger
* 2G SanDisk SD Card
* Servo extension cable
* Cat 5 cable
* Prop Plug
* A lot of coding
I wish I had more time... Didn't get to UDP.
This has been an awesome learning experience.
I'd like to use your server with the SPI driver, can you give it a try if it is working with that setting?
Thanks!
The indirect driver is taking too much pins...
this is problematic if the SPI driver is not working,
I would expect a drop-in replacement for the indirect driver.
Are you wanting for someone to valid the SPI driver before you build your board? Do you have one of those WizNet boards and can valid SPI driver functionality on your own?
If someone could do it I would be very pleased, I don't have any WIZNET module, I would hope that my board works the first time with SPI.
All I want to know is if someone can run your code but by replacing the indirect by the spi driver.
Also, I have left all the indirect addressing pins floating, but I can't validate if this is okay.
Data 0-7,WR,RD,INT,CS floating
Addr 0-1 to ground
How/ where are you setting the time on the RTC?
http://www.agaverobotics.com/spinneret/datetime.aspx
Beau's SNTP object is a better method.
http://forums.parallax.com/showthread.php?129435-DEMO-Using-SNTP-to-sync-the-Spinneret-s-on-board-RTC
CON
DAT
OBJ
Methods added to HTTPServer.spin
Added a filter to the Dispatcher
Invoking the http://spinneret.servebeer.com:5000/getsntp service will cause the Spinneret to update the RTC. Resetting the Spinnneret also sets the RTC.
I kinda doubt you want to create a DAT file. Unless you have a procedure to compile the DAT file.
Now you have the ability to index into the tables. All that's left, is sending the data. There are many ways to get the data to the Spinneret. You could send the entire table in a POST or one value at a time.
A RESTfull approach the URL might look like Set the on-time table, column 3, row 3, with value 100 Get the on-time table, column 3, row 3
In your HTTPServer DAT section, what's the use for the remoteIP var?
http://spinneret.servebeer.com:5000/gstart/setup.htm
This IP address is agaverobotics.com which contains several supporting web pages for the client tutorials.
You can use any IP you like.