NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
« Previous 1 … 50 51 52 53 54 … 193 Next »
Wake on LAN

 
  • 0 Vote(s) - 0 Average
Wake on LAN
pgoelz
Offline

Member

Posts: 57
Threads: 14
Joined: Dec 2008
#1
2009-02-12, 05:19 PM
I have my GBPVR server suspending and resuming just fine. It even wakes up when the (file sharing over wireless) client starts. However, it does not always wake up fast enough to satisfy the client, which then errors out with the dreaded red cross (requiring it to be shut down with Task Manager).

I have read most of the suspend / resume threads and have found some possible workarounds. But it would be so much nicer if GBPVR itself either waited a programmable amount of time after it tried to connect to the server or waited for the server to respond and then produced an error message if the server was not available.

Paul
pgoelz
Offline

Member

Posts: 57
Threads: 14
Joined: Dec 2008
#2
2009-02-13, 02:12 PM (This post was last modified: 2009-02-13, 02:17 PM by pgoelz.)
FWIW, as of yesterday I have a workaround running smoothly. The server wakes up and goes to sleep as needed and PVRX2 is never started on a client unless the server is responding.

On the clients (I have two), I created a batch file that is called when I want to start PVRX2. The batch file runs a command line "magic packet" program that wakes up the server. It then pings the server by name (so I can still use DHCP). Following the ping attempt, it evaluates errorlevel and if errorlevel 0 (ie., the server is responding), it starts PVRX2.EXE. If errorlevel is not 0 (ie., the server is NOT responding), it just aborts. Works great and I can stick with DHCP since the magic packet program only needs the MAC address of the NIC, not its IP (the server is on the same LAN as the client). I'm just thinking it would be a lot simpler (and easy?) to roll all this into PVRX2 itself.

Paul
dalabera
Offline

Member

Posts: 93
Threads: 14
Joined: Dec 2008
#3
2009-02-23, 08:20 PM
Please post your script....Smile
fuzzweed
Offline

Posting Freak

Posts: 1,210
Threads: 200
Joined: May 2006
#4
2009-02-24, 07:51 AM (This post was last modified: 2009-02-24, 04:44 PM by fuzzweed.)
Try this. I'm not a coder (probably obviously Smile), just stuck bits together I found via google. I think it works, but feel free to tidy up anything that doesn't look right.
wol.exe needs to be downloaded off t'internet. MACADDRESS and SERVER obviously need replacing with your correct details.

Code:
set start=0
set end=3
wol MACADDRESS

:ping
ping SERVER | find "Reply" > NULL
if errorlevel=1 goto loop
echo server found
C:\Progra~1\devnz\GBPVR\PVRX2.exe
exit

:loop
if %start%==%end% goto stop
set /a start=%start%+1
goto ping

:stop
echo server not online
[SIZE="1"]Server: Win7 N | AMD Phenom II X4 3.2GHz | 4Gig RAM | Gigabyte GA-MA770-DS3 Mobo | 5TB+ HDDs | 2x BlackGold Twin HD DVB-T| ATI HD 5450 | Cambridge Audio DAC Magic
Client 1: OpenElec / XBMC | Dell GX280 P4 3.4GHz |2Gig RAM | ATI HD 5450 | SPDIF pass through
Client 2: OpenElec / XBMC | Dell GX280 P4 3.4GHz |2Gig RAM | ATI HD 5450 | C-MEDIA USB DAC
Android: Samsung Galaxy S2 GT-I9100 4.4.2 Cyanogenmod 11[/SIZE]
pgoelz
Offline

Member

Posts: 57
Threads: 14
Joined: Dec 2008
#5
2009-03-29, 12:54 AM
Sorry, missed the request to post my batch file.... here is what I am currently using.

cd c:\GBPVR startup [where the batch file is located on my client machine]
mc-wol [insert your server NIC MAC address here]
ping Ham [the network name of my HTPC]
if errorlevel 1 goto :oops
cd c:\Program Files (x86)\Devnz\GBPVR
start PVRX2.exe
exit
:oops
@echo
@echo
@echo Server HAM not found


Note that I can issue the ping command in this format without using the IP address. this means I do not have to hard code he server IP. If the server is not awake or does not wake up fast enough, the batch just terminates without starting PVRX2. If ther server is awake, PVRX2 is started. I have not tried looping.... it should work though.

Paul
Innocence
Offline

Junior Member

Posts: 31
Threads: 3
Joined: Dec 2008
#6
2009-03-30, 06:06 AM
Note that many network cards today can be configured to wake up the PC on any network activity, not just WOL magic packets. This means a simple PING will be enough to wake it up.

fuzzweed Wrote:
Code:
ping SERVER | find "Reply" > NULL
Users of non-English Windows should note that you need to replace the word "Reply" with the one used by your language of Windows, ie. in Danish Ping returns "Svar fra 127.0.0.1" instead of "Reply from 127.0.0.1".

Also note that in your script the PING will run 4 seconds before checking for status. If you change the line to
Code:
ping -n 1 SERVER | find "Reply" > NULL
, it'll only run for less than 1 second before checking and starting PVRX2.

Very classic script btw., even got retries and timeout values Smile
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#7
2009-03-30, 10:01 AM
Innocence Wrote:Note that many network cards today can be configured to wake up the PC on any network activity, not just WOL magic packets. This means a simple PING will be enough to wake it up.

Although I found that my server stayed awake most of the time and if it ever went to sleep, woke up again very soon. Too much traffic from other devices for me using this method.
Innocence
Offline

Junior Member

Posts: 31
Threads: 3
Joined: Dec 2008
#8
2009-03-30, 05:56 PM
martint123 Wrote:Although I found that my server stayed awake most of the time and if it ever went to sleep, woke up again very soon. Too much traffic from other devices for me using this method.
True, that can be a problem.
liteswap
Offline

Senior Member

Posts: 713
Threads: 70
Joined: Aug 2006
#9
2009-04-03, 09:32 AM
The trick here is to set the power management settings of the network card to only allow management stations to wake it up - ie magic packets. The rest get ignored.
- Silent client PVR: HDPlex HS.1 aluminium fanless case / Thin-ITX ASRock H81TM-ITX motherboard / Intel Celeron 1850T CPU / 4GB RAM / 120GB SSD / TBS6982 DBS-S2 [SIZE=1]dual-tuner card / Win10+nPVR+Plex Media Player feeding LG OLED55B6V + Anthem MRX510 AV Receiver / PMC GB1 / B&W / REL speakers.
- Noisy NAS: Xeon / Intel mobo / 16GB RAM / FreeNAS + Ubuntu VMs on VMware ESXi + 12TB RAID
[/SIZE] running Plex Media Server

« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Better client / server communication. Wake on LAN? Dave_M 4 2,926 2009-03-24, 05:54 PM
Last Post: fuzzweed
  Wake, and stay that way capone 9 3,325 2005-11-01, 03:41 PM
Last Post: capone
  LED status monitor / IR wake up alex060670 5 3,144 2005-10-15, 08:11 PM
Last Post: mikaelgu

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode