• AVR Freaks

Hot!TCPIP_UDP_Bind() Problem.

Author
Kartha
New Member
  • Total Posts : 29
  • Reward points : 0
  • Joined: 2017/07/14 21:44:40
  • Location: 0
  • Status: offline
2021/03/04 04:58:42 (permalink)
0

TCPIP_UDP_Bind() Problem.

Hello, Am using The Harmony Ethernet stack for a long time. But few days back I have seen a problem, which I can't resolve myself.
 
The problem am facing: Interface is getting ready, Clint opening is also working fine. I can send and receive UDP packets with out any problem. But when i use the function "TCPIP_UDP_Bind()" after getting a valid client socket, the function returns 0 and I can't assign a specific IP address and port number for my device. As a workaround I have used this function "TCPIP_UDP_SourceIPAddressSet()" which gives an IP address to my PIC32, which is working fine, and my device get a unique IP address. But I can't assign a specific port number to my device, the stack is giving some random port number to the device itself. 
Can some one please help me with this issue. Since its very important to have a specific source port and source IP address for the product.
 
MPLAB version : 5.05
XC32 version: 2.10
Harmoney version: 2.06
 
Thanks in advance..
#1

4 Replies Related Threads

    Aussie Susan
    Super Member
    • Total Posts : 3857
    • Reward points : 0
    • Joined: 2008/08/18 22:20:40
    • Location: Melbourne, Australia
    • Status: offline
    Re: TCPIP_UDP_Bind() Problem. 2021/03/04 19:04:29 (permalink)
    0
    I'm not clear if this problem is one that has just occurred but without any changes in your code, or if you have re-coded the app and it is now not working.
    In the first instance, the problem may lie outside your app but in the network somewhere.
    In the second instance can you go back to the start and add the required new code a section at a time and see where it stops working.
    Other than that if the Harmony stack gives you the source code (I've never used it myself) then try to step through the code and see if you can see where the issue occurs.
    Susan
    #2
    Kartha
    New Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2017/07/14 21:44:40
    • Location: 0
    • Status: offline
    Re: TCPIP_UDP_Bind() Problem. 2021/03/04 23:41:26 (permalink)
    0
    You are absolutely correct. I have been using this harmony stack and the "TCPIP_UDP_Bind()" function for a long time now, and they work fine all time time. It all suddenly happens, last week one of the customers complaint about this issue, that they can't assign a local port and IP as they wish. So I just started a debug and came to know that the bind function is returning 0 instead of 1, strange!. After some more debugging inside the function I found that the function is returning from here:
    See attachment.
     
    And I don't know what to do now. If u have any suggestion please advice me.
    Thanks for your response.
    post edited by Kartha - 2021/03/04 23:47:08
    #3
    Aussie Susan
    Super Member
    • Total Posts : 3857
    • Reward points : 0
    • Joined: 2008/08/18 22:20:40
    • Location: Melbourne, Australia
    • Status: offline
    Re: TCPIP_UDP_Bind() Problem. 2021/03/08 18:44:13 (permalink)
    0
    I have no experience with XC32 MCU nor Harmony so I'll leave any further assistance to those that do.
    My comment was purely around clarifying the question.
    Susan
    #4
    Kartha
    New Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2017/07/14 21:44:40
    • Location: 0
    • Status: offline
    Re: TCPIP_UDP_Bind() Problem. 2021/03/08 21:14:07 (permalink)
    0
    Thanks a lot for your time. If I solve the issue, I will acknowledge you.
    #5
    Jump to:
    © 2021 APG vNext Commercial Version 4.5