<?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_ENC_Network_%284%29</id>
		<title>Microduino ENC Network (4) - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Microduino_ENC_Network_%284%29"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_ENC_Network_(4)&amp;action=history"/>
		<updated>2026-04-21T09:49:25Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_ENC_Network_(4)&amp;diff=2379&amp;oldid=prev</id>
		<title>Pkj：Created page with &quot;{{Language | Microduino ENC网络（四）}} {| style=&quot;width: 800px;&quot; |- | ==Objective== This tutorial will show you how to power on a PC using the wake on Lan feature and you...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_ENC_Network_(4)&amp;diff=2379&amp;oldid=prev"/>
				<updated>2014-05-03T12:54:43Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language | Microduino ENC网络（四）}} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Objective== This tutorial will show you how to power on a PC using the wake on Lan feature and you...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language | Microduino ENC网络（四）}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
This tutorial will show you how to power on a PC using the wake on Lan feature and your Microduino.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
*'''[[Microduino-ENC28J60]]'''&lt;br /&gt;
*'''[[Microduino-RJ45]]'''&lt;br /&gt;
*Other equipment&lt;br /&gt;
**USB cable&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
Almost all the actual network adapters have a feature called Wake on Lan, that is the ability to “wake” the PC with a special command sent through the network.&lt;br /&gt;
&lt;br /&gt;
Two main requirements to use this feature:&lt;br /&gt;
&lt;br /&gt;
if your network adapter is not embedded in the motherboard, you have to connect them with a cable&lt;br /&gt;
[[File:netCardConnetMotherBoard.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
the WOL functionality has to be enabled in the BIOS:&lt;br /&gt;
[[File:BIOSSetup1.jpg|600px|center|thumb]]&lt;br /&gt;
A typical limit in WOL usage is that network adapter isn’t able to wake the PC if it was shut down by power loss. Actually, recent motherboards can enable WOL functionality even after a power loss; you can configure this feature in motherboard’s BIOS:&lt;br /&gt;
[[File:BIOSSetup2.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
Magic Packet:&lt;br /&gt;
The wake command is issued sending on the network a specific packet, called Magic Packet (refer to http://en.wikipedia.org/wiki/Wake-on-LAN#Magic_packet). This packet is receved by all the devices connected to local network because it presents – as destination MAC address – the broadcast address (FF:FF:FF:FF:FF:FF). It includes six bytes valued FF, followed by the target PC’s MAC address repeated 16 times.&lt;br /&gt;
&lt;br /&gt;
Even if it’s not important which high level protocols you choose, it’s a convention to use UDP protocol and destionation port 7 or 9.&lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
*Microduino-ENC28J60&lt;br /&gt;
*Microduino-RJ45&lt;br /&gt;
*Microduino-Core&lt;br /&gt;
*Microduino-FT232R&lt;br /&gt;
&lt;br /&gt;
Stack all modules and then connect the ethernet cable, as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:MicroduinoENCShow.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
Refer to ENCnetwork4&lt;br /&gt;
&lt;br /&gt;
==Debug==&lt;br /&gt;
&lt;br /&gt;
Step 1：Download the EtherCard library and copy to your libraries fold of IDE, then restart IDE.&lt;br /&gt;
https://github.com/jcw/ethercard&lt;br /&gt;
&lt;br /&gt;
Step 2：Explain the program：&lt;br /&gt;
Note: EtherCard library had a bug in the Magic Packet creation. I solved the problem and my change has been accepted in the official repository: so make sure to download library’s latest version&lt;br /&gt;
&lt;br /&gt;
You can use sendWol() method to send the Magic Packet; that method needs target PC’s MAC address as a parameter:&lt;br /&gt;
&lt;br /&gt;
    static byte targetmac[] = {0x00,0x1A,0x4B,0x38,0x0F,0x5C};&lt;br /&gt;
    ...&lt;br /&gt;
    ether.sendWol(targetmac);&lt;br /&gt;
&lt;br /&gt;
Step 3：Compile the code and download it.&lt;br /&gt;
&lt;br /&gt;
Step 4：Using a network analysis tool like Wireshark, you can inspect the packet sent by Microduino and note that it’s correct:&lt;br /&gt;
&lt;br /&gt;
in red the destination broadcast MAC address&lt;br /&gt;
in green the choice of IP and UDP protocol&lt;br /&gt;
in light blue the target PC’s MAC address repeated 16 times&lt;br /&gt;
&lt;br /&gt;
[[File:Wireshark.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
You PC will be waken by Microduino.&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	</feed>