rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 1:46 am

Hi,

I have a computer connected to a router. The computer can do wake on lan, but you can only set it for one date at a time. That's fairly useless if I just want it to power on on weekdays. I'm not going into the BIOS every night and setting it for the next day.

Instead I want to use a Raspberry Pi. Or at least that's what I'm really leaning toward. I haven't come up with a better idea, short of having an entirely separate computer :roll: fire a wake on lan signal to my main computer. Raspberry Pi is cheaper.

I haven't bought a Raspberry Pi. Everything sounds very doable. I'm looking for suggestions, ideas, advice, etc. with this thread.

The setup:
Computer connected to...
router... out to isp
Then I'll add a Raspberry Pi to the router via ethernet. Everything here is wired, no wireless.

The Raspberry Pi will act like an alarm clock to fire off a wake on lan signal whenever I want it to. I'll have it set for weekdays 6am and 5pm to power my computer on. Then my computer will do its wake up stuff and be ready when I get to it. (Yes, I'm that freaking lazy and impatient. But willing to pay a little and work a little to automate this. I'm doing the same thing daily, letting a few minutes of my life slip by each day while I'm waiting on the computer. I'm not buying a new computer either. I just want to add this on to what I've got.)

I'd need a Raspberry Pi, ethernet cable, some kind of cover/box for the Pi... And then I'll need a little batch file, run by a chron job I understand, to run somethign to fire off a magic packet or wake on lan signal. I'm familiar with Windows and batch files. I've installed Ubuntu and looked around at it a bit, but I'm not really a Linux user. That's my background. I found one post about this online but not many details. Most people want to use a RP to get around their router and send a wake on lan packet from the internet to their computer. I want to use the Pi as a tacked on alarm clock, no internet/router messing needed at all. And I'm lazy -- I don't want to send the wake command from work and I want the computer on before I even wake up each morning.

Any thoughts?

I need to...
Check for sure that my computer will wake via magic packet or some kind of packet. That will shoot the whole little project down. I'm pretty sure it will though.
I need a Raspberry Pi and case. I thought there was only one RP, but I'm not quite sure.
I need to know how to create a batch file on Raspbian (?), how to set that to a chron job, etc.... Need to know what app or whatever is available to send a magic packet or wake on lan signal in Raspbian....
I also want to stick Ubuntu (or something, maybe Raspbian in some way?) on an extra laptop I can borrow and test this out with a borrowed laptop before I even buy a Raspberry Pi. That way I'll know the batch file works and it's just a matter of actually setting up a Raspberry Pi to do the same thing.

Spid
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 7:57 am

http://www.raspberrypi.org/phpBB3/viewt ... 05&p=91570

http://blog.depicus.com/index.php/2012/ ... -forwarder


If you just want a lightweight Linux Distro without a GUI then Arch Linux Arm may suffice,

Please be aware that the Pi uses ARMv6 architecture, you home PCs use x86 architecture.

http://forum.home-server-blog.de/viewto ... 36&t=18177 (need to translate)
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 10:35 am

On Raspbian, the package wakeonlan will send the magic packet for you from the command line/script. Easy to use:

Code: Select all

wakeonlan AA:BB:CC:DD:EE:FF
Where AA:BB:CC:DD:EE:FF is the MAC address of the device you want to wake.

You can also set up a file /etc/ethers which is like the /etc/hosts file and contains a list of MAC addresses and hostnames. Then you can do "wakeonlan myhost"

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 4:17 pm

Dang. Lost my post.

Thanks for the info.

I'd like to stick with the standard Raspberry Pi set up, so Raspian I guess for the OS.

I'm not sure how to make the equivalent of a batch file on this. Is it just saving a simple text file, giving it an extension like .bat? (What's equal to .bat on Raspian?) And I don't know how to set up a chron job, but I've heard that's what I'm supposed to do.

Thanks again. :) It sounds very doable still.

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 5:56 pm

Probably not really something to be concerned about....

If I've got a router, computer, and then attach a Raspberry Pi on the router too....

Do I need to be concerned about security for the Raspberry Pi?

Is there a way to stick a password on it like with Windows? Is there any chance someone could get into it, having to go through my router first I guess. Sounds very unlikely but I'm coming from a Windows perspective here.

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 6:23 pm

