INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Wake on Lan (WOL)  (Read 5353 times)

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72407
  • Where did I put my teeth?
Wake on Lan (WOL)
« on: January 16, 2020, 06:35:45 pm »

Hendrik added Wake on Lan to JRemote2, so I spent some time testing tonight.  I also learned a lot, much of which I'd forgotten.

The basics first.

Wake on LAN is a protocol that allows one device to wake another.

It uses port 9 and UDP to do that so the firewall on the target device needs to allow that.

The network adaptor also has to allow it.  Control Panel > Device Manager > Network Adaptors (and find the one you want), then Properties and turn on all WOL (Magic Packet ...)

I'd try to explain more, but this site gave me what I needed:
https://www.cnetsys.com/how-to-enable-wake-on-lan-wol-windows-7/

That included opening the Windows firewall for port 9 on UDP.

When I couldn't get it working, I downloaded an app for Android to make sure the target PC was set correctly.  It was called WolOn - Wake on LAN and it worked right away.

It gave me the clue I needed though to get JRemote2 to work.  Mac address.  Yes, I should have known.

Once I found the Mac address on the target PC (by using CMD > IPConfig /all) I entered it in JRemote2 and the WOL button there worked. 
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10925
Re: Wake on Lan (WOL)
« Reply #1 on: January 17, 2020, 12:07:33 am »

Once I found the Mac address on the target PC (by using CMD > IPConfig /all) I entered it in JRemote2 and the WOL button there worked.

If you use an Access Key to connect from JRemote to MC, then this should automatically convey the MAC Address, to help avoid manual data entry! :)
Logged
~ nevcairiel
~ Author of LAV Filters

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72407
  • Where did I put my teeth?
Re: Wake on Lan (WOL)
« Reply #2 on: January 17, 2020, 09:30:56 am »

If you use an Access Key to connect from JRemote to MC, then this should automatically convey the MAC Address, to help avoid manual data entry! :)
How about showing an error message when the poor user (me) tries to use WOL but no MAC address has been entered?  Or require its entry when using just the IP.
Logged

syndromeofadown

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 812
Re: Wake on Lan (WOL)
« Reply #3 on: January 18, 2020, 04:29:57 pm »

A workaround to manually entering a MAC address is to use an Access Key when setting up the server. After it connects you can remove the Access Key and replace it with an IP address. The MAC address will be filled in. When doing this I had about five MAC addresses that were added so I deleted all but the first one in order to make WOL work.
Logged

stricko

  • Galactic Citizen
  • ****
  • Posts: 426
Re: Wake on Lan (WOL)
« Reply #4 on: May 06, 2020, 10:44:57 pm »

I've just reconfigured some of my network with fixed ip addresses, and then used a url to access my server library. No WOL!! This explains it......
Logged

stricko

  • Galactic Citizen
  • ****
  • Posts: 426
Re: Wake on Lan (WOL)
« Reply #5 on: May 06, 2020, 11:04:11 pm »

A workaround to manually entering a MAC address is to use an Access Key when setting up the server. After it connects you can remove the Access Key and replace it with an IP address. The MAC address will be filled in. When doing this I had about five MAC addresses that were added so I deleted all but the first one in order to make WOL work.

How do you change the access key to an ip address (i presume on the client side) for an existing library. The only way i could see was to create a new library .
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #6 on: May 07, 2020, 01:00:38 am »

The only way i could see was to create a new library .

That's it.

Well, on the Client, which means that all you are doing is creating a new connection to the existing MC Server Library.

For example, I have two connections defined in my Client for the MC Server. One uses the Access Key, then other uses a direct IP Address:Port connection. Both work. The Access Key method works better, but is reliant on an internet connection.


PS: By "fixed IP Addresses" I hope you mean IP Address Reservation (sometimes called Static Leases), because IP Address Reservation is better than fixed Static IP Addresses.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

stricko

  • Galactic Citizen
  • ****
  • Posts: 426
Re: Wake on Lan (WOL)
« Reply #7 on: May 07, 2020, 02:50:07 am »

Thanks. I'm using genuinely fixed addresses ,outside the dhcp range. From what i'd read, there were different opinions on the reservation vs fixed debate. Probably the last thing i read said that fixed was appropriate for servers, nas, etc.

Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #8 on: May 07, 2020, 07:20:39 am »

DLNA seems to work better if the IP Addresses of all components are issued by the one DHCP server, which would be on your router at home normally.

It means that the router is aware of the devices and their IP Addresses without having to discover them on the network, which the router has to do if Static IP Addresses are set at the device.

If you are just setting Static IP Addresses in the router, that is equivalent to IP Address Reservation, and is fine.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Wake on Lan (WOL)
« Reply #9 on: May 07, 2020, 01:43:04 pm »

