Wake On Lan with REBOL ?
[1/4] from: ronaldoff::free::fr at: 28-Feb-2004 2:10
Hi Rebolers,
Did someone try to make a wake on Lan , with REBOL ?
How can I send the physical adress of the target NIC ?
I know I have to use UDP protocol, and I tested this :
data: "00:D0:09:AD:71:F4" ; <---- is this correct ?? (physical remote NIC address)
i: 0
repeat i 16 [ ; when sending 16 times it's physical address, the target NIC should awake
connection: open udp://255.255.255.255:54000
set-modes connection [ broadcast: true ]
insert connection data
print rejoin ["sending " i]
close connection
]
But nothing happens on remote computer
[2/4] from: antonr:iinet:au at: 1-Mar-2004 0:28
Just a guess, but are you sure that
the connection should be opened and closed 16 times
as well ?
I suspect that the NIC address should be binary (6 bytes),
no ":" characters.
So try #{00D009AD71F4}
Also try reversing the byte order, sending it completely
in reverse order etc.
Anton.
[3/4] from: ronaldoff::free::fr at: 8-Apr-2006 19:12
Wake on lan ... long time ago question ...
Hi Rebolers,
I posted a long time ago this question :
==========================
==========================
=====================
ronaldoff::free::fr at: 28-Feb-2004 2:10
Hi Rebolers, Did someone try to make a wake on Lan , with REBOL ? How can I send
the physical adress of the target NIC ? I know I have to use UDP protocol, and I
tested this : data: "00:D0:09:AD:71:F4" ; <---- is this correct ?? (physical
remote NIC address) i: 0 repeat i 16 [ ; when sending 16 times it's physical
address, the target NIC should awake connection: open
udp://255.255.255.255:54000 set-modes connection [ broadcast: true ] insert
connection data print rejoin ["sending " i] close connection ] But nothing
happens on remote computer
==========================
==========================
=====================
Anton answered :
antonr::iinet::net::au at: 1-Mar-2004 0:28
Just a guess, but are you sure that the connection should be opened and closed
16 times as well ? I suspect that the NIC address should be binary (6 bytes),
no ":" characters. So try #{00D009AD71F4} Also try reversing the byte order,
sending it completely in reverse order etc. Anton.
==========================
==========================
=====================
He was right, thanx to him, here is my solution :
==========================
==========================
=====================
rebol[]
data: {}
connection: open udp://172.16.255.255:40000 ; my subnet : 172.16.0.0 mask
255.255.0.0
set-modes connection [ broadcast: true ]
mac: load #{0003471A239A} ;MAC address of remote host to awake
; when sending 16 times it's physical address, the target NIC should awake
; preparing data to send : macmacmacmac... 16 x
i: 1
repeat i 16 [ append data mac ]
insert connection data
close connection
==========================
==========================
=====================
Bye, hope someone will enjoy !
Ronald GRUSS
[4/4] from: anton::wilddsl::net::au at: 9-Apr-2006 16:54
Thanks Ronald ! Glad to know it worked, and thanks
for sending the working code.
Anton.