News:

  • April 30, 2026, 11:29:20 AM

Login with username, password and session length

Author Topic: Wake on LAN/Magic Packet  (Read 28724 times)

scottsutton

  • Full Member
  • ***
  • Posts: 46
Wake on LAN/Magic Packet
« on: September 22, 2025, 08:20:52 AM »
Just curious if there is any way possible that a Do-More PLC on a network could be used to wake up a sleeping PC on the same network (with a fixed IP address) using the magic packet protocol? I have an application where I need to embed a fanless industrial PC within a machine and I want to be able to wake it up for a task and then shut it back down again.

Thanks,
SS

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: Wake on LAN/Magic Packet
« Reply #1 on: September 22, 2025, 09:04:29 AM »
There is a PING instruction.  Would your PC wake up on a PING to its IP Address?

scottsutton

  • Full Member
  • ***
  • Posts: 46
Re: Wake on LAN/Magic Packet
« Reply #2 on: September 22, 2025, 09:36:23 AM »
I looked and my Network Adapter and only supports wake on Magic Packet, I see where some adapters do support the ping option but not mine unfortunately.


franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: Wake on LAN/Magic Packet
« Reply #3 on: September 22, 2025, 10:23:34 AM »
I looked and my Network Adapter and only supports wake on Magic Packet, I see where some adapters do support the ping option but not mine unfortunately.

Sorry - I misunderstood.  Magic Packet is an actual protocol.  Do-more does not support that.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Wake on LAN/Magic Packet
« Reply #4 on: September 22, 2025, 02:50:14 PM »
I looked and my Network Adapter and only supports wake on Magic Packet, I see where some adapters do support the ping option but not mine unfortunately.
OK, so I just learned about the "Magic Packet." And it looks to me like it may be possible to do this with a PACKETOUT instruction.

The "Magic Packet" is just 102 bytes. The first six bytes are all FFs. The next 96 bytes are just the MAC address of the device you want to wake up, repeated 16 times. And you would send the packet out to address 255.255.255.255 at UDP port 7 or 9. So, if your the MAC address of the device you want to wake up is hexadecimal 11:22:33:44:55:66, then the data you send in the single packet is (in hexadecimal):

ff ff ff ff ff ff 11 22 33 44 55 66 11 22 33 44 55 66 ... 11 22 33 44 55 66

I haven't tried this. But it sounds feasible. Worth a try.
There are two types of people in the world; those that can extrapolate from incomplete data sets.