LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wake on Lan

Hi!
I would like to use the UDP protocol to send "magic packets" in order to turn on my PC using the Wake on Lan option of my ethernet board. The protocol is : 6 bytes of FFh followed by 16 repetitions of the MAC adress of the target computer. Which seems pretty simple.

I tried several ways to do it and checked that the option is valid into the BIOS. The packets seem to be sent but the computer never wakes up...

Does somebody has an idea ?


CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 13
(6,853 Views)
Hi,

I've done this in the past and I noticed that it mostly works only if both computers are on the same switch, as soon as more network nodes are added between the computers the message does not arrive.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 13
(6,849 Views)
Dear Ton,

Thank you for your answer. Indeed the computer I'm trying to control is part of a large network.
Nevertheless, I downloaded a spy to check the messages sent from my computer over the network and it appears that the packets sent by the UDP write function are based on ARP protocol and not UDP... which seems wired !!! I tried with a software specialized in waking up Pc's on LAN and its message is send following the UDP protocol.

Is there a kind of bug in the labview UDP functions or am I misusing them ?
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 13
(6,831 Views)

Have you checked the switch to make sure that the PC that is offline still connected to the switch (logically)? Some of the PC will not power the NIC connection. This in turn some switches will then disconnect the network connection within the switch or drop the ip address in the table. When this happens, a packet being sent is dropped within the switch. The switch no longer no where to send the package.

You can check this by (not  a sure thing) pinging the ip address and see if it comes back as unreachable.

Message 4 of 13
(6,828 Views)
I tried a similar thing a few months back and had the same problem, I downloaded a command line WOL program and wrote a batch file to use it.  Then I called the batch from System Exec.

You do need to have both machines on the same subnet, I think there are some utilities the will allow you to specify the network and subnet.

http://www.matcode.com/wol.htm

Use at your own risk, I haven't tried this one, If I can dig up the utility I used I'll pass it along.

Good Luck

later
cp

Message 5 of 13
(6,815 Views)
Dear Joseph,

thanks for your answer.The software speciliazed in waking up Pc's on LAN perfectly does its job. So I don't think that the switch is blocking the packets I'm sending. I think it's more a probleme of protocol : I'm not sure that the packets are really sent using UDP...
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 6 of 13
(6,801 Views)
Hi!

Can U send your vi's code?

Regards.
0 Kudos
Message 7 of 13
(6,786 Views)
Here it is !
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
Message 8 of 13
(6,770 Views)
up ! Robot wink
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 9 of 13
(6,739 Views)

I observed the same problem. Solution: use the broadcast address of your local network instead of the computer IP (in your code 192.168.126.255 instead of 192.168.126.44).

Matthias

Message 10 of 13
(6,544 Views)