Extensions like ".bat" have no real significance to Linux other than a handy indication of what type a file is. Usually you would put ".sh" on the end of a Shell Script name (which is what a Window/DOS batch file is).

You don't even need a batch file in this case, just an cron entry or two.

wakeonlan can be run as any user, even pi, so...

Code: Select all

crontab -e
Will set up a default crontab (the file that defines cron jobs for your user) for you and launch a text editor - possible vi, vim or nano - depends on how your Pi is set.

Add the following to the file

Code: Select all

0 6 * * * * /usr/bin/wakeonlan mac-address-here
0 17 * * * * /usr/bin/wakeonlan mac-address-here
This means at 06:00 on every day of every month and every day of the week, run /usr/bin/wakeonlan mac-address-here.
Also do the same at 17:00.
Then you save that file.

Do a "crontab -l" (lower case L) to list the crontab to confirm. That's it.

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 6:26 pm

rasprm3 wrote:If I've got a router, computer, and then attach a Raspberry Pi on the router too....

Do I need to be concerned about security for the Raspberry Pi?
Unless your router is port forwarding incoming ssh/port 22 to your R Pi, you should be safe.

However, it would be a good idea to change the password for your "pi" user (as everybody and their tribble knows the password is "raspberry".

Use the "passwd" command from a terminal, when logged in as "pi".

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 6:38 pm

Another dumb question....

I plan on having this RP just sit on the shelf next to the router. Just the RP in a case with power and ethernet cable connected.

Is it possible to 'remotely' log onto that from a Windows machine also connected to the router? With the point being to tweak the wake on lan times if I wanted. Or do I have to connect the RP to an external monitor and keyboard to change the chron job times? Not a huge deal, but it would easier to just log on from the Windows machine and leave the RP physically alone.

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 6:49 pm

Yes, remote login in text mode from Windows is easy using an SSH client like PuTTy. Even my wife can cope with that one :lol:

http://www.chiark.greenend.org.uk/~sgta ... nload.html

I don't have a keyboard connected to my Pi at all. I use ssh from my Linux laptop.

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 6:52 pm

rasprm3 wrote: Is it possible to 'remotely' log onto that from a Windows machine also connected to the router? With the point being to tweak the wake on lan times if I wanted. Or do I have to connect the RP to an external monitor and keyboard to change the chron job times?
It is perfectly possible to run an RPi 'headless', without ever connecting a keyboard, mouse or monitor. If you are happy at the linux command line, using PuTTy on your Windows machine to make an ssh connection will give you all the access you need. (Think of it like a remote server in the cloud, of the sort you might hire from Rackspace or similar.)

I suggest searching the forum and howto's for keywords like 'ssh' and 'headless'. [Knowing the target IP address of the RPi can be a conundrum, but if you have access to the local router you can ask it what IP address it has handed out.]
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Sun Jan 20, 2013 11:46 pm

Ah, interesting. Thanks again.

I haven't used Linux that much. Logging in remotely might be something for later.

Is it possible to set days of the week with a cron job? ie Mon-Fri and not daily?


Yep. I see. Cool....
http://www.thegeekstuff.com/2009/06/15- ... -examples/

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Mon Jan 21, 2013 12:14 am

A few more newbie questions...

Do they make cases that cover the SD card? The ones I'm seeing have the SD card sticking out the side. I don't plan on removing it. If it's sitting on a shelf there's a chance something will bump it and tap the SD card.

I saw a tutorial that mentioned spending a little more for a higher class SD card? What is the 'class' of an SD card? I'm thinking maybe they meant the size of the storage on on the card but maybe there's something I haven't heard of....

Does it take forever to get a Raspberry Pi after you order it? Do orders from the US/UK go faster/normal compared to other locations? I'm in the US. Is something I can order and get in a month or should I be ordering something now and expecting to actually have it in hand in June or July?

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Mon Jan 21, 2013 9:21 am

rasprm3 wrote:A few more newbie questions...

Do they make cases that cover the SD card? The ones I'm seeing have the SD card sticking out the side. I don't plan on removing it. If it's sitting on a shelf there's a chance something will bump it and tap the SD card.
I don't know. I've not bothered with a case for mine (yet). I think the idea is that most users will want to have easy access to the card.
I saw a tutorial that mentioned spending a little more for a higher class SD card? What is the 'class' of an SD card? I'm thinking maybe they meant the size of the storage on on the card but maybe there's something I haven't heard of....
Put simply, it's the card version. Higher class cards are (usually) faster and have additional internal commands to improve data transfers. The current highest is Class 10, but people have had problems with some of these not working very well on their Pis. I'm using a SanDisk Class 4 4GB card, and a Sasung Class 2 8GB micro card. The Class 2 card is noticably slower.
Does it take forever to get a Raspberry Pi after you order it? Do orders from the US/UK go faster/normal compared to other locations? I'm in the US. Is something I can order and get in a month or should I be ordering something now and expecting to actually have it in hand in June or July?
Mine took a long time to arrive, but that's because I ordered it on day 1 and didn't get into the initial batch. Apparently in the UK, delivery times from Farnell/Element 14 are a few days, and from RS about 6 weeks (although they are said to be improving).

I don't know US delivery times, but I suspect it would be under a month.

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Wed Jan 23, 2013 1:07 am

This is what I'm looking at getting...

Raspberry Pi, $42
http://raspberrypi.rsdelivers.com/produ ... 68308.aspx

Black case, $7.76
http://raspberrypi.rsdelivers.com/produ ... seblk.aspx
- Unless I can find another case that protects the SD card better. I need to look around more.

Power cable, $15.34
http://raspberrypi.rsdelivers.com/produ ... 53311.aspx- Says it's got the plug end to work in the US

That's $65.10 from this place. (I only picked RS here because they had pictures.) Plus whatever shipping would be. Probably about $80 total is my guess, for this part.
Although the RS website lists 35 for RP, 6.47 for case, 12.78 for power... 54.25 plus 10.85 tax plus 8.02 shipping... $73.12 total.


HDMI to DVI adapter, $7
http://www.amazon.com/gp/product/B001TH ... PDKIKX0DER

Or HDMI only, $15
http://www.amazon.com/gp/product/B0069A ... QDY5N961JZ

SanDisk Extreme 16 GB SDHC Class 10 UHS-1 Flash Memory Card 45MB/s SDSDX-016G-X46 $20
http://www.amazon.com/gp/product/B0037F ... PDKIKX0DER-- This page says it should work with Raspian...
http://elinux.org/RPi_SD_cards
-- I was initially thinking 4 or 8GB and Class 6, but this isn't that much more. Maybe I'll have more of a use for the Raspberry Pi in the future. Class 10 should be faster. Although I don't have any plans for the space.

And another $27-35 for this stuff from Amazon.

Ethernet cable
- I have that already.

Total....
Roughly... $102-115 total.


That's more than I was expecting. I was thinking $60-80 originally. Hmm. Haha... It's not $35 for sure.

For more money, maybe $100 more, I could buy a cheapy laptop to do this. But I don't want to maintain another computer and I don't want to leave something else powered up the whole time. (Although I could have it wake on bios by itself, then wake my regular computer, and then go back to sleep or turn off.) It loses the prestige and fun of the Raspberry Pi though. I don't want an old laptop plugged in all the time at my place either.





Anyone see anything UNfunctional here? This looks like a basic Raspberry Pi set up to me.

Is there any way to cut the price down a bit?
I can't cut down the Raspberry Pi...
I should have a case for it and I'd like something that fits well. I don't want to make a crappy case myself.
It's got to have power, but I don't need all those extra adapters.
I could borrow an adapter but I'll need to check on this myself, so I should have my own adapter.
I could skim on the SD card a bit I suppose. This is really just to fire off a wake-on-lan signal. I could probably save $10-15 on the SD card, but... If I would use this for anything else in the future it would be good to have it set up already. Although I think I'd just set it up and forget about it, not using the extra storage or extra speed probably even.


Hmm.
http://www.amazon.com/SanDisk-Extreme-V ... UTF8&psc=1
This 8GB should work with Raspbian according to that chart, but not other OS versions. I'm not sure about that.
-- I'd like Class 10 I guess for speed. But I want it to work for sure. I don't have much use for a space SD card. If I buy it, it doesn't work, then I have an SD card that's pretty useless to me. What do I do with that? And I'll be wondering if the Raspberry Pi was working correctly or got damaged or if I botched the install, etc.....



Basic question -- The operating system I'm looking at is a Raspbian "Wheezy" right? I just want the standard, basic operating system. Nothing complicated.

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Wed Jan 23, 2013 5:39 am

These are looking good for the SD card. (Or were looking good when I posted. Then realized I was using a different model number on that wiki page...)

SDSDX-016G-X46 Not sure why it's on two pages on Amazon...
http://www.amazon.com/gp/product/B0037F ... PDKIKX0DER

SDSDX-016G-X46
http://www.amazon.com/gp/product/B0037F ... HP3OMSZC7W

(Good old Amazon... I hope the text is correct. Text is 45/Pic is 30MB/sec read/write speed.)

SDSDU-008G-U46
http://www.amazon.com/gp/product/B00812 ... 9837098U4T


For the $6-7 difference, the 16GB is twice the size and is faster. Except it probably won't matter at all for my project here. I'm still leaning that way though.
Last edited by rasprm3 on Wed Jan 23, 2013 6:01 am, edited 1 time in total.

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Wed Jan 23, 2013 5:47 am

It does all add up, doesn't it?

I already had a suitable power supply, but not the cable. I "borrowed" my wife's kindle charger cable until I got one. I had a spare USB mouse, and a USB->PS2 keyboard adaptor (although I run headless apart from the screen now). I got my cards, HDM->DVI-D cable and power cable from ebay for about $15 total.

The cheap (~$2) power cable wasn't very good, so I chopped the middle out of it and replaced it with some better cable. That improved the stability of my Pi by about 500%.The voltage across the test points went from varying between 4.61 and 4.9V to between 4.92 and 5.05V

Yes, Raspbian "Wheezy" is the recommended OS for general use. You can run it without the desktop if you prefer.

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Thu Jan 24, 2013 11:51 pm

Tested -- My regular computer does actually wake on lan. I borrowed another computer and tested that. No big surprise, but it's good to check and nice to see that it works. There are some other issues with the computer but I just live with them.

I want to take a laptop, stick Ubuntu on it, and test a wake on lan signal from that to my regular Windows computer. If I've got Ubuntu installed already... I just need to... install vim for a text editor? And then set up that cron job? I'm a little fuzzy on that. Vim would be available through the app area on Ubuntu?

And it's fairly safe to assume that if it works on Ubuntu, it should work on Raspian on Rasperry Pi?

I'm probably safe to order the Raspberry Pi stuff. And then sit and wait a month. I have a feeling it's all going to work fine. It doesn't look like I'm doing anything unusual with this. Raspberry Pi might even be overkill for what I'm doing here but I'm not thinking of anything simpler. And maybe someday I'll have another task for the Raspberry Pi.

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Fri Jan 25, 2013 12:22 am

rasprm3 wrote:Tested -- My regular computer does actually wake on lan.
Yay! That's a good start :)
I want to take a laptop, stick Ubuntu on it, and test a wake on lan signal from that to my regular Windows computer. If I've got Ubuntu installed already... I just need to... install vim for a text editor? And then set up that cron job? I'm a little fuzzy on that. Vim would be available through the app area on Ubuntu?
I'd be very surprised if the standard Ubuntu install doesn't have at least one text editor installed as standard, either graphical or text based. Most probably one of the vi clones (vim/elvis etc), or maybe nano. If not, they should all be available, as Ubuntu is based on Debian (although somewhat customised).
And it's fairly safe to assume that if it works on Ubuntu, it should work on Raspian on Rasperry Pi?
Yes, as Raspbian is based on (a pretty much standard) Debian too. The wakeonlan program will use the same source code for both systems, although Ubuntu may use a slightly newer version.

I use wakeonlan from a couple of Debian systems. Actually, I use it when I'm feeling really lazy - I sometimes use it to start up my main media centre box from my laptop, which saves me having to walk a couple of yards and press the button. Also, I sometimes have an old, low-power laptop that I can use to send a wakeonlan to my main laptop downstairs when I wake up in the morning, so the main one is ready by the time I get to it :)
I'm probably safe to order the Raspberry Pi stuff. And then sit and wait a month. I have a feeling it's all going to work fine. It doesn't look like I'm doing anything unusual with this. Raspberry Pi might even be overkill for what I'm doing here but I'm not thinking of anything simpler. And maybe someday I'll have another task for the Raspberry Pi.
The Raspberry Pi may not be all that fast or powerful for some things, but it is certainly very versatile. Using it for WOL will barely tax it at all, leaving lots of spare resources for other projects as well.

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Fri Jan 25, 2013 12:57 am

Thanks. It looks like I'm up to the part that's fuzzy for me.

Can someone point me to a resource that tells how to set up cron jobs?

I found these pages before. I still need to study this out.
http://en.wikipedia.org/wiki/Cron
http://www.thegeekstuff.com/2009/06/15- ... -examples/

I understand the gist of how the job appears in that **** layout. I'm fuzzy on where that exists in the operating system, if it's a file that I edit... If cron is something that's always going and I'm just adding some entries to a master cron list....

I'm used to Windows, making a batch file and using the task scheduler to trigger it.

I get the feeling from the stuff above wakeonlan is a built in command and that I'm just plugging an extra task in a ongoing clock here.

I just need to study cron out better...

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Fri Jan 25, 2013 2:02 am

It's pretty simple.

Fortunately wakeonlan doesn't need to be run as root, so all this can be done as the "pi" user (or any other user you've set up).

