Author Topic: Modifications to TCP/IP stack  (Read 10106 times)

Administrator

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
    • http://www.modtronix.com
Modifications to TCP/IP stack
« on: August 11, 2004, 05:05:29 PM »
Hi Everyone

I anyone has made modifications to the Microchip TCP/IP stack, can they please be so kind and share it with the rest of us on this forum.

Thanks,
David
« Last Edit: November 15, 2011, 05:04:01 PM by modtro2 »
*** Modtronix Engineering Support ***

imxo

  • Full Member
  • ***
  • Posts: 13
    • View Profile
Modifications to TCP/IP stack
« Reply #1 on: November 29, 2004, 03:01:13 AM »
Has anybody done it already? Or is there any significant performance issue on current standard Microchip TCPIP stack?  Really like to hear any comment in this regard.  Thanks.   :wink:
imxo - I'm eXtra Old, well... sort of  ^O^

Jean-Marc DELPRAT

  • Sr. Member
  • ****
  • Posts: 35
    • View Profile
What i'm using the microchip stack for :
« Reply #2 on: January 20, 2005, 02:09:28 AM »
hello,

This is a good question. this could give some ideas to people wondering if the MCP stack is suitable for some particular application....

May be Forum members could list in this topic what they have made ? (if it not a secret of course!!!)

As for myself, first application was a kind of "printer data logger" to be connected to my Home alarm in place of the printer, it can log up to 5 lines (5 events) and i can visualise those 5 events on a small web page i can access from anywhere (even from my GSM phone)

The software can also send me an email if an event occurs (i mean if a new line is received) I had to wrote an SMTP client to do so. I the mail i can read the 5 last lines of text.

Also a few remote controls are available.

jm

PS i have other projects such as a garden watering system with web interface and also a weather station, with nice graphic display....  just ideas for now !

Frank

  • Guest
Some of use are just users, help appreciated.
« Reply #3 on: March 28, 2005, 01:39:26 AM »
Lots of Elektor readers like me are into Visual Basic, Soldering Irons, Web page creation and control of hardware via web pages. We may not yet be into PICs and c coding at code level. I was attracted by the chance to use this board as as a fairly "high level" tool to control hardware projects from the web.

We would VERY much appreciate the chance to see what others have done by way of applications - copy/modify is much the easiest way to be introduced to a new technology.

Many thanks

rkra

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
    • http://users.skynet.be/reinhard.krakow
Modifications to TCP/IP stack
« Reply #4 on: May 02, 2005, 04:05:35 AM »
Hi every body,

Take a look at http://forum.microchip.com/tm.asp?m=78628.
This is an easy change you can make on the original TCP/IP stack 2.20 from Microchip. This change allows you to manage over 200 variables in your web site (%a, %b, ….%A, %B, ….,%0, %1, …., %ι, %θ, %ω, ….).

B.R.

Reinhard Krakow

michele.bossi

  • Newbie
  • *
  • Posts: 4
    • View Profile
manage over 200 variable in web pages
« Reply #5 on: May 16, 2005, 10:51:21 PM »
Hi  Reinhard Krakow,
I have a bad news, your link display a strange sql error message ...

Have you saved code change to share it with the rest of us on this forum.

