我们再评估用SAME54来做产品,产品需要TCPIP通信,目前我们用SAME54 XPLAINED demo下载harmony3/net/apps中例程代码无法通信。也无法ping通对应ip,由于路由是54网段,所以在configuration.h中设置IP。
如下:
/* Network Configuration Index 0 */
#define TCPIP_NETWORK_DEFAULT_INTERFACE_NAME_IDX0 "GMAC"
#define TCPIP_IF_GMAC
#define TCPIP_NETWORK_DEFAULT_HOST_NAME_IDX0 "MCHPBOARD_C"
#define TCPIP_NETWORK_DEFAULT_MAC_ADDR_IDX0 "00:04:25:1C:A0:02"
#define TCPIP_NETWORK_DEFAULT_IP_ADDRESS_IDX0 "192.168.54.11"
#define TCPIP_NETWORK_DEFAULT_IP_MASK_IDX0 "255.255.255.0"
#define TCPIP_NETWORK_DEFAULT_GATEWAY_IDX0 "192.168.54.1"
#define TCPIP_NETWORK_DEFAULT_DNS_IDX0 "192.168.54.1"
#define TCPIP_NETWORK_DEFAULT_SECOND_DNS_IDX0 "0.0.0.0"
#define TCPIP_NETWORK_DEFAULT_POWER_MODE_IDX0 "full"
#define TCPIP_NETWORK_DEFAULT_INTERFACE_FLAGS_IDX0 \
TCPIP_NETWORK_CONFIG_DHCP_CLIENT_ON |\
TCPIP_NETWORK_CONFIG_DNS_CLIENT_ON |\
TCPIP_NETWORK_CONFIG_IP_STATIC
以下是超级终端输出:
TCP/IP Stack: Initialization Started
TCP/IP Stack: Initialization Ended - success
Interface GMAC on host MCHPBOARD_C - NBNS disabled
TCP/IP Stack: Initialization Started
TCP/IP Stack: Initialization Ended - success
Interface GMAC on host MCHPBOARD_C - NBNS disabled
GMAC IP Address: 192.168.54.11
Waiting for Client Connection on port: 9760
用ping指令无法ping通192.168.54.11,本机ip是192.168.54.105。
请大神帮忙看看,哪点问题。 |