Shop OBEX P1 Docs P2 Docs Learn Events
WIZnet W5200 for Quickstart -- Need more detailed info — Parallax Forums

WIZnet W5200 for Quickstart -- Need more detailed info

DougworldDougworld Posts: 24
edited 2013-08-02 14:22 in Propeller 1
I plugged my new WIZnet W5200 for Quickstart in and ran a couple of demo programs -- WOW! This setup rocks!
And then I saw that the demo code used "XMLHttpRequest()" which is commonly known as Ajax.
So I have to ask: Exactly what does the W5200 do and not-do? It is obviously a server that reads and writes an SD card, and serves up Web pages, including images. It handles style sheets (CSS). But it doesn't support SQL, so database queries are out of the question. Does it support PHP (a server-side scripting language)? If so, which functions (there are thousands)? What XMLHttpRequest's are supported, e.g., will it process "PUT" and "DELETE" or just "GET" and "POST"? So it's a real $50 Web server, as hard as that may be to believe, but where can I find the ground-truth technical specifications? What does it do and not-do? Thanks in advance.
"Another Cool Product...AAA+++"
73, Doug, WD0UG

Comments

  • D.PD.P Posts: 790
    edited 2013-08-01 10:43
    The WizNet W5200 is a 8 socket TCP/IP stack in hardware. All the "brains" for the device are derived from the application/drivers on the propeller chip. There is a complete thread dedicated to the WizNet stuff here.

    http://forums.parallax.com/forumdisplay.php/82-Spinneret-Web-Server

    Hat tip to MIKE G for all the work he did to develope the web server etc for the Spinnerette and WizNet Quickstart boards!!! Spinnerette uses the W5100 (4 socket) and the later uses the W5200 chip
  • Mike GMike G Posts: 2,702
    edited 2013-08-02 04:34
    Dougworld wrote:
    But it doesn't support SQL, so database queries are out of the question
    This is true. There are no native DB drivers. It can be done but space is a concern. If DB I/O is required consider POSTing to server side script on a web server other than the W5200. That's what I do.
    Dougworld wrote:
    Does it support PHP (a server-side scripting language)?
    No, the server side uses SPIN.
    Dougworld wrote:
    If so, which functions (there are thousands)? What XMLHttpRequest's are supported, e.g., will it process "PUT" and "DELETE" or just "GET" and "POST"?
    AJAX runs on the client side. All methods are available. Implementation is up to the programmer.

    The requested resource and dependencies are rendered if the resources exist on the SD card. That means drop an HTML web site on the SD card and away you go. The web server also has a hook to execute custom SPIN code.

    The PRI RenderDynamic(id) method is like an HTTP handler. The method is responsible for rendering dynamic content and executing customer SPIN Objects/Methods. Filters find the request and branch to the custom logic. The filters are completely up to the programmer since the entire HTTP request header is tokenized in memory. The programmer can enumerate all header information.

    The W5200forQsDemo.zip demo code contains client and server code to get started.
    http://code.google.com/p/propeller-w5200-driver/downloads/list

    You'll have to read the source code as documentation is sparse. I hope this answers your questions. Feel free to ask more on the Spinneret forum.
  • DougworldDougworld Posts: 24
    edited 2013-08-02 14:22
    Thanks, and I understand most of that. I need more information on "a hook to execute custom SPIN code" Does that mean that I can run my own processes in the unused cogs? If so, how?
    Appreciate you Mike G.
Sign In or Register to comment.