1.测试平台C6678LE EVM开发板 ,测试例程为:MCSDK 目录下NDK中的hello world工程
2.测试目标:C6678LE EVM开发板与PC机进行以太网通信
存在以下4个问题请大家帮忙解答,具体问题在请看帖内,谢谢!
开发板的IP信息配置为:
hello world 源文件中的IP信息如下
char *HostName = "tidsp";
char *LocalIPAddr = "192.168.2.100";
char *LocalIPMask = "255.255.255.0"; // Not used when using DHCP
char *GatewayIP = "192.168.2.101"; // 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、
PC机的IP地址为:192.168.2.50
问题一:我配置的开发板与PC机IP信息对吗?
在PC机上ping开发板的IP地址结果如下图所示:
问题二:如上图所示,出现“无法访问目标主机”,但是ping结果4个数据包全部接收,不存在丢包现象,请问这种情况下是不是PC机与开发板的是以太网已经连接?出新这种情况的原因是什么?
debug运行会在控制台上打印以下信息,出现两种情况:
第一种情况:
[C66xx_0] QMSS successfully initialized
[C66xx_0] CPPI successfully initialized
[C66xx_0] PA successfully initialized
[C66xx_0] [C66xx_0] TCP/IP Stack 'Hello World!' Application
[C66xx_0]
[C66xx_0]
[C66xx_0] TCP/IP Stack 'Hello World!' Application
[C66xx_0]
[C66xx_0] PASS successfully initialized
[C66xx_0] Ethernet subsystem successfully initialized
[C66xx_0] Ethernet eventId : 48 and vectId (Interrupt) : 7
[C66xx_0] Verify_Init: Expected 0 entry count for Queue number = 911, found 1 entries
[C66xx_0] Verify_Init: Expected 0 entry count for Queue number = 913, found 1 entries
[C66xx_0] Registration of the EMAC Successful, waiting for link up ..
[C66xx_0] Service Status: DHCPC : Enabled : : 000
[C66xx_0] Service Status: DHCPC : Enabled : Running : 000
问题三:上面的控制台打印信息是不是说明以太网已经可以与PC机通信了?
第二种情况:
[C66xx_0] QMSS successfully initialized
[C66xx_0] CPPI successfully initialized
[C66xx_0] PA successfully initialized
[C66xx_0]
[C66xx_0] TCP/IP Stack 'Hello World!' Application
[C66xx_0]
[C66xx_0]
[C66xx_0] TCP/IP Stack 'Hello World!' Application
[C66xx_0] [C66xx_0] PASS successfully initialized
[C66xx_0] Ethernet subsystem successfully initialized
[C66xx_0] Ethernet eventId : 48 and vectId (Interrupt) : 7
[C66xx_0] Timeout waiting for reply from PA to Pa_addMac command
[C66xx_0] Add_MACAddress failed [C66xx_0] Error: Unable to register the EMAC
[C66xx_0] NIMUIOCTL Failed with error code: -22
[C66xx_0] Service Status: DHCPC : Failed : : 000
问题四:上面的控制台打印信息是不是说明以太网已经无法与PC机通信了?如何进行修改?
Jack Dong:
补充信息:求分享
有没有比较好用的以太网调试助手,可以直接显示从开发板接受的以太网数据或者直接通过调试助手给以太网发送数据?
striker Qian:
既然选择了静态ip就不要打开evm板卡上DHCP拨码开关。应该是sw9最边上的一个,具体可以参考随evm板一起的TRM文档