• AVR Freaks

Hot!Harmony TCP Client Demo not working

Author
bubshowlett
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2008/07/11 02:34:26
  • Location: 0
  • Status: offline
2019/03/14 03:01:31 (permalink)
0

Harmony TCP Client Demo not working

Hi,
 
I'm having issues with getting the TCP Client demo working with the PIC32 Ethernet Starter Kit 2 and harmony 2.04 & 2.06,
1. I can build / deploy correctly
2. I can ping the board correctly
3. The Discovery App finds the board correctly 
3. I can connect the terminal and see the stack is started, has IP address etc and then asks for a url.
4. When I provide http://google.com the board locks and when debugging it appears to be crashing around the
     SYS_CMD_READ() function.
5. I have tried hard coding 8.8.8.8 into the ip address and get to the TCPIP_TCP_Client_Open() but no socket is ever
    connected and again the board locks (The locking here is strange as the stack should just keep trying to connect)
 
Wireshark shows no traffic coming from the board for 4 and 5.
 
As an extra test I ran the TCP Server demo and using Packet Sender the first string you send is returned with the case changed, however after this the board appears to lock at "Server Sending xxxx" and the following is required to obtain a new connection.
a. in terminal keep sending a single char / Packet Sender keep sending packets
b. after about a couple of minutes the terminal will show 'Connection was closed'
c. the board will now respond, but the above needs to be repeated each time
 
Do you think the kit is damaged?
Or a LAN network issue?
 
Thanks Shaun
#1

6 Replies Related Threads

    rainad
    Moderator
    • Total Posts : 1220
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: Harmony TCP Client Demo not working 2019/03/15 06:55:39 (permalink)
    0
    It's possible the issue that you're seeing is related to the console. What kind of comm channel you use, serial or USB?
    Usually the serial one is more reliable. Just as you bring up the application, without giving commands to the TCP client, the board keeps running fine, i.e. you can ping and discover it for ever?
    What about simple console commands like: netinfo, macinfo, do these work?
     
    #2
    yts
    Super Member
    • Total Posts : 598
    • Reward points : 0
    • Joined: 2005/09/06 17:45:30
    • Status: offline
    Re: Harmony TCP Client Demo not working 2019/03/15 17:59:58 (permalink)
    0
    I had to set “Default Gateway” and “Primary DNS” properly in Harmony Configurator as seen in an attached figure. Both parameters can be checked on PC.

    Attached Image(s)

    #3
    bubshowlett
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2008/07/11 02:34:26
    • Location: 0
    • Status: offline
    Re: Harmony TCP Client Demo not working 2019/03/18 09:15:16 (permalink)
    0
    I had noticed the Starter Kit was damaged and I have just bought a new kit, this has resolved some of the issues.
     
    yts, I have checked the settings for the gateway / DNS and both are correct, also DHCP is working as the default harmony IP address of 192.168.0.115 is being updated to 192.168.0.21 when checked.
     
     
    TCP Server with harmony 2.04 = works
    USB Console commands = netinfo & macinfo lock the board   
     
    TCP Client with harmony 2.04 = fails as follows,
    1. Program the Kit
    2. Open Discoverer, Kit is listed with IP Address etc.
    3. Ping the Kit and have 0% lost packs
    4. Open terminal and send a char to start transfer, data coming back is stack started etc.
    5. Send http://www.google.co.uk in terminal 
    6. Yellow LED on RJ45 is solid lit, board is not listed in Discoverer, ping times out
     
    I have just commented out all the DNS stuff, hard coded a IPV4_ADDR of 8.8.8.8 and called TCIP_TCP_ClientOpen() this returns valid, but the stack never sends anything (Wireshark) and just loops around the if(!TCPIP_TCP_IsConnected(appData.socket))
     
    I can still ping the board and see this in Wireshark, however the stack never tries to open a socket in fact it appears the stack only does something when requested externally. (Ping / Discoverer)
     
    TCIP_TCP_ClientOpen() just provides a handle and doesn't actually open anything, where would I need to trace through to see why the request is not happening?
    #4
    yts
    Super Member
    • Total Posts : 598
    • Reward points : 0
    • Joined: 2005/09/06 17:45:30
    • Status: offline
    Re: Harmony TCP Client Demo not working 2019/03/18 16:49:00 (permalink)
    0
    I can reach the web-server http://www.google.co.uk by my homemade PIC board as seen in the attached figure.
    The firmwear is "tcpip_tcp_client".

    Do you keep enough Heap Size (44960)?
    post edited by yts - 2019/03/18 17:02:21

    Attached Image(s)

    #5
    BillP
    Super Member
    • Total Posts : 332
    • Reward points : 0
    • Joined: 2014/09/28 07:53:35
    • Location: CA
    • Status: offline
    Re: Harmony TCP Client Demo not working 2019/03/19 11:08:20 (permalink)
    0
    I found a similar problem with the Ethernet Starter Kit 2 when I tried to use the USB CDC library and TCP/IP stack at the same time.  Each worked fine individually, but not together.  After a lot of trial-and-error, I found that a change to system_config.h allowed both the USB and TCP/IP libraries to work together.  Of course, your application may have different settings and configuration, so this is not a guarantee, but try it and post the results.
     
    Change the following defines in system_config.h to:
    #define SYS_PORT_H_ANSEL    0x0040
    #define SYS_PORT_J_ANSEL     0x0000
     
    #6
    bubshowlett
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2008/07/11 02:34:26
    • Location: 0
    • Status: offline
    Re: Harmony TCP Client Demo not working 2019/03/20 02:13:26 (permalink)
    0
    yts, thanks for the picture of your terminal.
     
    I have always used the [link=mailto:Br@y++]Br@y++[/link] Terminal program as its nice and light weight, however I noticed you are using tera-term. I decided to try this and the whole thing leaped into life, It would appear the CDC console is crashing due to the way Terminal is sending the data.
    Anyway thanks for all you help, on to the next stage now.
    #7
    Jump to:
    © 2019 APG vNext Commercial Version 4.5