The batch file is just a simple text script. Something like:

Code: Select all

#!/bin/bash
wakeonlan 01:23:45:67:89
Then make sure it is executable with

Code: Select all

chmod u+x fred
This adds the eXecutable by User flag to the file "fred".

Then "crontab -e" will launch a text editor and give you your current crontab (scheduler details for your user).
Add a line like:

Code: Select all

0 6,17 * * 1-5 /home/pi/fred
This will run file /home/pi/fred at 06:00 and 17:00 on weekdays 1 to 5 only (Monday to Friday) of any day of any month.

Feel free to PM me if you need more advice, we can talk via email.

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Fri Jan 25, 2013 2:41 am

That's all right. I want to leave a trail of bread crumbs here.

I'll also need to change my pi account password, but I can worry about that later.

What I'm thinking now -- I can just send a wake on lan command from a command prompt, right? If so, then I can test out wake on lan from Ubuntu tomorrow. And order the Raspberry Pi since I'll be very confident it will work. I can figure out cron while I wait for it to arrive.

The wake on lan command is listed above, right? Just remove the cron part?

I need to study the post above more and I found some more links about cron. I should also study out linux a little for understanding the file structure and basic commands a little better. I've got the gist down though. Navigating on the command prompt on Ubuntu is probably a good idea to for some hands on practice.

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Fri Jan 25, 2013 3:24 am

Hmm... The forum must time out. I was just going to edit my last post.

Some cron websites I found....
http://www.unixgeeks.org/security/newbi ... ron-1.html
http://kb.iu.edu/data/afiz.html
http://www.pantz.org/software/cron/croninfo.html
http://www.adminschoice.com/crontab-quick-reference

An online cron gui?
http://www.corntab.com/



I did think of one question....
What if I wanted specific, different times during the day? Like 5:55am and 4:30pm Mon-Fri. How do I handle the different minutes? If everything's on the hour, :00, I understand that, but what if they're different? Can I include everything in one line or do I make a separate line for differing times like that?



Another newbie question....
Cron jobs have to be edited with a command line text editor? I can't find the cron job file and edit it with something like Windows notepad? It has to be done via command line?

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Fri Jan 25, 2013 4:07 am

Haha. Heat sink worth getting?
http://www.amazon.com/Combo-Pack-Premiu ... spberry+pi

Not necessarily that one but a heat sink....

I'm not overclocking it. Do RPi's get hot at all? Or warm?

I'm thinking it's not necessary. And it probably wouldn't fit in the premade cases with a heat sink on.



Or... maybe it would still fit in the premade case.

Looks like this guy's helped by 3-4 degrees Celsiu.
http://www.youtube.com/watch?v=yT2LVuQBno0

