Can't you send the packet to the subnets broadcast address? (http://
en.wikipedia.org/wiki/Broadcast_address)
Compact Framework does support connectionless sending, via the
Socket.SendTo method, I seem to recall I had WOL working on my WM5
device, but my router does not allow packets from the internet to the .
255 address on the LAN, so I couldn't actually turn on my machine from
the internet, although it worked great when I was connected via my
WLAN.
Matt
On Nov 8, 1:33 pm, P Wheldon <PWhel...@discussions.microsoft.com>
wrote:
> How can I broadcast a WakeOnLan datapacket?
>
[quoted text clipped - 5 lines]
>
> Any suggestions?
P Wheldon - 08 Nov 2007 14:26 GMT
I will give this a go.
I have tried SendTo using ip 255.255.255.255 as the EndPoint, but it failed.
Not sure of the exception though.
> Can't you send the packet to the subnets broadcast address? (http://
> en.wikipedia.org/wiki/Broadcast_address)
[quoted text clipped - 19 lines]
> >
> > Any suggestions?
P Wheldon - 08 Nov 2007 15:01 GMT
this is the reported error
error code 10057
A request to send or receive data was disallowed because the socket is not
connected and (when sending on a datagram socket using a sendto call) no
address was supplied.
This happens on the local bradcast and also loopback addresses.
Socket address family is internetwork, type is stream and protocol is TCP.
Have tried raw data stream and UDP protocol, but the sockect fails to
initlise. SendTo flags does not allow broadcast.
> Can't you send the packet to the subnets broadcast address? (http://
> en.wikipedia.org/wiki/Broadcast_address)
[quoted text clipped - 19 lines]
> >
> > Any suggestions?
Paul G. Tobey [eMVP] - 08 Nov 2007 15:19 GMT
That's the problem. You've opened a stream socket, not a datagram socket.
You want SocketType.Dgram, not stream.
Paul T.
> this is the reported error
> error code 10057
[quoted text clipped - 33 lines]
>> >
>> > Any suggestions?
P Wheldon - 08 Nov 2007 15:26 GMT
Yep.
thankyou Paul
> That's the problem. You've opened a stream socket, not a datagram socket.
> You want SocketType.Dgram, not stream.
[quoted text clipped - 38 lines]
> >> >
> >> > Any suggestions?
P Wheldon - 08 Nov 2007 15:21 GMT
I've got a bit further thanks, helps if the socket is Dgram UDP.
> Can't you send the packet to the subnets broadcast address? (http://
> en.wikipedia.org/wiki/Broadcast_address)
[quoted text clipped - 19 lines]
> >
> > Any suggestions?
Something like this?
http://blog.opennetcf.org/ctacke/PermaLink,guid,8a2b4fa0-3ab1-4ddf-b5d2-893f61ff
c21b.aspx

Signature
Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com
> How can I broadcast a WakeOnLan datapacket?
>
[quoted text clipped - 6 lines]
>
> Any suggestions?
P Wheldon - 09 Nov 2007 09:47 GMT
Yep
> Something like this?
>
[quoted text clipped - 10 lines]
> >
> > Any suggestions?