I just tested and yippikayee JRemote waked my MC library server PC. However my video files are all in my actual server PC so can MC in turn wake up that server machine or is WOL JRemote only feature? (Probably my server OS just don't have WoL enabled...)
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #10 on: May 07, 2020, 05:57:28 pm »

Lepa, if you mean:

JRemote > MC Client PC which opens a MC Server Library > MC Server PC

Then yes, that should work. But I've never tried it, and JRemote might time out before the Server PC wakes and is ready. So you might have to try a couple of time in JRemote before the whole chain wakes up.

When I am using those three components I tend to go:
JRemote2 > MC Server,
and then play to the Client, which I have to wake, or already have awake. A Server won't wake a Client to play to it, as the Client needs to be awake first for the Server to see it.

EDIT:
Oh wait. You mean you are going.

JRemote > MC Library Server > Video File Server PC

That last step would depend entirely on the set up of the PC that runs your MC Library Server and your File Server setup. I would hope that a File Server that is allowed to sleep would automatically wake when files are requested from it, but you will need to configure that outside MC.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Wake on Lan (WOL)
« Reply #11 on: June 27, 2020, 10:25:12 am »

Oh wait. You mean you are going.

JRemote > MC Library Server > Video File Server PC

That last step would depend entirely on the set up of the PC that runs your MC Library Server and your File Server setup. I would hope that a File Server that is allowed to sleep would automatically wake when files are requested from it, but you will need to configure that outside MC.
Thanks Rod,
Yep my setup is Windows PC which is running MC and linux PC which is just hosting files for MC on Windows. I can now start my linux file server from router by sending "wake up" from router's WebGUI. Just trying to access that linux network share from windows PC doesn't trigger wake up though... Need to do some reading about this...
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Wake on Lan (WOL)
« Reply #12 on: June 27, 2020, 10:31:01 am »

I can also wake up file server with another linux laptop with command wakeonlan <MAC>. So does it mean that MC should also try to send magic packet when of tries to access file and it would need file server's MAC address for that?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #13 on: June 27, 2020, 05:53:03 pm »

I don't think it is reasonable to expect a MC Server to send WOL packets to a File Server (Linux or otherwise). A MC Client will wake its Server, but that is as far as it goes.

So you need to work out how to have the Linux File Server wake when files are requested from it. Most NAS devices run a form of Linux, and they wake as required, or can do. It should be possible for just plain Linux. Unfortunately, my UNIX and Linux knowledge is old and forgotten, so I can't advise on that.

But yes, a Magic Packet used to wake any device must be sent to its MAC Address. That's how WOL works. You could write a script to send a wake command to the File Server and then start MC, but what happens if the File Server goes to sleep underneath MC when it is running? A better solution is to have the File Server set to wake on any file request. Or simply always have the File Server running when needed.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #14 on: June 27, 2020, 06:05:12 pm »

BTW there are many Apps for phones that can send WOL packets to a PC, so you could just run one of those before starting JRemote2.

Also, I haven't checked if it can be done (dog asleep on my lap - can't move!) but if you can set up a Server manually in JRemote2, and point that at your File Server, you could use JRemote2 to wake the File Server. So just attempt to connect to a non-existent MC Server on your File Server, and then connect to the real MC Server, all from JRemote2.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Wake on Lan (WOL)
« Reply #15 on: June 27, 2020, 06:45:51 pm »

BTW there are many Apps for phones that can send WOL packets to a PC, so you could just run one of those before starting JRemote2.

Also, I haven't checked if it can be done (dog asleep on my lap - can't move!) but if you can set up a Server manually in JRemote2, and point that at your File Server, you could use JRemote2 to wake the File Server. So just attempt to connect to a non-existent MC Server on your File Server, and then connect to the real MC Server, all from JRemote2.
I was thinking about running dummy MC server on linux file server which I could then use to trigger WoL on that machine.

Was hoping that there would be automatic way but haven't yet found how can a basic file opening on mapped drive initiate WoL. In MediaPortal there seem to be configuration where you give MAC address for sending Magic Packets.

Thanks for your time on this  :)
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #16 on: June 27, 2020, 06:55:22 pm »

My suggestion with using JRemote2 to wake a non-MC Server works.
I just added my existing MC Server again to JRemote2, manually using the IP Address. Connected, then edited the Server record to give it a new name, IP Address to point to (both Internal and External), and MAC Address in JRemote2 to point to my HTPC which was asleep. I left the Username and Password blank so that JRemote2 could actually wake and connect to the MC Server on my HTPC. JRemote2 saves the changes when you exit the Server Edit screen.

Then I turned off "Autoconnect to last server" in JRemote2 so it wouldn't try to connect to any server and send WOL commands before I wanted to. You would want to do that so JRemote2 shows the WOL buttons when you start it.

Then restarted JRemote2 and clicked the WOL button for the HTPC, and it was woken.