Found a thread on here...
http://www.raspberrypi.org/phpBB3/viewt ... 63&t=13080

I was thinking longevity. I was thinking I'll leave the Raspberry Pi on all the time. It's not supposed to draw much power. I thought power-wise, it's on par with a little clock radio. Hmm.... It's got to use less power than a laptop, leaving a laptop or other computer on all the time.

User avatar
rpdom
Posts: 15600
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry pi as a Wake on Lan source

Fri Jan 25, 2013 7:32 am

rasprm3 wrote:I did think of one question....
What if I wanted specific, different times during the day? Like 5:55am and 4:30pm Mon-Fri. How do I handle the different minutes? If everything's on the hour, :00, I understand that, but what if they're different? Can I include everything in one line or do I make a separate line for differing times like that?
Yes, different lines. Easy enough to do. Copy line, paste, edit time.
Cron jobs have to be edited with a command line text editor? I can't find the cron job file and edit it with something like Windows notepad? It has to be done via command line?
In theory you could find your crontab file and edit it - but is really isn't recommended. The cron daemon won't be notified of the change and may continue to use the old version of the file until it next gets restarted (like at boot time).

You could write your crontab to a temporary file, edit it with geany or whatever editor you prefer, then feed the file back into cron (this is what crontab -e does for you, and is the old unix way of doing things before the -e option exisited)

