完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我尝试将我的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个回答
|
|
请确保服务器IP地址的ARP解析成功。
以上来自于百度翻译 以下为原文 Please make sure that the ARP resolution for the server IP address is successful. |
|
|
|
我能用相同的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 |
|
|
|
我能用相同的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 |
|
|
|
这就是为什么我问你的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. |
|
|
|
|
|
|
|
感谢您的回复,我尝试了不同的IP地址为PIC32。它的工作。PIC32能够与我的PC在网络中。我需要知道我是否需要启用DHCP客户机/服务器或AutoIP连接到服务器具有全球IP之前调用TCPclient。我是新的以太网,请建议。
以上来自于百度翻译 以下为原文 Thanks for reply, I have tried different IP address for PIC32.It works. PIC32 is able to ping with my PC in network. I need to know whether I need to enable DHCP client/server or AutoIP to connect with server having global IP before calling TCPclient. I am new to ethernet please suggest. |
|
|
|
我建议在PIC32上使用DHCP客户端。让路由器将IP地址分配给您的板和PC。此外,正如CHIZIAG建议的那样,确保DNS客户端在PIC32上启用。如果DNS被解析以获得IP地址,并且ARP被解析以获得服务器的MAC地址,则不应尝试连接到服务器。
以上来自于百度翻译 以下为原文 I would suggest use DHCP Client on PIC32. Let the router assign IP address to your board and PC. Also, as CinZiaG suggested, make sure that the DNS client is enabled on your PIC32. You shall not try to connect to the server unless your DNS is resolved to get IP Address and ARP is resolved to get mac address of the server. |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
5238 浏览 9 评论
2027 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3202 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
772浏览 1评论
663浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
590浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
672浏览 0评论
572浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 13:59 , Processed in 1.355365 second(s), Total 90, Slave 74 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号