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.

EVM6437 can not get dynamic IP address in ndk2.2 sys/bios6

Hello,

===here is my environment===
Board: TI EVM6437 development board
Emulator: Wintech XDS560V2 trace
Software: CCS5.1.0.09000
package: ndk_2_20_06_35
package: bios_6_32_05_54

==1==
I download NDK2.0 to get eth_dm6437 library file.(D:\ti\ndk2_0\ti\ndk\src\hal\evmdm6437\eth_dm6437)

I use sys/bios 6,then I change ethdriver.c
#if 0
#include <std.h>
#include <sys.h>
#include <bcache.h>
#include <c64.h>
#else
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/family/c64p/Cache.h>
#define BCACHE_invL1pAll Cache_invL1pAll
#include <ti/sysbios/family/c64p/Hwi.h>
#define C64_disableIER Hwi_disableIER// Disable certain maskable interrupts(Bits16 mask);
#define C64_enableIER Hwi_enableIER// Enable certain maskable interrupts(Bits16 mask);
#endif

and set define option: --define=EFUSE_MAC --define=TYPES_BIOS6 --define=PHY_MODE_100MBPS -D_INCLUDE_NIMU_CODE

finally,I compiled eth_dm6437 source file to eth_dm6437.lib

===
here is dm_6437 library project.1616.eth_dm6437.rar
===

==2==
I create a sys/bios project named ndk_dm6437_helloWorld and copy helloWorld demo to it.
Then I link eth_dm6437.lib to the project and compile it.
when I load the OUT file,after running output console can not get dynamic IP address.
here is output message:
++

[C64XP_0]
[C64XP_0] TCP/IP Stack 'Hello World!' Application
[C64XP_0]
[C64XP_0] Using MAC Address: 20-12-02-28-17-12
[C64XP_0] EMAC should be up and running
[C64XP_0] EMAC has been started successfully
[C64XP_0] Registeration of the EMAC Successful
[C64XP_0] Service Status: DHCPC : Enabled : : 000
[C64XP_0] Service Status: DHCPC : Enabled : Running : 000
[C64XP_0] Link Status: 100Mb/s Full Duplex on PHY 0

...some time later(about 2 minute)

[C64XP_0] Service Status: DHCPC : Enabled : Fault : 002

++

when I set a static IP address to it,it run OK.
char *HostName = "tidsp";
#if 1
char *LocalIPAddr = "192.168.3.150"; // Set to "0.0.0.0" for DHCP
char *LocalIPMask = "255.255.255.0"; // Not used when using DHCP
char *GatewayIP = "192.168.3.1"; // Not used when using DHCP
char *DomainName = "demo.net"; // Not used when using DHCP
char *DNSServer = "192.168.3.1"; // Used when set to anything but zero
#else
char *LocalIPAddr = "0.0.0.0"; // Set to "0.0.0.0" for DHCP
char *LocalIPMask = "0.0.0.0"; // Not used when using DHCP
char *GatewayIP = "0.0.0.0"; // Not used when using DHCP
char *DomainName = "demo.net"; // Not used when using DHCP
char *DNSServer = "0.0.0.0"; // Used when set to anything but zero
#endif

here is output message:
++

[C64XP_0]
[C64XP_0] TCP/IP Stack 'Hello World!' Application
[C64XP_0]
[C64XP_0] Using MAC Address: 20-12-02-28-17-12
[C64XP_0] EMAC should be up and running
[C64XP_0] EMAC has been started successfully
[C64XP_0] Registeration of the EMAC Successful
[C64XP_0] Network Added: If-1:192.168.3.150
[C64XP_0] Link Status: 100Mb/s Full Duplex on PHY 0

++
My conputer can ping its IP(192.168.3.150).

Pinging 192.168.3.150 with 32 bytes of data:

Reply from 192.168.3.150: bytes=32 time<1ms TTL=255
Reply from 192.168.3.150: bytes=32 time<1ms TTL=255
Reply from 192.168.3.150: bytes=32 time<1ms TTL=255
Reply from 192.168.3.150: bytes=32 time<1ms TTL=255

===
here is ndk_dm6437_helloWorld project(include GEL file).0714.ndk_dm6437_helloWorld.rar
===


Could you tell me what's wrong why my project can not get dynamic IP address??