Code: Select all

crontab -l >cronfile.txt
(edit cronfile.txt here, being very careful about the format. Make sure there is a blank line on the end)
crontab <cronfile.txt
rasprm3 wrote:Haha. Heat sink worth getting?
No. Unless you think it looks nice.

If your Pi fails when it gets warm, it is faulty.

When running flat-out, in an enclosed space, some of the components will get quite warm - maybe a bit too hot to keep your finger on for long. This is normal, and as hot as they will get.

For example. The main processor/GPU/memory package on the Pi is designed to run happily over 85°C/185°F without a heat sink. The overclocking settings make the Pi slow down if it reaches this temperature as a safety feature. The CPU in your desktop PC is usually set to shut down if it goes much higher than that (120°C/248°F in one of mine) with a massive heatsink and fan. Take the heatsink off the PC processor and it'll reach that temperature in a fraction of a second while idling! The Pi usually runs at about 50-60°C when overclocked and working hard whithout a heatsink.

Running warmer may reduce the life of your Pi from maybe 20 years to 19 years... are you still likely to be using it then?

As for power usage - I have noted before that most PC power supplies can provide enough power to run a Pi or two when they are in standby mode - switched on at the mains, but the PC is shut down. So the PC you are going to wake could be using more power when it is asleep than the Pi uses when it is fully active.

rasprm3
Posts: 195
Joined: Sun Jan 20, 2013 1:27 am

Re: Raspberry pi as a Wake on Lan source

Sat Jan 26, 2013 12:37 am

Yeh! Another successful wake on lan test. Laptop with Ubuntu sending wake on lan to my regular computer. Works in sleep and full shutdown states. Hibernation has issues I don't want to mess with right now on my regular computer. I did notice my regular computer has to do a regular shutdown. I held the power button down and forced it off. Wake on lan didn't get a responsein that case. I can live with that. It would just boot into the error page anyway if wake on land did work.

So wake on lan works from Ubuntu. I think it's safe to think it will work from a Raspberry Pi on Raspian too then. I just need to put my order together. I checked out the other two sites. RS seemed to be the only one with everything I wanted. That looks pretty straightforward.

What's confusing me is which SD card to get for sure. But I'll get that here, probably from Amazon or Newegg. Probably Amazon.

Then I need to figure out cron.
And how to change the pi account password when the RPi comes in. But that's listed on this page.


I was surprised on Ubuntu when I did wake on lan. I brought up the terminal and type wakeonlan. It told me it wasn't installed and had exactly what to type to get it. I typed that.. boom. wake on lan is installed and ready to go. I didn't have to understand what I was typing. Easy enough. I hope Raspbian is that easy.


And wake on lan doesn't work with the router off. No surprise. I just wanted to try it anyway. I had a broken switch that would still pass a signal without being plugged in, basically only possibly useful as a way to connect two ethernet cables... so not very useful.

Return to “Other projects”