Hot!PIC32 Ethernet Starter kit II Demo App

Author
Sasa1983
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2017/10/25 07:22:57
  • Location: 0
  • Status: offline
2018/01/03 05:05:29 (permalink)
0

PIC32 Ethernet Starter kit II Demo App

Hello to all,
 
I' m using for the first time the TCP/IP Stack  from MAL, and I want to use the example "DEMO APP"  in TCPIP folder and so I want to use the web page in order to command this kit. But it does not work!!! Infact I don't find this hardware with ping operation or with TCPIP Discover tool:
So I want to ask us the following questions:
1) Which  files should I modify for examples configuration pins or generic pins?
2) How should I set up the connection of the pic32 to a router with a RJ45 cable ?
 
Any suggestions?
Thanks us in advice,
 
Sasà1983
#1

15 Replies Related Threads

    maxruben
    Super Member
    • Total Posts : 3285
    • Reward points : 0
    • Joined: 2011/02/22 03:35:11
    • Location: Sweden
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/04 04:17:43 (permalink)
    0
    1) Are you compiling the demo app or are you programming it with a pre built hex file?
    2) If you are going to access the starter kit from a computer in the same sub net (also connected to the same router), you should not need to do anything but connecting the RJ45 cable between the router and the starter kit.
     
    Is there a blinking LED on the board?
     
    You should be able to log on to the router and check if the starter kit is connected.
     
    /Ruben
    #2
    Sasa1983
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2017/10/25 07:22:57
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/04 04:30:11 (permalink)
    0
    Hi Ruben,
     
    I can compile the code and I see a blinking led......I' m not able to find the starter kit with ping operation.....so the questions are the following:
     
    1) How should I configure the IP address, DNS, and default gateway of router and of starter kit? Please, should you give me an example? 
     
    2) How should I modify the HWP_ETH_SK_ETH795.h file in order to have the correct behaviour? May I modify some pin?
     
    thank you again for your reply,
     
    Sasà1983
    #3
    RISC
    Super Member
    • Total Posts : 5272
    • Reward points : 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/04 07:23:35 (permalink)
    0
    Hi,
    Do you use MLA from june 2013 ?
    There is a document describing the demo setup :
    c:\microchip_solutions_v2013-06-15\Microchip\Help\TCPIP stack help.xxx
    Regards
     
    #4
    maxruben
    Super Member
    • Total Posts : 3285
    • Reward points : 0
    • Joined: 2011/02/22 03:35:11
    • Location: Sweden
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/06 06:12:54 (permalink)
    0
    Sasa1983
    1) How should I configure the IP address, DNS, and default gateway of router and of starter kit? Please, should you give me an example? 

    If you enable the DHCP client, you don't need to do anything as long as your router is a DHCP server (they all are unless DHCP is explicitly switched off).
    Then you should be able to log on to your router through its web interface and check weather the starter kit is connected or not (has got an IP address).
     
    Sasa1983 
    2) How should I modify the HWP_ETH_SK_ETH795.h file in order to have the correct behaviour? May I modify some pin?

    I have never used the ESK II but apparently the difference between I and II is the PHY chips used. DP83848 for I and LAN8740 for II. This means that you have to change the phy driver which isn't very hard but can be difficult if you don't know the details of the demo app. You can use the driver for LAN8420.
    Check this post: http://www.microchip.com/forums/FindPost/898391
     
    Or you can move to a harmony project which should already have a working demo app with the ESK II board
     
    /Ruben
    #5
    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/06 17:15:49 (permalink)
    0
    The OP may be mistakenly thinking a "switch" is a "router" ...
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #6
    Sasa1983
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2017/10/25 07:22:57
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/15 05:04:20 (permalink)
    0
    Hi guys,
    thank you again for your support but it does not work!!!!!!
    Maybe something for me is still hidden....  sad: sad
     
    However I may explain what I have done......
     
    I use the MLA version2013_06_15 in order to run the DEMO App Code on ESK II.I link it to my laptop (OS Windows 10).
    As suggested in this post( http://www.microchip.com/forums/FindPost/898391), I modified the TCPIP ETH795.h as following:
    #define MY_DEFAULT_HOST_NAME "MCHPBOARD"
    #define MY_DEFAULT_MAC_BYTE1 (0x00) // Use the default of 00-04-A3-00-00-00
    #define MY_DEFAULT_MAC_BYTE2 (0x04) // if using an ENCX24J600, MRF24WB0M, or
    #define MY_DEFAULT_MAC_BYTE3 (0xA3) // PIC32MX6XX/7XX internal Ethernet
    #define MY_DEFAULT_MAC_BYTE4 (0x00) // controller and wish to use the
    #define MY_DEFAULT_MAC_BYTE5 (0x00) // internal factory programmed MAC
    #define MY_DEFAULT_MAC_BYTE6 (0x00) // address instead.
    #define MY_DEFAULT_IP_ADDR_BYTE1 (192ul)
    #define MY_DEFAULT_IP_ADDR_BYTE2 (168ul)
    #define MY_DEFAULT_IP_ADDR_BYTE3 (1ul)
    #define MY_DEFAULT_IP_ADDR_BYTE4 (110ul)
    #define MY_DEFAULT_MASK_BYTE1 (255ul)
    #define MY_DEFAULT_MASK_BYTE2 (255ul)
    #define MY_DEFAULT_MASK_BYTE3 (255ul)
    #define MY_DEFAULT_MASK_BYTE4 (0ul)
    #define MY_DEFAULT_GATE_BYTE1 (192ul)
    #define MY_DEFAULT_GATE_BYTE2 (168ul)
    #define MY_DEFAULT_GATE_BYTE3 (1ul)
    #define MY_DEFAULT_GATE_BYTE4 (110ul)
    #define MY_DEFAULT_PRIMARY_DNS_BYTE1 (8ul)
    #define MY_DEFAULT_PRIMARY_DNS_BYTE2 (8ul)
    #define MY_DEFAULT_PRIMARY_DNS_BYTE3 (8ul)
    #define MY_DEFAULT_PRIMARY_DNS_BYTE4 (8ul)
    #define MY_DEFAULT_SECONDARY_DNS_BYTE1 (8ul)
    #define MY_DEFAULT_SECONDARY_DNS_BYTE2 (8ul)
    #define MY_DEFAULT_SECONDARY_DNS_BYTE3 (4ul)
    #define MY_DEFAULT_SECONDARY_DNS_BYTE4 (4ul)
     
    then I modified the HWP_PIC32_ETH_SK_ETH795.h as following:
    #if defined(THIS_IS_STACK_APPLICATION)
    #pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FWDTEN = OFF, FPBDIV = DIV_1, POSCMOD = XT, FNOSC = PRIPLL, CP = OFF
    #pragma config FMIIEN = OFF, FETHIO = ON // external PHY in RMII/alternate configuration
    #endif
    // External National PHY configuration
    #define PHY_RMII // external PHY runs in RMII mode
    //#define PHY_CONFIG_ALTERNATE // alternate configuration used Modifica 15/01/2018
    #define PHY_ADDRESS 0x0 // the address of the National DP83848 PHY Modifica 15/01/2018
     
     I have used the ETHPIC32ExtPhySMSC8720.c instead of ETHPIC32ExtPhyDP83848.c but when I upload the code.
    The compilation does not give errors and I upload the code.
    Then I modify the paramter of ethernet port in this way:
     
    IP address :192.168.1.100
    Gateway:255.255.255.0
    Predefined gateway :192.168.1.110
     
    Primary DNS:8.8.8.8
    Secondary DSN:8.8.4.4
     
    On the board, I see an orange and red blinking, but not the yellow (it 's not blinking but it is on)
    I don't find the board with TCPIP discoverer tool.
     
    May someone support me?????
    Any suggestions?????
     
    Thanks again,
     
     
     
    #7
    maxruben
    Super Member
    • Total Posts : 3285
    • Reward points : 0
    • Joined: 2011/02/22 03:35:11
    • Location: Sweden
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/15 11:14:54 (permalink)
    0
    Go through the initialization of the TCP/IP stack line by line (skip delays) with a debugger to check that everything is working as expected.
     
    /Ruben
    #8
    RISC
    Super Member
    • Total Posts : 5272
    • Reward points : 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/15 17:22:42 (permalink)
    0
    Hi, 
    MLA is 5 years old and not supported since then. The Xc32 compiler has no more plib and they must be added 
    You should rather use Harmony which has demos for your starter kit 
    Regards
     
    #9
    Sasa1983
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2017/10/25 07:22:57
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/16 03:26:58 (permalink)
    0
    Hi,
     
    Maybe may I set up NRST high of LAN8740 device?
    #10
    Sasa1983
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2017/10/25 07:22:57
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/01/16 06:44:46 (permalink)
    0
     
    I saw this document..I hope it will be useful for all that have my same troubles:
    http://ww1.microchip.com/downloads/en/DeviceDoc/70005189A.pdf....
     
    #11
    purna k
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2018/04/16 06:14:52
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/04/19 21:43:57 (permalink)
    0
    Dear sasa1983,
    Are you able to open the web page with the Ethernet starter kit2 board.
     
    Thank you
    #12
    Sasa1983
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2017/10/25 07:22:57
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/07/11 00:48:17 (permalink)
    0
    Hi to all,
     
    I would like to inform you that I switched to Harmony and finally I pinged my PIC32 ESK II. 
    The problem depended from the incorrect setting of Laptop IPv4 proprieties, such as DNS, IP, and so on
     
    I used the example founded in Harmony directory called "web_net_server_nvm_mpfs".
     
    However this sample does not work correctly, because in the first html page called "index.htm" I can see nothing working well, because the led iabout led or buttons are not changed.
     
     
    So guys do you have some suggestions or a working example to download?
     
    Thanks you again,
     
    Sasà1983

    Attached Image(s)

    #13
    rainad
    Super Member
    • Total Posts : 1015
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/07/12 17:27:15 (permalink)
    0
    You mention web_net_server_nvm_mpfs. So is your connection https, over port 443?
    I'd try first with a regular http, and see what happens. Change the listening port to 80 and then give it a try.
    It would also help if you had a console running, that could tell us if some errors occur at run time.
    #14
    Sasa1983
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2017/10/25 07:22:57
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/07/13 00:05:07 (permalink)
    0
    Good news, guys!!!!!!
     
    Finally I find the solution...and it works!!!!!!  grin: grin
     
    The steps, that I praticed are:
    1) Use Harmony web_server_nvm_mpfs example.
    2) Modify the IPv4 propriety of laptop ethernet connection  such as DNS , IP address, and so on
    3) in the file system.config.h  type this string :#define TCPIP_NETWORK_DEFAULT_INTERFACE_FLAGS_IDX0 TCPIP_NETWORK_CONFIG_DHCP_SERVER_ON   
    4) Compile and run
    5) Digit on every web browser the string HOST NAME of board ("MCHPBOARD_E)
     
    I hope that this post will help a person that has the same problems!!!!
     
    Now I should understand how the pic32 console works and how to implement an udp server client.
     
    Thank you again,
     
     
    Sasa1983
    #15
    SHanwell
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2018/09/13 03:56:18
    • Location: 0
    • Status: offline
    Re: PIC32 Ethernet Starter kit II Demo App 2018/09/14 03:58:13 (permalink)
    0
    Hi All,
     
    Can I also ask if anyone has emulated the Build a TCP/IP Project application that was done on the original PIC32 ESK with the PIC32 ESK II
     
    Best Regards
     
    Scott
     
     
     
    #16
    Jump to:
    © 2018 APG vNext Commercial Version 4.5