Thanks,
 Michele :(

rkra

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
    • http://users.skynet.be/reinhard.krakow
Modifications to TCP/IP stack
« Reply #6 on: May 17, 2005, 09:06:30 AM »
hi,

Is there a place where I can put the modified Microchip TCP/IP stack software (in the forum?).
On my web site, it is not possible right now.
Try again my web site: http://users.skynet.be/reinhard.krakow/

B.R.

Reinhard Krakow

rkra

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
    • http://users.skynet.be/reinhard.krakow
Modifications to TCP/IP stack
« Reply #7 on: May 17, 2005, 09:10:32 AM »
Hi,

The Microchip link is http://forum.microchip.com/tm.asp?m=78628

B.R.

Reinhard Krakow

rkra

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
    • http://users.skynet.be/reinhard.krakow
Modifications to TCP/IP stack
« Reply #8 on: May 17, 2005, 10:00:41 AM »
This is what I post on Microchip forum:
Hi everybody,

As you probably know, it is not possible to use more than 10 variable names in the TCP/IP stack. You can make some modification in the file ‘http.c’.
In the ‘static BOOL SendFile(HTTP_INFO* ph)’ function change this:
…………….
Code: [Select]

    if ( ph->bProcess ) {
      switch(ph->smHTTPGet) {
      case SM_HTTP_GET_READ:
        if ( c == HTTP_VAR_ESC_CHAR )
          //ph->smHTTPGet = SM_HTTP_GET_DLE;  //Reinhard Krakow 2005-02-23
          ph->smHTTPGet = SM_HTTP_GET_HANDLE;  //Reinhard Krakow 2005-02-23
        else
          lbTransmit = TRUE;
        break;

      //case SM_HTTP_GET_DLE:  //Reinhard Krakow 2005-02-23
      //    if ( c == HTTP_VAR_ESC_CHAR )  //Reinhard Krakow 2005-02-23
      //    {  //Reinhard Krakow 2005-02-23
      //        lbTransmit = TRUE;  //Reinhard Krakow 2005-02-23
      //        ph->smHTTPGet = SM_HTTP_GET_READ;  //Reinhard Krakow 2005-02-23
      //    }  //Reinhard Krakow 2005-02-23
      //    else  //Reinhard Krakow 2005-02-23
      //    {  //Reinhard Krakow 2005-02-23
      //        ph->Variable = (c - '0') << 4;  //Reinhard Krakow 2005-02-23
      //        ph->smHTTPGet = SM_HTTP_GET_HANDLE;  //Reinhard Krakow 2005-02-23
      //    }  //Reinhard Krakow 2005-02-23
      //    break;  //Reinhard Krakow 2005-02-23

      case SM_HTTP_GET_HANDLE:
        //ph->Variable |= (c - '0');  //Reinhard Krakow 2005-02-23
        ph->Variable = c;  //Reinhard Krakow 2005-02-23

        ph->smHTTPGet = SM_HTTP_GET_VAR;
        ph->VarRef = HTTP_START_OF_VAR;

        break;

…………….

With this modification, you can use in your web site the variable name % followed by one character, like: %0, %1….%9, %A, %B, ……, %Z, %a, %b, …., %z, %ι, %ΰ, …
Normally, you use any printable character except control character, http reserved character and the % character. You can now use more than 200 different variables.

Example:
………
%I,%J,%K
<input type=submit name=I value=RH0>
<input type=submit name=J value=RH1>
<input type=submit name=K value=RH2>
…………….

In the ‘webserver.c’ file, you have to define the variable like this:
……………
#define VAR_DIGOUT_RH0 'I'
#define VAR_DIGOUT_RH1 'J'
#define VAR_DIGOUT_RH2 'K'
……………

B.R.

Reinhard Krakow

Anonymous

  • Guest
Modifications to TCP/IP stack
« Reply #9 on: May 20, 2005, 05:19:55 AM »
Our TCP/IP stack delived with the SBC65EC already has a modification allowing many more variables. The HTTP Server can dynamically alter pages and substitute real-time information, such as input/output status. To incorporate this real-time information, the corresponding CGI file (*.cgi) must contain a text string ‘%nxx’, where the ‘%’ character serves as a control code, the 'n' character represents the variable group and ‘xx’ represents a two-digit variable value ( in uper case hex format). The variable value has a range of 00-FF (Which translates to 0-255 decimal), and must use upper case characters! The variable group ('n' character) can be any alpha numeric character ('0-9', 'a-z', 'A-Z'), giving a total of 10+26+26 = 62 groups. Each group can have 256 variable values. This gives a total of 15872 possible variables. For details, download source code at www.modtronix.com/products/sbc65ec