Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: hcubed on July 19, 2011, 07:13:01 am

Title: Dynamic Variable Trouble
Post by: hcubed on July 19, 2011, 07:13:01 am
Hi Guys,
I'm new to the web platform and have been messing around with some of the programs that come with the web platform package. I have successfully got the EEPROM web server working. However, the dynamic variables don't seem to work. If I use the provided hex file "dp-wp-stackdemo.v0b.hex" then the Microchip website correctly appears and the dynamic variables work (~builddate~ for example). But if I compile my own TCP IP Demo App using the provided code and add ~builddate~ to the simple "Hello World" web page, it returns "!DEF".

Any ideas why this might be? My procedure has been to edit the HTML file to add a dynamic variable, run the convert-WebPages-to-MPFS.bat, recompile TCP IP Demo App, load the hex file, and then upload the fresh .bin. Am I doing something wrong? I've noticed somewhere that HTTPPrint.h is supposed to be automatically generated by the MPFS file but it doesn't seem the be generated when I run the .bat file. Not sure if this is the problem...

Thanks.
Title: Re: Dynamic Variable Trouble
Post by: ian on July 19, 2011, 02:27:00 pm
Hi hcubed,

What version of the Microchip TCP/IP stack are you using? Are you using it in combination with our custom source, or just the hardware profile? There were a couple things in the latest TCPIP stack that threw things out of whack. That could be related.
Title: Re: Dynamic Variable Trouble
Post by: dpropicweb on July 19, 2011, 11:07:56 pm
See http://dangerousprototypes.com/docs/SD_ ... erver_demo (http://dangerousprototypes.com/docs/SD_card_web_server_demo) in relation to dynamic variables. Hopefully that will solve your issue.
Title: Re: Dynamic Variable Trouble
Post by: hcubed on July 21, 2011, 03:08:08 am
Thanks for the replies. I'm using version 5.31 with the custom source. I've added CustomHTTPApp.c and HTTPPrint.h to get the web server to work. I tried to follow the SD Card Server dynamic variable section, but convert-WebPages-to-MPFS.bat does not seem to generate DynRcrd.bin, FileRcrd.bin, or HTTPPrint.h...it does rebuild DP-MPFSImg2.bin though.
Title: Re: Dynamic Variable Trouble
Post by: hcubed on July 21, 2011, 03:39:57 am
Well I got it to work. There was an HTTPPrint.idx in the target directory that was preventing HTTPPrint.h from generating. Now the dynamic variables are working. Thanks!
Title: Re: Dynamic Variable Trouble
Post by: dpropicweb on July 21, 2011, 04:13:33 am
Good to hear it worked out.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00912067032session_write_close ( )...(null):0
20.00942198624ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00952199400Database_MySQL->query( ).../DatabaseHandler.php:119
40.05262338136Database_MySQL->error( ).../Db-mysql.class.php:273