PC Review


Reply
Thread Tools Rate Thread

How can I broadcast a WakeOnLan datapacket?

 
 
=?Utf-8?B?UCBXaGVsZG9u?=
Guest
Posts: n/a
 
      8th Nov 2007
How can I broadcast a WakeOnLan datapacket?

Tried using Sockets but compact framework does not support broadcasting nor
connectionless sending .

Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to load
when using reflection.

Any suggestions?

 
Reply With Quote
 
 
 
 
im.djmatty@googlemail.com
Guest
Posts: n/a
 
      8th Nov 2007
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?
>
> Tried using Sockets but compact framework does not support broadcasting nor
> connectionless sending .
>
> Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to load
> when using reflection.
>
> Any suggestions?



 
Reply With Quote
 
=?Utf-8?B?UCBXaGVsZG9u?=
Guest
Posts: n/a
 
      8th Nov 2007
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.

"(E-Mail Removed)" wrote:

> 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?
> >
> > Tried using Sockets but compact framework does not support broadcasting nor
> > connectionless sending .
> >
> > Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to load
> > when using reflection.
> >
> > Any suggestions?

>
>
>

 
Reply With Quote
 
=?Utf-8?B?UCBXaGVsZG9u?=
Guest
Posts: n/a
 
      8th Nov 2007
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.

"(E-Mail Removed)" wrote:

> 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?
> >
> > Tried using Sockets but compact framework does not support broadcasting nor
> > connectionless sending .
> >
> > Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to load
> > when using reflection.
> >
> > Any suggestions?

>
>
>

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      8th Nov 2007
That's the problem. You've opened a stream socket, not a datagram socket.
You want SocketType.Dgram, not stream.

Paul T.

"P Wheldon" <(E-Mail Removed)> wrote in message
news:954481FE-1A6A-455A-A130-(E-Mail Removed)...
> 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.
>
> "(E-Mail Removed)" wrote:
>
>> 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?
>> >
>> > Tried using Sockets but compact framework does not support broadcasting
>> > nor
>> > connectionless sending .
>> >
>> > Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to
>> > load
>> > when using reflection.
>> >
>> > Any suggestions?

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?UCBXaGVsZG9u?=
Guest
Posts: n/a
 
      8th Nov 2007
I've got a bit further thanks, helps if the socket is Dgram UDP.

"(E-Mail Removed)" wrote:

> 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?
> >
> > Tried using Sockets but compact framework does not support broadcasting nor
> > connectionless sending .
> >
> > Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to load
> > when using reflection.
> >
> > Any suggestions?

>
>
>

 
Reply With Quote
 
=?Utf-8?B?UCBXaGVsZG9u?=
Guest
Posts: n/a
 
      8th Nov 2007
Yep.


thankyou Paul

"Paul G. Tobey [eMVP]" wrote:

> That's the problem. You've opened a stream socket, not a datagram socket.
> You want SocketType.Dgram, not stream.
>
> Paul T.
>
> "P Wheldon" <(E-Mail Removed)> wrote in message
> news:954481FE-1A6A-455A-A130-(E-Mail Removed)...
> > 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.
> >
> > "(E-Mail Removed)" wrote:
> >
> >> 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?
> >> >
> >> > Tried using Sockets but compact framework does not support broadcasting
> >> > nor
> >> > connectionless sending .
> >> >
> >> > Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to
> >> > load
> >> > when using reflection.
> >> >
> >> > Any suggestions?
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Guest
Posts: n/a
 
      8th Nov 2007
Something like this?

http://blog.opennetcf.org/ctacke/Per...f61ffc21b.aspx


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com



"P Wheldon" <(E-Mail Removed)> wrote in message
news:78FCA545-90FC-404E-A969-(E-Mail Removed)...
> How can I broadcast a WakeOnLan datapacket?
>
> Tried using Sockets but compact framework does not support broadcasting
> nor
> connectionless sending .
>
> Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to load
> when using reflection.
>
> Any suggestions?
>



 
Reply With Quote
 
=?Utf-8?B?UCBXaGVsZG9u?=
Guest
Posts: n/a
 
      9th Nov 2007
Yep

"<ctacke/>" wrote:

> Something like this?
>
> http://blog.opennetcf.org/ctacke/Per...f61ffc21b.aspx
>
>
> --
>
> Chris Tacke, eMVP
> Join the Embedded Developer Community
> http://community.opennetcf.com
>
>
>
> "P Wheldon" <(E-Mail Removed)> wrote in message
> news:78FCA545-90FC-404E-A969-(E-Mail Removed)...
> > How can I broadcast a WakeOnLan datapacket?
> >
> > Tried using Sockets but compact framework does not support broadcasting
> > nor
> > connectionless sending .
> >
> > Looked at IPHelper function IcmpSendEcho, but iphlpapi.dll failed to load
> > when using reflection.
> >
> > Any suggestions?
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wakeonlan works but only once Søren Windows Vista Networking 0 20th Dec 2007 05:56 PM
WakeOnLan? Tomppa Microsoft Dot NET Compact Framework 1 17th Jul 2006 05:23 AM
Which routers work with WakeOnLan? DI-524? davenetman@yahoo.com Windows XP General 3 18th Mar 2006 02:34 PM
WakeOnLAN or other auto startup options? Rich Roller Windows XP General 11 22nd Mar 2005 03:15 PM
WakeOnLan and IP conflicts with DHCP =?Utf-8?B?U2FuZHkgV29vZA==?= Microsoft Windows 2000 Networking 0 8th Dec 2004 06:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:01 PM.