Harmony TCP/IP Stack problem with PIC32

Author
Shishi
Super Member
  • Total Posts : 357
  • Reward points : 0
  • Joined: 2016/06/15 05:34:10
  • Location: 0
  • Status: offline
2018/12/06 02:10:12 (permalink)
0

Harmony TCP/IP Stack problem with PIC32

Hi every one
i am using pic32mz2048efm144 with harmony v2.06, i have problem with TCP/IP.
i use tcp/ip socket for wifi and Ethernet . if i remain connect for along time with one of them, it seems tcp/ip closes the connection and i can not connect any more . for example: i connected Ethernet (Encj28) yesterday afternoon and did ping ,remained connect tile this morning(about 16 hours), this morning i did ping again it pings, 1 hour later i tried again ping does not replied.
is there any one that can help me?or maybe give me some advise how can i check if connection is down and in this case restart tcpip or putting up the connection?????
#1

2 Replies Related Threads

    NKurzman
    A Guy on the Net
    • Total Posts : 16664
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Harmony TCP/IP Stack problem with PIC32 2018/12/06 07:31:58 (permalink)
    0
    Is the tcp stack running out of memory?
    Can you use the harmony debug console on your board?
    Did you look through the forum for discussions of similar issues?
    #2
    Shishi
    Super Member
    • Total Posts : 357
    • Reward points : 0
    • Joined: 2016/06/15 05:34:10
    • Location: 0
    • Status: offline
    Re: Harmony TCP/IP Stack problem with PIC32 2018/12/06 08:21:19 (permalink)
    0
    NKurzman
    Is the tcp stack running out of memory?
    Can you use the harmony debug console on your board?
    Did you look through the forum for discussions of similar issues?

    i tried to write alot but no body answers me. how it will go to out of memory? what should i check it?this is my tcpip config:

     
    /*** TCP Configuration ***/
     
    // *****************************************************************************
    // *****************************************************************************
    // Section: TCPIP Stack Configuration
    // *****************************************************************************
    // *****************************************************************************
    #define TCPIP_STACK_USE_IPV4
    #define TCPIP_STACK_USE_TCP
    #define TCPIP_STACK_USE_UDP
     
    #define TCPIP_STACK_TICK_RATE 5
    #define TCPIP_STACK_SECURE_PORT_ENTRIES 10
     
    #define TCPIP_STACK_ALIAS_INTERFACE_SUPPORT false
     
    #define TCPIP_PACKET_LOG_ENABLE 0
     
    /* TCP/IP stack event notification */
    #define TCPIP_STACK_USE_EVENT_NOTIFICATION
    #define TCPIP_STACK_USER_NOTIFICATION false
    #define TCPIP_STACK_DOWN_OPERATION true
    #define TCPIP_STACK_IF_UP_DOWN_OPERATION true
    #define TCPIP_STACK_MAC_DOWN_OPERATION true
    #define TCPIP_STACK_INTERFACE_CHANGE_SIGNALING false
    #define TCPIP_STACK_CONFIGURATION_SAVE_RESTORE true
    /*** TCPIP Heap Configuration ***/
     
    #define TCPIP_STACK_USE_INTERNAL_HEAP
    #define TCPIP_STACK_DRAM_SIZE 39250
    #define TCPIP_STACK_DRAM_RUN_LIMIT 2048
     
    #define TCPIP_STACK_MALLOC_FUNC malloc
     
    #define TCPIP_STACK_CALLOC_FUNC calloc
     
    #define TCPIP_STACK_FREE_FUNC free
     

    #define TCPIP_STACK_DRAM_DEBUG_ENABLE
     
    #define TCPIP_STACK_HEAP_USE_FLAGS TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED
     
    #define TCPIP_STACK_HEAP_USAGE_CONFIG TCPIP_STACK_HEAP_USE_DEFAULT
     
    #define TCPIP_STACK_SUPPORTED_HEAPS 1
     
    /*** ARP Configuration ***/
    #define TCPIP_ARP_CACHE_ENTRIES 5
    #define TCPIP_ARP_CACHE_DELETE_OLD true
    #define TCPIP_ARP_CACHE_SOLVED_ENTRY_TMO 1200
    #define TCPIP_ARP_CACHE_PENDING_ENTRY_TMO 60
    #define TCPIP_ARP_CACHE_PENDING_RETRY_TMO 2
    #define TCPIP_ARP_CACHE_PERMANENT_QUOTA 50
    #define TCPIP_ARP_CACHE_PURGE_THRESHOLD 75
    #define TCPIP_ARP_CACHE_PURGE_QUANTA 1
    #define TCPIP_ARP_CACHE_ENTRY_RETRIES 3
    #define TCPIP_ARP_GRATUITOUS_PROBE_COUNT 1
    #define TCPIP_ARP_TASK_PROCESS_RATE 2
    #define TCPIP_ARP_PRIMARY_CACHE_ONLY true
     

    /*** DNS Client Configuration ***/
    #define TCPIP_STACK_USE_DNS
    #define TCPIP_DNS_CLIENT_SERVER_TMO 60
    #define TCPIP_DNS_CLIENT_TASK_PROCESS_RATE 200
    #define TCPIP_DNS_CLIENT_CACHE_ENTRIES 5
    #define TCPIP_DNS_CLIENT_CACHE_ENTRY_TMO 0
    #define TCPIP_DNS_CLIENT_CACHE_PER_IPV4_ADDRESS 5
    #define TCPIP_DNS_CLIENT_CACHE_PER_IPV6_ADDRESS 1
    #define TCPIP_DNS_CLIENT_ADDRESS_TYPE IP_ADDRESS_TYPE_IPV4
    #define TCPIP_DNS_CLIENT_CACHE_DEFAULT_TTL_VAL 1200
    #define TCPIP_DNS_CLIENT_CACHE_UNSOLVED_ENTRY_TMO 10
    #define TCPIP_DNS_CLIENT_LOOKUP_RETRY_TMO 5
    #define TCPIP_DNS_CLIENT_MAX_HOSTNAME_LEN 32
    #define TCPIP_DNS_CLIENT_MAX_SELECT_INTERFACES 4
    #define TCPIP_DNS_CLIENT_DELETE_OLD_ENTRIES true
    #define TCPIP_DNS_CLIENT_USER_NOTIFICATION false
     
     
     
    /*** HTTP Configuration ***/
    #define TCPIP_STACK_USE_HTTP_SERVER
    #define TCPIP_HTTP_MAX_HEADER_LEN 15
    #define TCPIP_HTTP_CACHE_LEN "600"
    #define TCPIP_HTTP_TIMEOUT 45
    #define TCPIP_HTTP_MAX_CONNECTIONS 4
    #define TCPIP_HTTP_DEFAULT_FILE "testconf.htm"
    #define TCPIP_HTTPS_DEFAULT_FILE "testconf.htm"
    #define TCPIP_HTTP_DEFAULT_LEN 10
    #define TCPIP_HTTP_MAX_DATA_LEN 100
    #define TCPIP_HTTP_MIN_CALLBACK_FREE 16
    #define TCPIP_HTTP_SKT_TX_BUFF_SIZE 0
    #define TCPIP_HTTP_SKT_RX_BUFF_SIZE 0
    #define TCPIP_HTTP_CONFIG_FLAGS 1
    #define TCPIP_HTTP_FILE_UPLOAD_ENABLE
    #define TCPIP_HTTP_FILE_UPLOAD_NAME "mpfsupload"
    #define TCPIP_HTTP_USE_POST
    #define TCPIP_HTTP_USE_COOKIES
    #define TCPIP_HTTP_USE_BASE64_DECODE
    #define TCPIP_HTTP_USE_AUTHENTICATION
    #define TCPIP_HTTP_TASK_RATE 33
    #define TCPIP_HTTP_MALLOC_FUNC 0
    #define TCPIP_HTTP_FREE_FUNC 0
     
    /*** ICMPv4 Server Configuration ***/
    #define TCPIP_STACK_USE_ICMP_SERVER
     
    /*** ICMPv4 Client Configuration ***/
    #define TCPIP_STACK_USE_ICMP_CLIENT
    #define TCPIP_ICMP_CLIENT_USER_NOTIFICATION true
    #define TCPIP_ICMP_ECHO_REQUEST_TIMEOUT 500
    #define TCPIP_ICMP_TASK_TICK_RATE 33
    /*** iperf Configuration ***/
    #define TCPIP_STACK_USE_IPERF
    #define TCPIP_IPERF_TX_BUFFER_SIZE 4096
    #define TCPIP_IPERF_RX_BUFFER_SIZE 4096
    #define TCPIP_IPERF_TX_WAIT_TMO 100
    #define TCPIP_IPERF_TX_QUEUE_LIMIT 2
    #define TCPIP_IPERF_TIMING_ERROR_MARGIN 0
    #define TCPIP_IPERF_MAX_INSTANCES 1
    #define TCPIP_IPERF_TX_BW_LIMIT 1
     

    /*** NBNS Configuration ***/
    #define TCPIP_STACK_USE_NBNS
    #define TCPIP_NBNS_TASK_TICK_RATE 110
     
    #define TCPIP_TCP_MAX_SEG_SIZE_TX 1460
    #define TCPIP_TCP_SOCKET_DEFAULT_TX_SIZE 512
    #define TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE 512
    #define TCPIP_TCP_DYNAMIC_OPTIONS true
    #define TCPIP_TCP_START_TIMEOUT_VAL 1000
    #define TCPIP_TCP_DELAYED_ACK_TIMEOUT 100
    #define TCPIP_TCP_FIN_WAIT_2_TIMEOUT 5000
    #define TCPIP_TCP_KEEP_ALIVE_TIMEOUT 10000
    #define TCPIP_TCP_CLOSE_WAIT_TIMEOUT 0
    #define TCPIP_TCP_MAX_RETRIES 5
    #define TCPIP_TCP_MAX_UNACKED_KEEP_ALIVES 6
    #define TCPIP_TCP_MAX_SYN_RETRIES 2
    #define TCPIP_TCP_AUTO_TRANSMIT_TIMEOUT_VAL 40
    #define TCPIP_TCP_WINDOW_UPDATE_TIMEOUT_VAL 200
    #define TCPIP_TCP_MAX_SOCKETS 10
    #define TCPIP_TCP_TASK_TICK_RATE 5
    #define TCPIP_TCP_MSL_TIMEOUT 0
    #define TCPIP_TCP_QUIET_TIME 0
    #define TCPIP_TCP_COMMANDS false
     

    debug console needs usb connection on the board?or i can see also in debuger console of mplab xide?
    my heap size is 65536.
    post edited by Shishi - 2018/12/06 08:58:48
    #3
    Jump to:
    © 2018 APG vNext Commercial Version 4.5