PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
How can I broadcast a WakeOnLan datapacket?
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
How can I broadcast a WakeOnLan datapacket?
![]() |
How can I broadcast a WakeOnLan datapacket? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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? |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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. "im.djmatty@googlemail.com" 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? > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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. "im.djmatty@googlemail.com" 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? > > > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
That's the problem. You've opened a stream socket, not a datagram socket.
You want SocketType.Dgram, not stream. Paul T. "P Wheldon" <PWheldon@discussions.microsoft.com> wrote in message news:954481FE-1A6A-455A-A130-E3075D4D7592@microsoft.com... > 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. > > "im.djmatty@googlemail.com" 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? >> >> >> |
|
|
|
#6 |
|
Guest
Posts: n/a
|
I've got a bit further thanks, helps if the socket is Dgram UDP.
"im.djmatty@googlemail.com" 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? > > > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
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" <PWheldon@discussions.microsoft.com> wrote in message > news:954481FE-1A6A-455A-A130-E3075D4D7592@microsoft.com... > > 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. > > > > "im.djmatty@googlemail.com" 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? > >> > >> > >> > > > |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Something like this?
http://blog.opennetcf.org/ctacke/Pe...3f61ffc21b.aspx -- Chris Tacke, eMVP Join the Embedded Developer Community http://community.opennetcf.com "P Wheldon" <PWheldon@discussions.microsoft.com> wrote in message news:78FCA545-90FC-404E-A969-C088CC461AD1@microsoft.com... > 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? > |
|
|
|
#9 |
|
Guest
Posts: n/a
|
Yep
"<ctacke/>" wrote: > Something like this? > > http://blog.opennetcf.org/ctacke/Pe...3f61ffc21b.aspx > > > -- > > Chris Tacke, eMVP > Join the Embedded Developer Community > http://community.opennetcf.com > > > > "P Wheldon" <PWheldon@discussions.microsoft.com> wrote in message > news:78FCA545-90FC-404E-A969-C088CC461AD1@microsoft.com... > > 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? > > > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