Thank,
Yang Hai
  • When I run NSP demos,also FAIL. 
    OMAPL138 custom board.

    D:\ti\nsp_1_10_00_03\packages\ti\ndk\examples\ndk_evmOMAPL138_arm9_helloWorld

    [ARM9_0] Using default MAC address
    [ARM9_0] Using MAC Address: 00-08-ee-03-14-99
    [ARM9_0] MAC Address = 00-08-ee-03-14-99
    [ARM9_0] EMAC should be up and running
    [ARM9_0] EMAC has been started successfully
    [ARM9_0] Registeration of the EMAC Successful
    [ARM9_0] Service Status: DHCPC : Enabled : : 000
    [ARM9_0] Service Status: DHCPC : Enabled : Running : 000
    [ARM9_0] Link Status: 100Mb/s Full Duplex on PHY 0
    [ARM9_0] Service Status: DHCPC : Enabled : Fault : 002

    D:\ti\nsp_1_10_00_03\packages\ti\ndk\examples\ndk_evm6748_coff_examples\ndk_evm6748_coff_client

    [C674X_0] Using default MAC address
    [C674X_0] Using MAC Address: 00-08-ee-03-14-99
    [C674X_0] MAC Address = 00-08-ee-03-14-99
    [C674X_0] EMAC should be up and running
    [C674X_0] EMAC has been started successfully
    [C674X_0] Registeration of the EMAC Successful
    [C674X_0] Service Status: DHCPC : Enabled : : 000
    [C674X_0] Service Status: Telnet : Enabled : : 000
    [C674X_0] Service Status: HTTP : Enabled : : 000
    [C674X_0] Service Status: DHCPC : Enabled : Running : 000
    [C674X_0] Link Status: 100Mb/s Full Duplex on PHY 0
    [C674X_0] Service Status: DHCPC : Enabled : Fault : 002
  • Do you see anything on the network (WireShark is a great free sniffer)? You should see the DHCP broadcast request from the board. Do you know for sure there is a DHCP server running somewhere on the network?

    Todd

  • ToddMullanix said:

    Do you see anything on the network (WireShark is a great free sniffer)? You should see the DHCP broadcast request from the board. Do you know for sure there is a DHCP server running somewhere on the network?

    Todd

    =======here is wiresharp packet data=======

    3704.bootp.rar

    =======

    EVM6437(id=0x12172802) send 'Discover' but never receive 'Request'

    but othter drivers DO receive 'Request'

  • I found the answer.

    that's the "Discover" PACKET(854 Bytes) is too big so that my router misses its request.

    My computer DHCP server can give evm6437 board dinamic IP address,but my router can not.

    Can change the "Discover" packet length be 590 ??or more little??

  • Yang,

    You can change the following constant to 312 in ndk_2_##_##_##\packages\ti\ndk\src\nettools\dhcp\dhcp.h and rebuild the NDK (per instructions in the wiki, look for the link in the release notes).

    #define SZOPTIONS           576

    Todd

  • Why My “Discover” packet is 854 bytes?

    but micro define SZOPTIONS is 576.

  • SZOPTIONS is just the options size, not the packet size. There is still the IP, UDP, and rest of the DHCP Discover request (e.g. 128 octet filename field, ...) in the packet. Refer to RFC 2131 for a full description of the DHCP packet.

    Todd

  • Thank you,Todd.

    I do it.

    1.change dhcp.h 

    #define SZOPTIONS           576  ==>>  #define SZOPTIONS           312

    2.rebuild all

    D:\ti\ndk_2_20_00_19\packages\ti\ndk>xdc all

    3.rebuild ndk_dm6437_helloWorld project

    [C64XP_0] 
    [C64XP_0] TCP/IP Stack 'Hello World!' Application
    [C64XP_0]
    [C64XP_0] Using MAC Address: 20-12-02-28-17-12
    [C64XP_0] EMAC should be up and running
    [C64XP_0] EMAC has been started successfully
    [C64XP_0] Registeration of the EMAC Successful
    [C64XP_0] Service Status: DHCPC : Enabled : : 000
    [C64XP_0] Service Status: DHCPC : Enabled : Running : 000
    [C64XP_0] Link Status: 100Mb/s Full Duplex on PHY 0
    [C64XP_0] Network Added: If-1:192.168.3.101
    [C64XP_0] Service Status: DHCPC : Enabled : Running : 017