极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8384|回复: 1

官方网络收发的例子是使用什么工具去调试的,一直没找到合适的工具

[复制链接]
发表于 2013-3-4 21:29:24 | 显示全部楼层 |阅读模式
#include <Ethernet.h>

// network configuration.  gateway and subnet are optional.

// the media access control (ethernet hardware) address for the shield:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };  
//the IP address for the shield:
byte ip[] = { 10, 0, 0, 177 };   
// the router's gateway address:
byte gateway[] = { 10, 0, 0, 1 };
// the subnet:
byte subnet[] = { 255, 255, 0, 0 };

// telnet defaults to port 23
Server server = Server(23);

void setup()
{
  // initialize the ethernet device
  Ethernet.begin(mac, ip, gateway, subnet);

  // start listening for clients
  server.begin();
}

void loop()
{
  // if an incoming client connects, there will be bytes available to read:
  Client client = server.available();
  if (client == true) {
    // read bytes from the incoming client and write them back
    // to any clients connected to the server:
    server.write(client.read());
  }
}

这个官方例子使用什么软件去测试收发啊,我尝试了几个都不行,一直没测试成功
回复

使用道具 举报

发表于 2013-3-4 23:04:16 | 显示全部楼层
去周立功官网下载TCPUDPDebug
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-5-5 00:56 , Processed in 0.037111 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表