Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: selfservice on February 19, 2012, 01:02:14 pm

Title: Microchip TCP/IP stack modification proposal
Post by: selfservice on February 19, 2012, 01:02:14 pm
Hi guys, i'm developing very hard with your WebPlatform and i feel very comfortable with it! Great Product!

Actually i run in a problem with microchip stack that maybe can interest other users: I'm doing a board that collects some values from the real world and send it via http to our server (php page that save the values in the db). In the microchip stack there wasn't the HTTP client so i write my own that send via POST a file from the EEPROM. But the problem was that i was supposed to replace the ~variable~ string with the real value but the microchip's HTTPPrint() function only works with their HTTP2 server.

So i changed it to pass the socket where we need to put our infos:
in HTTPClient.h: from
Code: [Select]
void HTTPPrint(DWORD callbackID);
to
Code: [Select]
void HTTPPrint(TCP_SOCKET skt, DWORD callbackID);
in HTTP2.c line 964: from
Code: [Select]
HTTPPrint(curHTTP.callbackID);[
to
Code: [Select]
HTTPPrint(sktHTTP, curHTTP.callbackID);
in the HTTPPrint_* functions i passed the TCP_SOCKET skt variable.
In this way we can use the HTTPPrint function in our code!

The main problem is that MPFS utility overwrite the HTTPClient.h file everytime a new image is created, so i was wondering about modifying this utility to add this trick.
Is there any source code of that application?
Anybody can teach me to make a patch file (i never made one)

Bye
Stefano
Title: Re: Microchip TCP/IP stack modification proposal
Post by: ian on February 20, 2012, 12:10:35 am
Hi Stefano,

As far as I know the source for the MPFS utility should be in the Microchip Application Library download. It sounds like you check though and it isn't there. I'm srry, 'm not sure where else to get it. Maybe a request on microchips forum would turn up some help.

( ! ) 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.00982055336session_write_close ( )...(null):0
20.01012186928ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01012187704Database_MySQL->query( ).../DatabaseHandler.php:119
40.05432326440Database_MySQL->error( ).../Db-mysql.class.php:273