Can I reset the TCP/IP Stack?

Page: 12 > Showing page 1 of 2
Author
justintanner
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2009/03/04 11:17:01
  • Location: 0
  • Status: offline
2009/03/04 11:22:09 (permalink)
0

Can I reset the TCP/IP Stack?

Is there a way to reset the Microchip TCP/IP stack, without reseting my entire board with asm("RESET")?

I'm using version 4.55 of the Microchip TCP/IP stack.
#1

24 Replies Related Threads

    O.Henry
    Super Member
    • Total Posts : 725
    • Reward points : 0
    • Joined: 2006/03/11 01:37:35
    • Location: Da moon!
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/04 15:52:16 (permalink)
    0
    No.
     
    Why do you want to do this?
    #2
    justintanner
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2009/03/04 11:17:01
    • Location: 0
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/04 16:11:32 (permalink)
    0
    O.Henry

    The TCP/IP stack often dies ( aka goes into an unusable state ) and needs to be reset frequently. In fact in the Microchip code, the stack will reset it self if it see any SPI errors ( which happens quite frequently )
    #3
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/04 16:19:54 (permalink)
    0
    I think you need to figure out what the root problems are with your system.  The TCP stack should not need to be restarted.  If the spi is halting your system, it's because the device you are talking to is not working properly.
    #4
    justintanner
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2009/03/04 11:17:01
    • Location: 0
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/04 16:33:02 (permalink)
    0
    jmag99:

    The Microchip TCP stack resets it self, becuase it knows this can happen here is the code:

    // Validate the data returned from the ENC28J60. Random data corruption,
    // such as if a single SPI bit error occurs while communicating or a
    // momentary power glitch could cause this to occur in rare circumstances.
    if(header.NextPacketPointer > RXSTOP || ((BYTE_VAL*)(&header.NextPacketPointer))->bits.b0 ||
    header.StatusVector.bits.Zero ||
    header.StatusVector.bits.CRCError ||
    header.StatusVector.bits.ByteCount > 1518u ||
    !header.StatusVector.bits.ReceiveOk)
    {
    Reset();
    }

    #5
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/04 19:31:59 (permalink)
    0
    This should not happen under normal circumstances. If this is happening often in your system, I think there is some other problem. I have never experienced this problem.
    #6
    Andy123
    Super Member
    • Total Posts : 492
    • Reward points : 0
    • Joined: 2005/04/25 14:20:54
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/05 07:39:17 (permalink)
    0
    Unrequested Reset should not happen under normal conditions, so you should look why it happens.
     
    But I found problem in 4.51 and 4.55 that is you do need to execute reset(), it causes unexpected actions due to DelayMS code changes.
    see post: http://www.microchip.com/forums/tm.aspx?m=405888
    #7
    justintanner
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2009/03/04 11:17:01
    • Location: 0
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/05 11:06:00 (permalink)
    0
    I'm stress testing the TCP/IP stack,

    Seeing if It can handle constant TCP messages ( every 4ms ), without needing to reset.

    Verdict: It can't handle it, it needs to reset.

    I should also say that this stack is free and uses about 2300 bytes of memory which are both excellent.


    #8
    O.Henry
    Super Member
    • Total Posts : 725
    • Reward points : 0
    • Joined: 2006/03/11 01:37:35
    • Location: Da moon!
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/05 13:33:25 (permalink)
    0
    It can handle way better than what you are experiencing.  I have a board on my desk connected to our corporate Ethernet that has been running stack 4.50 for many months continuously now without needing to be reset.
     
    You most likely have a hardware issue.  Do you have resistors on your SI, SCK, and CS pins between the ENC28J60 and PIC?  This has been discussed previously on the forum if you search back several months or years.  You should place approximately 100 ohm resistors in series with each of these signals if you are experiencing the reset trap issue in ENC28J60.c.
    #9
    justintanner
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2009/03/04 11:17:01
    • Location: 0
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/05 15:04:24 (permalink)
    0
    O.Henry:

    We have 180 Ohm resistors all the SPI pins.
    #10
    Andy123
    Super Member
    • Total Posts : 492
    • Reward points : 0
    • Joined: 2005/04/25 14:20:54
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/05 19:18:53 (permalink)
    0
    O.Henry:
    Don't take me wrong, I don't really want to steer discussion in a wrong direction:
    I am sure that justintanner needs to find what causes stack to reset

    But  if you have working 18F device with 4.5x stack compiled with C18,
    then can you excute Reset() let say by pressing a button (or by some other controlled event)
    to see if stack comes back without any problems, please.

    In my case as long as I have DelayMs() device keeps rebooting right after the delay. 
    post edited by Andy123 - 2009/03/05 19:23:42
    #11
    manali.mandal92
    Starting Member
    • Total Posts : 62
    • Reward points : 0
    • Joined: 2008/12/10 22:12:42
    • Location: India:Pune
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/06 02:28:02 (permalink)
    0
    ORIGINAL: O.Henry

    I have a board on my desk connected to our corporate Ethernet that has been running stack 4.50 for many months continuously now without needing to be reset.



    post edited by manali.mandal92 - 2009/03/06 02:40:41
    #12
    manali.mandal92
    Starting Member
    • Total Posts : 62
    • Reward points : 0
    • Joined: 2008/12/10 22:12:42
    • Location: India:Pune
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/06 02:31:52 (permalink)
    0
    ORIGINAL: O.Henry

    I have a board on my desk connected to our corporate Ethernet that has been running stack 4.50 for many months continuously now without needing to be reset.



    hi O.Henry,

    I too have a board on my desk but i m not able to connect to our corporate Ethernet which is running stack 4.55(i apologise for creating humour over here). Im running HTTP2server on pic18f97j60.i m able to connect it with my PC through ethernet cable but it is not getting connected in office network. what cud be the prob with this...I m luking forward to ur suggestions..

    thanks,
     
    kind regards,
    Manali

    i wish life had a scroll back buffer
    #13
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/06 05:43:10 (permalink)
    0
    Manali,

    It could be many things. Firewalls, port forwarding rules etc... Can you describe your network setup?
    #14
    manali.mandal92
    Starting Member
    • Total Posts : 62
    • Reward points : 0
    • Joined: 2008/12/10 22:12:42
    • Location: India:Pune
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/06 21:30:45 (permalink)
    0
    hi jmag,
     
    I came across with another thing y'day....when I use
    the hostname instead of IP address to ping the device i got the reply from
    the remote device n I m getting the exact
    webpage.I have no clue where's the problem exactly coz while trying to ping through the
    IP address once it got connected but during the nxt try the device ws unreachable.
    PIC board side network setting is like following..
    using 100mbps ethernet in a office network.
    IP=192.168.1.100
    netmast=255.255.255.0
    gateway=192.168.1.1

    i wish life had a scroll back buffer
    #15
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/07 06:09:01 (permalink)
    0
    What kind of router is it?  Those settings look correct to me.

    Did you mean that you can access the webpage by hostname but not by IP?
    #16
    manali.mandal92
    Starting Member
    • Total Posts : 62
    • Reward points : 0
    • Joined: 2008/12/10 22:12:42
    • Location: India:Pune
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/10 05:38:39 (permalink)
    0
    its D-LINK ADSL2+router
     
    yes,I m not able to access it with the IP address but I can access it with hostname.

    i wish life had a scroll back buffer
    #17
    manali.mandal92
    Starting Member
    • Total Posts : 62
    • Reward points : 0
    • Joined: 2008/12/10 22:12:42
    • Location: India:Pune
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/10 05:43:23 (permalink)
    0
    hi,
     
    Can nybody have any clue wat does this error means and where it came from??
     
    MPLINK 4.20, Linker
    Copyright (c) 2008 Microchip Technology Inc.
    Error - section '.stringtable' can not fit the section. Section '.stringtable' length=0x00000acd
    Errors    : 1
     
    I thought i would have due to some memory model configuration but i was wrong I have checked the configurations and it seems to me all correct.the configurations are like following...
     
    code model:large
    data model:large
    stack model:single link

    Kind regards,
     
    Manali

    i wish life had a scroll back buffer
    #18
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/10 05:45:08 (permalink)
    0
    Have you modified the linker for that section?
    #19
    manali.mandal92
    Starting Member
    • Total Posts : 62
    • Reward points : 0
    • Joined: 2008/12/10 22:12:42
    • Location: India:Pune
    • Status: offline
    RE: Can I reset the TCP/IP Stack? 2009/03/10 05:48:32 (permalink)
    0
    no i did nothing with linker...all i did is added one web page.... in HTTPCustomApp.c

    i wish life had a scroll back buffer
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2017 APG vNext Commercial Version 4.5