WorldofASP.NET : ASP.NET Directory, Tutorial, Hosting, and Source Code
You are 1 of 248 users


Wake-on-LAN from a .NET Micro Framework Device

Blogger : Ajax.NET Professional - AJAX and JSON made easy!
All posts : All posts by Ajax.NET Professional - AJAX and JSON made easy!
Category : AJAX
Blogged date : 2008 Mar 09

Well, I love the easy development of embedded devices with the .NET Micro Framework. As the device I'm currently using is really small I tried to build a small Web site on it to start my private servers at home using Wake-on-LAN. You'll find a lot of helper methods samples on the Internet but I couldn't find on source code that was working on the .NET Micro Framework. The problem is that there are too many missing methods or enum values.

Here is the source code I'm using now which is working.

public static void WakeUp(byte[] mac) { using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)) { IPEndPoint endPoint = new IPEndPoint(new IPAddress(4294967295), 40000); // IP 255.255.255.255 socket.Connect(endPoint); byte[] packet = new byte[17 * 6]; for (int i = 0; i < 6; i++) packet[i] = 0xFF; for (int i = 1; i <= 16; i++) for (int j = 0; j < 6; j++) packet[i * 6 + j] = mac[j]; socket.Send(packet); } }

Using my Web server (which I will publish this week at http://www.codeplex.com/ajaxnetmicro) including the Ajax.NET M! library it is really cool to connect to the .NET Micro Framework enabled device from outside and start your servers as you need.


Read comments or post a reply to : Wake-on-LAN from a .NET Micro Framework Device
Page 639 of 1924
Next | Last

.NET News Categories








Legend : - Within 3 Days - Within 6 Days - Within 9 Days

Home | Add Resources | Sponsored Listings | Advertise with Us | SiteMap 1 | SiteMap 2 | Link To Us | Contact Us
© 2002-2008 Worldofasp.net ASP.NET Directory, Hosting and Tutorials | All rights reserved
Our Partners : ASP.NET Web Hosting | Windows Web Hosting | ASP.NET Hosting | Phone Card | PHP Directory | Bangkok Hotels |Calling Card