Is the following possible?
I want an Arduino + W5100 shield to be a simple server... not WEB server, that is to say I don't expect the "fancy" bits... I JUST want....
A device that will sit on the LAN and watch for incoming attempts from clients to "connect".
Once the ("socket"? is that the right term?) channel between server (the Arduino) and client is in place, if the client sends JUST two bytes ($BB $83 would be PERFECT) to the server, it should respond with just a string of bytes. For the sake of arguement, it would be nice if it responded with the following. (The following may be trivial, but I mention it just in case.)
$BB $82 $01 $01 $FF $FF
Note: The second $FF is an end of record marker, but $FF can also occur in the line.
Furthermore, the line can also be...
$BB $82 $02 $01 $FF $02 $00 $FF
As you see,that's a different length, but the third byte in the string tells you how long it should be.
(End of possibly trivial bit)
I have a Windows program which will do Good Things as a client if such a server is present... so if you feel like having a play with the code to accomplish the above, the software to test your efforts exists. It is TCP002.exe in the zip file you can download from
http://sheepdogguides.com/zips/TCP001.zip
$50 to a reputable US or UK charity if someone who is at least "two star" in this forum says he has the finished code done, and working with TCP002. That contribution payable to the charity BEFORE you deliver the code to me, copyright free. (You propose the charity. I decide if it is "reputable"... I WILL give to "Save The Children", if we can't agree on another closer to your heart. Someone who would know once told me that their field workers tend to stay in more modest hotels than the one's sometimes used by those of other NGOs.)
Failing anyone interested in actually writing the code... can anyone give an encouraging "It shouldn't be a big deal" answer?
Oh! Ideally, the code should allow multiple concurrent connections to the server, but if that's going to be a Big Pain, then, as long as I know the problem exists, it is acceptable if the server can only handle one connection at at time, and subsequent petitioners just find that they can't connect. (If they could somehow be TOLD "the line is busy" (vs the server is down), that would be good... but I suspect that a connection ("socket"?) would be needed to say "no connection possible"... Catch-22? A simple failure (by the server) to respond to an attempt to connect by a client is adequate, if not wonderful.
Thanks for considering!!