Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Anyone using NVRAM Wakeup / auto powerdown / WOL



Ralf Spachmann schrieb:
> 
> Hi all,
> 
> I am fighting with my VDR-Box since weeks to make
> it power off/on using nvram-wakeup and VDR-Timers.
> 
> I had contact to several programmers of nv-ram tools
> but no solutions.
> 
> So I am asking: Is anyone out there who has
> this automatic business running on a Gigabyte GA 7ZXE
> board ?
> 
> Furthermore I'd like to use WOL with d-link 530TX and
> could not find helpful info on the web.
> WOL is a good idea to remote-power-on my machine
> when I want to programm the VDR from work ;-)
> (in case the auto-powerdown would work sometimes)
I use NVRAM poweron on a PA-5 (K6, Super Socket 7).

Here is an excerpt of my program. It takes the parameter from VDR, does
some sanity checking and does something like this:

  restart -= 5*60;
  restart_tm = localtime(&restart);
  printf("Restart at:  %s",asctime(restart_tm));

  rtc_tm.tm_mday = restart_tm->tm_mday;
  rtc_tm.tm_mon  = restart_tm->tm_mon;
  rtc_tm.tm_year = restart_tm->tm_year;
  rtc_tm.tm_hour = restart_tm->tm_hour;
  rtc_tm.tm_min  = restart_tm->tm_min;
  rtc_tm.tm_sec  = restart_tm->tm_sec;

  printf("setting RTC: %d:%d:%d\n",
         rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);

  retval = ioctl(fd, RTC_ALM_SET, &rtc_tm);
  if (retval == -1) {
    perror("ioctl(RTL_ALM_SET)");
    exit(errno);
  }

  /* Enable alarm interrupts */
  retval = ioctl(fd, RTC_AIE_ON, 0);
  if (retval == -1) {
    perror("ioctl(RTC_AIE_ON)");
    exit(errno);
  }

  printf("RTC Alarm: enabled.\n");

For the WOL: "wakelan" seems to work, but better google for wake on lan
linux.

Andreas


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index