This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: AM3359
Tool/software: Code Composer Studio
I'm using BIOS 6.72.2, NDK 3_60_00_3 and PDKam335x_1_0_15.
I can open a server connection without issue and echo data back to the client, however, if the client closes the connection how do I get the status of the connection? I tried looking at the error code for NDK_recv and it the same code regardless of data not being received or connection is closed.
Thanks in advance!
From the NDK level, you just know there is no packet received. If you want to determine if the connection is still there or not, this can be queried at PHY level. Please refer to pdk_am335x_1_0_15\packages\ti\board\src\<an AM335 board name>\device\enet_phy.c. Function int32_t ENETPHY_Tic(ENETPHY_Handle hPhyDev,uint32_t* mdioStatus).
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to lding:
Been out for a couple of days. Thanks for the info I will looking to that approach. It does seem straight there is no TCP/IP connect statue or Phy status at a higher level.
In addition, I thought It was solved/understood, however, it is not solved. It has to do with pinging. using the BBblack example (no modifications) it will ping for hours (ping /t option), but if you stop for a few mins it will not restart or it takes awhile before it restarts. It seems like the stack goes to sleep and may wakeup or not.
complier GNU v7.2.1, pdk 1.0.15, NDK 18.104.22.168, sys bios 6.75.2.00 target gnu.tragets.arm.A8F
Is there some configuration that needs to be done? Wireshark show msg going out to the BBBlack but no response.
In reply to robert bond:
I tried the basic example NIMU_BasicExample_evmAM335x_armExampleproject on AM335x GP EVM (sorry, we don't have any working BBB) without any change. I pinged it for a few minutes, then stopped the ping for 1 minutes and ping again. I saw the response from the EVM is immediate, so there is no ping loss. Attached is a wireshark capture, I stopped the ping at time 44, then I re-started at time 105 seconds.
I can't reproduce your issue. ping_am335x.pcapng
It must be something with the phy chip settings or auto-negation. I'll do some tests. I was able to get the link status and also the tcpip connection status. Link per your suggestion and connection status by low level call to SockGetTP. My next big thing is to be able to truly close the connection and then reconnect. Certainly the example are good to get on the network up, send data and they just close the app. However, seem to lack full connect, disconnect and reconnect API. I'm definitely getting more familiar with the NDK though.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.