Following my previous question (viewtopic.php?f=24&t=2033&p=19873#p19873 (http://dangerousprototypes.com/forum/viewtopic.php?f=24&t=2033&p=19873#p19873)), I am wondering if I can actually make any logical programming at all.
Or, thos rephrase that - what is the "webserver" capable of? Does it just serve stati HTML pages (presumably also wiith CSS)? It appears that there is no PHP interpreter.
Is there any other way of programming some CGI? For instance if the user requsts htpp:// (http://htpp://)<wbplatform>/info?product=X can I some react differently based on the value of X?
You seem to be missing the big picture still. You are dealing with an 80MHz/40MIPS microcontroller with limited memory and no operating system. This is not a fully-fledged, multi-gigahertz microprocessor-based computer with an operating system and oodles of memory. There is therefore no drop-in PHP interpreter or SQL database.
Of course you can do logical programming... you just have to write the C/asm code yourself and incorporate it into the stack's cooperative multitasking architecture without exhausting the available memory (especially RAM).
As for CGI programming, have you not looked at the Microchip stack demos? For a fairly complex example, check out the vending machine demo, but there are simpler ones.
The microchip tcp/ip webserver supports both get and post arguments through a user supplied callback function, so yes. If you implement that other behaviour through this function.
The demo pages has a form that let you turn less on and off.
But I assume you want to serve up a totally different page with that request. It could be done, somewhat ugly, with a huge variable substitution.
Have you considered a Beagle Board or similar? They are 3-4x more expensive that the Web Platform, but provides a robust embedded system that can (I think) run Linux with php, SQL, etc.
[quote author="Trev"]Of course you can do logical programming... you just have to write the C/asm code yourself and incorporate it into the stack's cooperative multitasking architecture without exhausting the available memory (especially RAM).
As for CGI programming, have you not looked at the Microchip stack demos? For a fairly complex example, check out the vending machine demo, but there are simpler ones.[/quote]
Thanks, Trev, I've just got excited about having a new toy. Of course, if I want Apache/Php/MySqlite I'll get an embedded Linux board. I just wanted to see how far I can push this one. I will go look at the Microchip docs as you suggest. I appreciate the feedback
[quote author="honken"]The microchip tcp/ip webserver supports both get and post arguments through a user supplied callback function, so yes. If you implement that other behaviour through this function.
[/quote]
Whoo hoo! Great news. Thanks. I'm to read the friendly manual right now! I appreaciate the help
[quote author="ian"]Have you considered a Beagle Board or similar? They are 3-4x more expensive that the Web Platform, but provides a robust embedded system that can (I think) run Linux with php, SQL, etc.[/quote]
Yes, I am looking at few options on cheap board and trying to balance out what can be down for how much, so that I can have a range of options.
Thanks for your help
You can also consider a second-hand NSLU2 device. It has a 266MHz ARM CPU, 32MB RAM, 2 USB ports, UART, a few GPIO pins, and you can easily get I2C, and a few other things :) It shouldn't be more than $50.
or a much much better seagate dockstar (than the NSLU2)! It has a 1GHz ARM CPU in it and rocks! :) (I am using these for some stuff around here... Webhosting, NAS, Webcamserver)
Thanks for the tip :) I might upgrade my old NSLU2 one day.. although it does its job just fine.