Socket Server for link between multiple XBee Wifi modules and offsite server
eagletalontim
Posts: 1,399
Well, I just powered up my first Spinneret for the first time and have it connected to my router.... I have downloaded the SPIN socket server (Familiar language) I found from other posts and have my router configured to forward all requests from port 236 to port 8080. So far, this works great. I can open the PST and see the request come through. Now...
How do I do something with the request? If I plan on having this server communicate with the web, how to I send data to an off site server via the GET (Query string) or POST?
Can I also run a separate program along with the Spinneret Server? I am hoping to be able to run my Power Logger in the Spinneret and have it communicate with my off site server to store data for viewing via the Web.
How do I do something with the request? If I plan on having this server communicate with the web, how to I send data to an off site server via the GET (Query string) or POST?
Can I also run a separate program along with the Spinneret Server? I am hoping to be able to run my Power Logger in the Spinneret and have it communicate with my off site server to store data for viewing via the Web.
Comments
EDIT ***
I think I figured out the issue with it dying. Seems the browser I was using would send multiple header requests to the spinneret and the last request would open the connection but no bytes would be sent causing it to hang here :
I have stopped accessing it directly and wrote a PHP socket client script on my offsite server to send and receive messages from the Spinneret. http://www.techboneyard.com/home-stuff/ is the URL. It seems to work quite nicely. I can send text and the Spinneret will send it back which is what will display on the page Working little by little!
I still don't know how to Send data to a URL without a socket. Any help on this please?
I would really like to stick with SPIN so I don't have to worry about trying to learn a language and learn how to get this working all at the same time. So far, I have seen 0 results and it almost appears no one is using the Spinneret anymore Did I just waste $50?
I have the server working here : http://75.64.192.5/
You can see what happens when the output should be headers, but it just prints it to the screen : http://75.64.192.5/index.htm
Then, I have a PHP script that talks to the socket here : http://www.techboneyard.com/home-stuff/
That script just sends text to the socket and the socket returns what it was sent. That works great. Problem is, I want to initiate data to my server without having to open a browser and create a socket connection. If there were some way I could simply call an off site URL maybe with a simple Function :
So basically, my goal is to have a socket server connection available for projects to communicate to it via Xbee Wifi modules. (This seems to be working by using the PHP script to talk to the server)
Next step is to have the spinneret call my off site server every X minutes via a specified URL with a dynamic query string and return some data to acknowledge it received it. (Lost here....)
If I can get that far, I am sure I can progress much more on my own.
Can a Spinneret call a URL like this http://www.example.com/example.php without the request being initiating through a browser?
For example, the spinneret is connected to my home network, 1 minute has passed and the spinneret needs to dump the calculated data to my off site web server but there is no computer communicating with the spinneret and the off site server does NOT have a socket server running. Can the Spinneret send the data or am I wasting my time?
EDIT * My IP has changed.
It is now http://69.247.180.219/
OR http://69.247.180.219/index.htm
And the PHP script can still be accessed here : http://www.techboneyard.com/home-stuff/
If you can open a socket to a server
then you can open one to an HTTP server
and send a GET url
the HTTP server is a socket server + handler for the HTTP protocol.
In Tachyon for example you can just take the EASYMAIL code and change it to connect to a Webserver.
Then send the request.
The SPIN / SPINNERET code should be able to do this as well.
At least the W5100 provides all that is needed.
Then for the Sending to the server :
I have tried to copy the SNTP send and recieve code and modify it to work with my server. Still not working. This thread has over 800 views and no one seems to be able to help I only have 2 more days left on my vacation and I REALLY need to get this working within this time frame.
Will someone PLEASE help me get this one thing accomplished..... Send data to a specified offsite URL without using the help of a browser?
Now.... How to strip the headers sent back?
Returns........
How can I pull only the "Received : testing" from the output? I have tried using the StringMethod function and it just hangs the entire program. Have to reboot it each time or null out that line.