我正在使用SerialIP库并正在尝试为我的Arduino建立SLIP连接。现在,当我尝试ping时,RX LED亮起,证明它确实收到了数据包,但TX引脚从不亮,并且数据包没有返回。
我正在使用示例服务器程序。它确实设法到达主循环(已经通过一些数字写入测试),所以我唯一能看到的是代码错误的是IP地址定义:
// Set the IP address we'll be using. Make sure this doesn't conflict with
// any IP addresses or subnets on your LAN or you won't be able to connect to
// either the Arduino or your LAN...
IP_ADDR myIP = {192,168,5,2};
IP_ADDR subnet = {255,255,255,0};
我是通过Ubuntu这样做的,当我运行route
时,我得到这一行:
Destination Gateway Genmask Flags Metric Ref Use Iface
... ... ... ... ... ... ...
192.168.5.2 * 255.255.255.255 UH 0 0 0 sl0
我想也许我必须将子网更改为{255,255,255,255},但它仍然有相同的结果:没有TX的点亮RX。
现在我不知道为什么这不起作用。为什么是解决方案?
答案 0 :(得分:1)
我对Arduino和以太网了解不多,但在我看来,你必须对你的Arduino进行编程以发回ping。我在想硬件不会自动响应ping。发布一些代码,或者如果您关注教程,请发布链接。
祝你好运。