Microchip
直播中

李淑嘉

7年用户 264经验值
私信 关注
[问答]

PIC32以太网未与全局IP地址连接

我尝试将我的PIC32以太网板作为TCP客户端连接到服务器,但不能连接。我用我的PC机的本地IP地址测试了TCP客户端连接。它工作成功。但是在服务器的情况下不工作。我应该与TCP服务器连接的步骤是什么?我有IP地址和服务器端口,这是在收听模式。有什么帮助将得到赞赏?

以上来自于百度翻译


      以下为原文

    I am trying to connect my PIC32 ethernet board as TCP client with Server but not able to connect.
I have tested TCP client connection with my computer with local IP address of my PC.It works successfully.
But not work in case of server.
What should be my step to connect with TCP server? I am having IP address and port of server which is in listening mode.
Any help will be appreciated ?

回帖(8)

李维洲

2019-2-28 14:28:11
请确保服务器IP地址的ARP解析成功。

以上来自于百度翻译


      以下为原文

     
Please make sure that the ARP resolution for the server IP address is successful.
 
 
 
举报

赵丽

2019-2-28 14:43:16
我能用相同的IP地址和端口号连接我的PC机,我用Socket测试软件在PC机上测试了它。

以上来自于百度翻译


      以下为原文

    I am able to connect my PC with server with same IP address and port no.
I have tested it using socket test software in PC
举报

赵丽

2019-2-28 15:01:23
我能用相同的IP地址和端口号连接我的PC机,我用Socket测试软件在PC机上测试了它。

以上来自于百度翻译


      以下为原文

    I am able to connect my PC with server with same IP address and port no.
I have tested it using socket test software in PC
举报

李维洲

2019-2-28 15:12:58
这就是为什么我问你的PIC32是否能够解析服务器IP地址(是ARP成功)吗?还有一种可能性:一旦你把一个特定的IP地址分配给PC机,你的PC机和服务器之间的路由器正在制作一个ARP表条目,将PC IP地址映射到PC MAC地址,然后将相同的IP地址分配给PIC32(我猜这是静态IP地址分配)。现在PC不在网络中,你可能有一个IP地址冲突。我建议你尝试一个不同的IP地址为PIC32,并首次ping PIC32与您的PC在网络中。

以上来自于百度翻译


      以下为原文

    That why I am asking if your PIC32 is able to resolve the Server IP address (is ARP successful) ?
 
There is another possibility:
Once you assign a particular IP address to the PC, the router between your PC and Server is making an ARP table entry mapping the PC IP address to the PC mac address.
Then you assign the same IP address to the PIC32 (I am guessing this is static IP address allocation and now PC is not in network), you are probably having an IP address conflict.

I would suggest you to try a different IP address for PIC32, and first ping the pic32 with your PC in the network.
 
 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分