Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Can I construct a "Magic Packet" for Wake On Lan in DBPro?

Author
Message
Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 4th Jan 2015 11:55
Hello My router can send a magic packet to my server whenever a request is made on its specific port, which means my software will wake up my server, and unfortunately any other/random pings/requests. Can I construct a magic packet in DBPro containing the MAC address and then bombard my router with this packet until my server wakes up?

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 4th Jan 2015 12:27
Quote: "
Magic packet[edit]

The magic packet is a broadcast frame containing anywhere within its payload 6 bytes of all 255 (FF FF FF FF FF FF in hexadecimal), followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102 bytes.

Since the magic packet is only scanned for the string above, and not actually parsed by a full protocol stack, it may be sent as any network- and transport-layer protocol, although it is typically sent as a UDP datagram to port 7 or 9, or directly over Ethernet as EtherType 0x0842.[6]

A standard magic packet has the following basic limitations:
Requires destination computer MAC address (also may require a SecureOn password)
Does not provide a delivery confirmation
May not work outside of the local network
Requires hardware support of Wake-On-LAN on destination computer
Most 802.11 wireless interfaces do not maintain a link in low power states and cannot receive a magic packet

The Wake-on-LAN implementation is designed to be very simple and to be quickly processed by the circuitry present on the network interface card with minimal power requirement. Because Wake-on-LAN operates below the IP protocol layer the MAC address is required and makes IP addresses and DNS names meaningless.
"


http://en.wikipedia.org/wiki/Wake-on-LAN

Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 23rd Jan 2015 10:45
Well, now I can at least send Wake on LAN packets from another computer on the network with a DB Pro program I can see the problem with internet magic packets :-P The software I have that needs to Wake on LAN will have a lobby server running 24/7 anyway The internet Wake on LAN/WAN would just have been nice for my chess server as we are only two players there

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Jan 2015 11:58
Can you show how you got it working?

Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 23rd Jan 2015 15:18
Yes I simply use a command line tool which I execute with MAC address and subnet IP. Here is URL for the command line tool: http://www.depicus.com/wake-on-lan/wake-on-lan-cmd.aspx

Here is some very simple code:
execute file "wolcmd.exe","90e6ba5bab00 255.255.255.255 255.255.255.255","\"

Now my lobby server can wake up more servers if needed. I will make a .txt config file with MAC adresses for the game servers. I will make my own remote control command line tool that can instruct the lobby server to re-read the config file so I can update and add servers to the cluster live without any servers going offline for the update

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Jan 2015 15:54
Thank you, I will add this to my Repository as a handy info link!

Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 23rd Jan 2015 16:50
Awesome =^_^= I am glad that I could be of any use

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...

Login to post a reply

Server time is: 2026-07-06 22:21:21
Your offset time is: 2026-07-06 22:21:21