But I really do think it should be possible to wake a Linux PC simply by trying to access files on it. Sometimes the network hardware (NIC) needs to be left to running at a higher power state for such things to work, but if WOL is working, I would expect the hardware is already in a higher power state. So keep looking. I'm sure you will find the method. But the above trick might work in the meantime.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Wake on Lan (WOL)
« Reply #17 on: June 27, 2020, 07:25:52 pm »

Yes that works thanks, so I don't even have to set up dummy mc on file server. Maybe I could even add file server's mac address to JRemotes actual server config. There seems to be two MAC addresses already...

3 AM here and sun is shining so I'm going to sleep also. WoL in couple of hours for me.  ;D

Thanks a lot!
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #18 on: June 27, 2020, 08:26:47 pm »

Maybe I could even add file server's mac address to JRemotes actual server config. There seems to be two MAC addresses already...

That's a great idea. The Access Key method accepts multiple MAC Addresses in a comma separated list, no spaces. So maybe JRemote2 will as well.

Report if that works when you test it, as that could be a good thing to know for other users.


EDIT:
I worked out how to test that in my environment.

It doesn't work if you use the Access Key method, because the MAC Addresses are retrieved from the JRiver server.
But it does work if you use the IP Address connection method. Mind you, that will mean it doesn't work from outside your home network. But that is often problematic without leaving the servers running anyway. Wake On WAN doesn't work will all
or even many routers.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4216
Re: Wake on Lan (WOL)
« Reply #19 on: June 28, 2020, 03:24:25 am »

you may be able to use windows task scheduler to trigger a command line app to send a WOL package when the share is accessed

example app to use if you can find an event to drive it - https://www.nirsoft.net/utils/wake_on_lan.html

I guess the event will be something under Microsoft-Windows-SMBClient but probably you have to dig around the event log to see what, if anything, is logged
Logged

F Ribeiro

  • Junior Woodchuck
  • **
  • Posts: 76
  • If it isn't broken don't fix it.
Re: Wake on Lan (WOL)
« Reply #20 on: June 28, 2020, 01:52:11 pm »

There´s one thing I really dislike.

I have been using JRemote for iOS to boot and shutdown my hidden music PC.
Except for maintenance (Media Center or Windows updates), I never touch it (is hidden, doing his job, stripped as much as I could).
Media Center, of course, runs on Windows startup and WoL is set to on (bios and windows settings).

Turn it on, is as easy as open JRemote (if JRemote is already open, quit and open again for the App to send the magic packets ) and that's it (15 seconds later, Media Center is ready).
To turn it off, I have to go back to settings, select the server, scroll down to the shutdown button, passing thru all settings risking to messing with it, and press the button.

It would be so nice to have a simple shutdown button in a more accessible location, distant from settings.
I´m not the sofa (couch) potato kind, but is just that it wold be safer and simpler (perhaps not for me, but for the kids and other people in the house, who have to turn it down from times to time, never knowing where is the button, not expecting to find it in settings).

Sorry for my English.
Logged
JRiver Media Center 25 PC and MAC | PC: Dell Latitude E5250 - Windows 10 Pro | MAC: Mac Mini late 2014 - Mojave | Amp: Classe CAP-2100 | CD Player: Meridian G08.2 | DAC: Naim DAC V1 | Turntable: Linn Axis, Akito tonearm, Adikt MM | Loudspeakers: ProAc Response D28 | Cables: Transparent, Nordost | Server: Synology DS216 Play Raid 1 |

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #21 on: June 28, 2020, 05:01:38 pm »

There´s one thing I really dislike.

I'm sure there are Apps you could get to simply shutdown a PC remotely. Or you could probably even just script it on the phone.

So use JRemote to start the server, when finished, close JRemote, then tap an icon that closes the server. Easy. Google will help you find out how.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

F Ribeiro

  • Junior Woodchuck
  • **
  • Posts: 76
  • If it isn't broken don't fix it.
Re: Wake on Lan (WOL)
« Reply #22 on: June 29, 2020, 12:31:50 pm »

I'm sure there are Apps you could get to simply shutdown a PC remotely.
I know.
But for that, an application must be running on the audio PC and I want to keep it with the minimum processes and applications running in background as possible.
Logged
JRiver Media Center 25 PC and MAC | PC: Dell Latitude E5250 - Windows 10 Pro | MAC: Mac Mini late 2014 - Mojave | Amp: Classe CAP-2100 | CD Player: Meridian G08.2 | DAC: Naim DAC V1 | Turntable: Linn Axis, Akito tonearm, Adikt MM | Loudspeakers: ProAc Response D28 | Cables: Transparent, Nordost | Server: Synology DS216 Play Raid 1 |

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Wake on Lan (WOL)
« Reply #23 on: June 29, 2020, 05:59:34 pm »

I think you can do it without an App running on the PC, just using Windows Calls. But it is ages since I looked at that sort of thing, so I'm not sure. Particularly with Windows 10.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1]   Go Up