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.
On the following hardware/software, I have been unsuccessful in getting the LP-AM243 to receive an IP address from the DHCP server.
Could I have someone confirm if the PROC109A and LwIP examples from 9_00_00_35 SDK work?
*EDIT: See my follow-up post below. DHCP / Static LwIP apps don't work with 1Gbps connections; but works with 100Mbps Full-Duplex.
Other posts on E2E seems to show no issues with earlier SDK and E3 boards; so assumption is some software changes are the cause...?
DHCP Server: TP-Link Home Router
Confirmed the router assigns IP address to connected devices.
(i.e. plugged in a BeagleBoneBlack to the router with short LAN cable (same cable used in all tests).
It was assigned an IP from the DHCP server's pool automatically; confirmed on BBB with "ifconfig eth0" command)
"ping xxx.xxx.xxx.xxx also works to talk between PC / BBB"
LP-AM243 (PROC109A(001))
Starting NULL Bootloader ... DMSC Firmware Version 9.0.7--v09.00.07 (Kool Koala) DMSC Firmware revision 0x9 DMSC ABI revision 3.1 INFO: Bootloader_runCpu:155: CPU r5f1-0 is initialized to 800000000 Hz !!! INFO: Bootloader_runCpu:155: CPU r5f1-1 is initialized to 800000000 Hz !!! INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!! INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!! INFO: Bootloader_loadSelfCpu:207: CPU r5f0-1 is initialized to 800000000 Hz !!! INFO: Bootloader_runSelfCpu:217: All done, reseting self ...
But the LP-AM243 was never assigned an IP address from the DHCP server.
I checked the TP-Link router settings page, but LP-AM243 was not detected/assigned IP.
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2023.09.11 12:00:59 =~=~=~=~=~=~=~=~=~=~=~= Starting NULL Bootloader ... DMSC Firmware Version 9.0.7--v09.00.07 (Kool Koala) DMSC Firmware revision 0x9 DMSC ABI revision 3.1 INFO: Bootloader_runCpu:155: CPU r5f1-0 is initialized to 800000000 Hz !!! INFO: Bootloader_runCpu:155: CPU r5f1-1 is initialized to 800000000 Hz !!! INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!! INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!! INFO: Bootloader_loadSelfCpu:207: CPU r5f0-1 is initialized to 800000000 Hz !!! INFO: Bootloader_runSelfCpu:217: All done, reseting self ... ========================== CPSW LWIP TCP ECHO SERVER ========================== Enabling clocks! EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:1 From 4 To 2 Mdio_open: MDIO Manual_Mode enabled EnetPhy_bindDriver: PHY 3: OUI:080028 Model:0f Ver:03 <-> 'generic' : OK PHY 3 is alive PHY 15 is alive Starting lwIP, local interface IP is dhcp-enabled [LWIPIF_LWIP] NETIF INIT SUCCESS Host MAC address-0 : 1c:63:49:25:1a:09 [0]Enet IF UP Event. Local interface IP:0.0.0.0 [LWIPIF_LWIP] Enet has been started successfully [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... Cpsw_handleLinkUp: Port 1: Link up: 1-Gbps Full-Duplex MAC Port 1: link up [0]Network Link UP Event [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ... [0]Waiting for network UP ...
Static IP Tests
Next, I followed some E2E posts on modifying app_main.c to change from DHCP to static IP.
BBB <---> LP-AM243
Connection works; I can ping LP-AM243 from BBB, and the "enet_cspw_tcpserver" code works.
(I used a simple python program with "socket" to send a message from BBB, and I get the TI message from LP-AM243 in response)
debian@beaglebone:~/projects/networking$ python pyclient.py Connected to Host! Sending data... Greetings from Texas Instruments!
BBB <---> PC
Connection works, I can ping the IP addresses from each other.
So I know the PC IP/Netmask/Gateway settings allow communication.
PC <---> LP-AM243
Connection doesn't work..."ping" command can't access the LP-AM243...
== Update ==
Sorry for posting this so soon, but I think I see what is happening.
Above, I described failed DHCP IP assignment / Static IP address operation at 1Gbps negotiated link.
But it works when connected to BBB, which is a 100Mbps link.
So I changed my PC Ethernet Adapter settings from "Auto-Negotiation" (which results in a 1Gbps link),
to force a 100Mbps (Full-Duplex) link. (reference: Intel).
In doing this, the LP-AM243 and PC connect via 100Mbps Full-Duplex link,
and the LwIP examples now work without issue.
If someone could please confirm on PROC109A hardware with most recent SDK?
I think this needs to be rolled into future updates of the SDK...anyone using the LwIP examples with 1Gbps LAN connections are going to run into trouble.
Hi Keito,
I'll look into the issue and try to reproduce it and verify for the auto IP assignment.
For the Static IP assignment, can you share what changes did you make in app_main.c?
Regards.
Shaunak
Hi Shaunak,
Attached the app_main.c files (only files edited) for your comparison.
app_main.c = original code
app_main_mod.c = modified code
/cfs-file/__key/communityserver-discussions-components-files/908/tcpserver.zip
Hi Keito,
thanks for the source files, I'll review them and get back to you.
Regards,
Shaunak
Hi Keito,
I had an alignment with the networking team internally, to diagnose the issue further, we would need the MAC port statistics, I am sharing the link to steps to get MAC port statistics. Based on the statistics, I can support further,
Can you please try the above and share your statistics
Regards,
Shaunak
Hi Keito,
I am also sharing a code snippet to allocate Static IP to the NetIFs,
The only precautions you need to take are:
1. Not assigning the same IP address to multiple NetIFs for obvious reasons,
2. Making sure you don't call App_allocateIPAddress() function
static void App_setupNetif() { ip4_addr_t ipaddr[2], netmask[2], gw[2]; ip4_addr_set_zero(&gw[0]); ip4_addr_set_zero(&ipaddr[0]); ip4_addr_set_zero(&netmask[0]); ip4_addr_set_zero(&gw[1]); ip4_addr_set_zero(&ipaddr[1]); ip4_addr_set_zero(&netmask[1]); gw[0].addr = ((uint32_t)0x0100A8C0UL); // 192.168.0.1 ipaddr[0].addr = ((uint32_t)0x0a00A8C0); // 192.168.0.10 netmask[0].addr = ((uint32_t)0x00FFFFFF);// 255.255.255.0 gw[1].addr = ((uint32_t)0x0100A8C0UL); // 192.168.0.1 ipaddr[1].addr = ((uint32_t)0x0300A8C0); // 192.168.0.3 netmask[1].addr = ((uint32_t)0x00FFFFFF);// 255.255.255.0 DebugP_log("Starting lwIP, local interface IP is dhcp-enabled\r\n"); hlwipIfApp = LwipifEnetApp_getHandle(); for (uint32_t netifIdx = 0U; netifIdx < ENET_SYSCFG_NETIF_COUNT; netifIdx++) { /* Open the netif and get it populated*/ g_pNetif[netifIdx] = LwipifEnetApp_netifOpen(hlwipIfApp, NETIF_INST_ID0 + netifIdx, &ipaddr[netifIdx], &netmask[netifIdx], &gw[netifIdx]); netif_set_status_callback(g_pNetif[netifIdx], App_netifStatusChangeCb); netif_set_link_callback(g_pNetif[netifIdx], App_netifLinkChangeCb); netif_set_up(g_pNetif[NETIF_INST_ID0 + netifIdx]); } LwipifEnetApp_startSchedule(hlwipIfApp, g_pNetif[ENET_SYSCFG_DEFAULT_NETIF_IDX]); }
Hi Shaunak,
Thanks for the code snippet.
With the above "Static IP" code, did you verify the ping functionality with 1Gbps connection, or 100Mbps?