• AVR Freaks

Hot!external apps addition to existing project Harmony V3

Author
FlutterBy
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2019/11/13 05:08:11
  • Location: 0
  • Status: offline
2020/02/13 02:47:48 (permalink)
0

external apps addition to existing project Harmony V3

Hi,
Using Harmony v3.4.1
XC32 V2.30
MPLAB IDE 5.30
Project tcpip_tcp_client pic32mx_eth_sk2.X converted to UDP as there is not one for UDP on the MX yet
Ethernet Starter Kit 2, LAN8740 PHY Daughter Board, pic32mx795f512l
 
I already have an app written on a PIC32, I just want it to be listening to a certain UDP Port waiting for data to coming in, it won't ack anything.
 
Where do I place the app? is it in main?? do I update the UDP.c or the existing app.c or just include the socket setup as par of myapp?
 
Thanks in advance
 
#1

6 Replies Related Threads

    FlutterBy
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/13 05:08:11
    • Location: 0
    • Status: offline
    Re: external apps addition to existing project Harmony V3 2020/02/14 00:40:23 (permalink)
    0
    Apologies for all the duplicates, cane delete them either, so added Duplicate to the title
    #2
    FlutterBy
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/13 05:08:11
    • Location: 0
    • Status: offline
    Re: external apps addition to existing project Harmony V3 2020/02/24 02:21:36 (permalink)
    0
    Has Nobody done this before
    #3
    BillP
    Super Member
    • Total Posts : 389
    • Reward points : 0
    • Joined: 2014/09/28 07:53:35
    • Location: CA
    • Status: offline
    Re: external apps addition to existing project Harmony V3 2020/02/24 08:33:33 (permalink)
    0
    My suggestions: Don't mess with the Harmony net software.  Make a separate state machine for the UDP client if adding to app.c makes it too complex.
    #4
    FlutterBy
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/13 05:08:11
    • Location: 0
    • Status: offline
    Re: external apps addition to existing project Harmony V3 2020/02/25 00:47:55 (permalink)
    0
    Ok Thank you
    Then at the file as part of the initialization files?
    #5
    BillP
    Super Member
    • Total Posts : 389
    • Reward points : 0
    • Joined: 2014/09/28 07:53:35
    • Location: CA
    • Status: offline
    Re: external apps addition to existing project Harmony V3 2020/02/25 08:56:32 (permalink)
    0
    Be careful here.  Look at the demos.  The initialization of data occurs in the SYS_Initialize().  Opening files occurs in the super loop SYS_TASKS().  There should be some type of INIT state in your state machine to do the file opens, etc.  Then go into the other states.  Any of the net demos show how to do this.
    #6
    rainad
    Moderator
    • Total Posts : 1329
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: external apps addition to existing project Harmony V3 2020/02/25 13:38:38 (permalink)
    0
    There are enough UDP examples in the demo  applications that are part of the TCP/IP distribution:
    - tcpip_udp_client, tcpip_udp_client_server, tcpip_udp_server
    or
    - berkeley_udp_client, berkeley_udp_relay, berkeley_udp_server if you prefer BSD API.
     
    You can use the demo code that applies to you. The fact that the stack runs on a PIC32MX, PIC32MZ or any other platform is irrelevant (the only thing that's changed is the network driver, some I/O settings, etc.).
    That is, once you have a demo working on your platform, you can use code from another demo application without any problem (provided that the proper stack modules are enabled).
     
    You should add your code in the application files and never mess with the stack directly (unless you know what you're doing).
     
    #7
    Jump to:
    © 2020 APG vNext Commercial Version 4.5