paul__b
Newbie level 1
I am working with a pic32 ethernet starter kit. I have the TCPIP "Demo App" in microchip solutions v2013-06-15 compiled and working OK but a thing I don't understand is the .cgi file in the demo example.
AN1107 explains the CGI and the %xx string and that has also been referred to on the mchip forum, but the CGI in the example I am looking at does not contain the %xx string.
One discussion mentioned the CGI containing un-important dummy data.
I have found that dynamic variables put in the CGI file are picked up by the MPFS utility and will appear in the auto generated
HTTPPrint.h file, (provided the HTTPPrint.idx file has been deleted before running MPFS utility). However the function call generated
for unused dynamic variables in the CGI file does not seem to serve any purpose and I can delete it in the HTTPPrint.h file and
the server and client still work fine. However the CGI file must exist, must have a filename associated with the server/client GET data link and must have a dynamic variable (that does not need to be used) which gets picked up by the MPFS utility otherwise the client/server GET method does not work. The GET method stops working after I have recompiled and flashed the uP without a .cgi file, even if I dont re-load the web page, so it does not actually seem to be the .cgi file used on the client side that is important, it is a question of how it influences the compiled code.
Apart from the important important file name and important unused dynamic variable the .cgi can contain any rubbish.
It seems that the .cgi is necessary to make the stack aware of the GET method, but I can't find I can't find a consistent explanation anywhere.
Does anyone understand how the microchip .cgi is used (I dont think this has much in connection with the .cgi in a normal
server client system).
I would like to post this on the mchip forum but I can't find how to get a ticket. I asked on an dead thread about cgi but no response.
Anyone know how to get mchip ticket ?
AN1107 explains the CGI and the %xx string and that has also been referred to on the mchip forum, but the CGI in the example I am looking at does not contain the %xx string.
One discussion mentioned the CGI containing un-important dummy data.
I have found that dynamic variables put in the CGI file are picked up by the MPFS utility and will appear in the auto generated
HTTPPrint.h file, (provided the HTTPPrint.idx file has been deleted before running MPFS utility). However the function call generated
for unused dynamic variables in the CGI file does not seem to serve any purpose and I can delete it in the HTTPPrint.h file and
the server and client still work fine. However the CGI file must exist, must have a filename associated with the server/client GET data link and must have a dynamic variable (that does not need to be used) which gets picked up by the MPFS utility otherwise the client/server GET method does not work. The GET method stops working after I have recompiled and flashed the uP without a .cgi file, even if I dont re-load the web page, so it does not actually seem to be the .cgi file used on the client side that is important, it is a question of how it influences the compiled code.
Apart from the important important file name and important unused dynamic variable the .cgi can contain any rubbish.
It seems that the .cgi is necessary to make the stack aware of the GET method, but I can't find I can't find a consistent explanation anywhere.
Does anyone understand how the microchip .cgi is used (I dont think this has much in connection with the .cgi in a normal
server client system).
I would like to post this on the mchip forum but I can't find how to get a ticket. I asked on an dead thread about cgi but no response.
Anyone know how to get mchip ticket ?