<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Microduino_W5500_Network_%286%29</id>
		<title>Microduino W5500 Network (6) - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Microduino_W5500_Network_%286%29"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_W5500_Network_(6)&amp;action=history"/>
		<updated>2026-04-21T07:59:52Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_W5500_Network_(6)&amp;diff=7949&amp;oldid=prev</id>
		<title>1304410487@qq.com：Created page with &quot;{| style=&quot;width: 800px;&quot; |- | ==Purpose== This course will show you how to sue UDP (User Datagram Protocol) to communicate with Microduino-W5500.   ==Equipment== *'''Microdu...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_W5500_Network_(6)&amp;diff=7949&amp;oldid=prev"/>
				<updated>2015-03-11T09:00:49Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| style=&amp;quot;width: 800px;&amp;quot; |- | ==Purpose== This course will show you how to sue UDP (User Datagram Protocol) to communicate with Microduino-W5500.   ==Equipment== *&amp;#039;&amp;#039;&amp;#039;Microdu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Purpose==&lt;br /&gt;
This course will show you how to sue UDP (User Datagram Protocol) to communicate with Microduino-W5500. &lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-USBTTL]]'''&lt;br /&gt;
*'''[[Microduino-W5500]]'''&lt;br /&gt;
*'''[[Microduino-RJ45]]'''&lt;br /&gt;
&lt;br /&gt;
*Other hardware equipment &lt;br /&gt;
**USB cable   One&lt;br /&gt;
&lt;br /&gt;
==UDP==&lt;br /&gt;
UDP is short for User Datagram Protocol—a connectionless transmission level protocol in OSI reference model, providing transaction oriented simple unreliable message delivery service. It is formally defined in IETF RFC 768. &lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
&lt;br /&gt;
*Microduino-ENC28J60&lt;br /&gt;
*Microduino-RJ45&lt;br /&gt;
*Microduino-Core&lt;br /&gt;
*Microduino-USBTTL&lt;br /&gt;
Stack them and plug in the cable. &lt;br /&gt;
&lt;br /&gt;
As follows: &lt;br /&gt;
&lt;br /&gt;
[[File:MicroduinoW5500Show.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
[[https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced_Tutorial/W5500Code/MicroduinoW5500Six MicroduinoW5500Six]]&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 1: First, make sure you have _02_Microduino_Ethernet_WIZ library in your IDE and put it into libraries folder of your IDE. &lt;br /&gt;
&lt;br /&gt;
Step 2: If there still exists the previous Ethernet library in your libraries folder, it needs to be deleted since the previous Ethernet is compiled according to W5100. &lt;br /&gt;
&lt;br /&gt;
Then, you need to change _02_Microduino_Ethernet_WIZ file so that the library function could be corresponding with Microduino-W5500: &lt;br /&gt;
First find w5100.h of utility in _02_Microduino_Ethernet_WIZ library. &lt;br /&gt;
&lt;br /&gt;
Change #define wiz_cs_pin 8	//CS_PIN of the code to #define wiz_cs_pin 10	//CS_PIN. &lt;br /&gt;
&lt;br /&gt;
Step 3: Interpret the code:  &lt;br /&gt;
&lt;br /&gt;
  // if there's data available, read a packet&lt;br /&gt;
  int packetSize = Udp.parsePacket();&lt;br /&gt;
  if(packetSize)&lt;br /&gt;
  {&lt;br /&gt;
    Serial.print(&amp;quot;Received packet of size &amp;quot;);&lt;br /&gt;
    Serial.println(packetSize);&lt;br /&gt;
    Serial.print(&amp;quot;From &amp;quot;);&lt;br /&gt;
    IPAddress remote = Udp.remoteIP();&lt;br /&gt;
    for (int i =0; i &amp;lt; 4; i++)&lt;br /&gt;
    {&lt;br /&gt;
      Serial.print(remote[i], DEC);&lt;br /&gt;
      if (i &amp;lt; 3)&lt;br /&gt;
      {&lt;br /&gt;
        Serial.print(&amp;quot;.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    Serial.print(&amp;quot;, port &amp;quot;);&lt;br /&gt;
    Serial.println(Udp.remotePort());&lt;br /&gt;
  //Judge if there is any data from code above. If there is, IP address and port number of the client will be output through the serial port. &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
    // read the packet into packetBufffer&lt;br /&gt;
    Udp.read(packetBuffer,UDP_TX_PACKET_MAX_SIZE);&lt;br /&gt;
    Serial.println(&amp;quot;Contents:&amp;quot;);&lt;br /&gt;
    Serial.println(packetBuffer);&lt;br /&gt;
  &lt;br /&gt;
    // send a reply, to the IP address and port that sent us the packet we received&lt;br /&gt;
    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());&lt;br /&gt;
    Udp.write(ReplyBuffer);&lt;br /&gt;
    Udp.endPacket();&lt;br /&gt;
  }&lt;br /&gt;
  delay(10);&lt;br /&gt;
  //Message read and transmitted from the code above is input through the serial port and responds “acknowledged” to the client. &lt;br /&gt;
&lt;br /&gt;
Step 4: Download the code and compile. &lt;br /&gt;
&lt;br /&gt;
Step 5: Test: SocketTool sends UDP packet. &lt;br /&gt;
Open SocketTool, select UDP client and click to create. &lt;br /&gt;
[[File:MicroduinoW5500SocketTool1.png|600px|center|thumb]]&lt;br /&gt;
Input IP and port of the opposite side in the pop-up dialog box.  &lt;br /&gt;
[[File:MicroduinoW5500SocketTool2.png|600px|center|thumb]]&lt;br /&gt;
Input messages in data sending box and send. &lt;br /&gt;
[[File:MicroduinoW5500SocketTool3.png|600px|center|thumb]]&lt;br /&gt;
The receiving box will show “acknowledged”.    &lt;br /&gt;
[[File:MicroduinoW5500SocketTool4.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
&lt;br /&gt;
Here we got a UDP receiver by Microduino-W5500, capable of receiving message and replying.  &lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	</feed>