Archive for May, 2008

New Project Completed

Thursday, May 22nd, 2008

It’s been a while since I posted on here. There are several reasons for that. The main reason is that my latest project has been taking all my spare time and it was a secret. I didn’t log any of it until just a few minutes ago because I didn’t want the secret to get out. It is an anniversary present for my girlfriend. You can check out the project page for more details on that.

The second reason is that my web server has been down and I haven’t fixed it until recently. My server rebooted one day when I lost power and Apache refused to start for some reason. Rather than sitting down to fix that, I just spent all my time working on the anniversary project. It turns out there was some other instance of httpd running in the background hogging port 81. I have no idea why this was. I’ll have to reboot the system again to see if the problem occurs again. At least I’ll know what the problem is.

In other news, I have started the Near Space class at school last week. I am really excited for this class. We will be sending a balloon equipped with computer, science experiments, and a camera into near space in just a few months. Ryan is splitting the class into teams and should have them posted on the e-shell this weekend at some point. Hopefully I’ll have access to the shell soon. I just e-mailed a local enthusiast to see if he wants to come to class to share his experiences and offer some words of wisdom. Hopefully that will go over well.

My dad should be sending me another radio, antenna and a Tiny Trak 3 module next week. I can’t wait to get that stuff. I want to start messing with APRS tracking as soon as possible to get a feel for it before we actually do a launch. I’m hoping to be on the tracking and telemetry team for the near space class.

I suppose that’s enough updating for now. I have to take some photos of the anniversary lamp to stick on that page, as well as get a schematic up. Man, I still need to get a schematic up on the graduation hacks page… I’ll get on that soon. I’ll also post a video of the lamp in action. Until then.

Please, God let me finish this tonight

Monday, May 5th, 2008

I really want to get this radio playlist finished tonight. I’m sick of fighting with it. I was thinking earlier that the best way to deal with the e-mail deletion option might just be to open up the mail again at the end of the program, cycle through all of the e-mails again, and delete them at that time. It’s not elegant but it will do… hopefully.

That didn’t work either. I could not figure out for the life of me what the problem was when it dawned on me. I had placed a print statement towards the end of the program that should always be called, but it wasn’t. That’s when I discovered where the problem was. The Perl script just halted at the exec command. It would run the shell command and then just freeze for some reason. I tried changing it to the system() function and it worked!. I got rid of all the extra stuff I just added and tested out the delete function. It works! Now that means all I should have to do is change the delay time back to 30 minutes and test this baby out.

I turned on the radio at 9:14 and the song Never There by Cake was playing. I love that band. I send a text message to my e-mail towards the beginning of the song. I checked my at jobs a few minutes later and lo and behold, a job was set for 30 minutes from now. So far, all is going well. I just need to check back in 30 minutes to see if the song shows up. If it does, I’ll consider this project finished until I find some problems that need to be fixed.

Thirty minutes pass, I check for the playlist file and it exists.  It’s the moment of truth.  Does it give me the Aritst Cake and the Song Never There?  Yes!  Finally I have this thing working.  I can start something new now.  I’m going to go update the project page right now.

OK let’s do this

Sunday, May 4th, 2008

If watching Iron Man last night has made me realize anything, it’s that I need to finish this radio playlist project so I can start building my own arc reactor. I’ve been spending all my time as of late destroying GTA4 and it’s time to get back to work.  So let’s DO THIS!

When I last left off, there was something weird happening with the bash script. For some reason the at job would start it, but it would have problems. Since it’s running in the background and there’s no logging going on, I have no idea what the problem is. The first thing I’m doing today is adding some logging features. I’ll just have it echo some stuff out to a file in the same directory so I can see what’s going on.

So I’ve added some logging lines and I’ve also altered the Perl script to add the at job immediately instead of waiting 30 minutes. This change is only temporary. I don’t want to have to wait 30 minutes for each test. Now I just wait 3 minutes for the cron job to start and we’ll see what happens.

Well that didn’t work. No log was created. This means that either none of the logging lines ran at all, or I have to give the full path to where the log is. I’m not sure. I’ll try adding the full path and see what happens after that.

That didn’t work either. It seems like nothing is happening at all. I’m going to try to set the at job manually and see what happens.

That seems to have started working… but not completed. AHA! The log shows that the the script is not getting the input arguments. It seems like at has no way of providing arguments. I tried using double quotes and single quotes around the entire command to no avail. I’m not really sure how to handle this problem. I need a way of sending the time to the bash script but I’m not sure if ‘at’ can do it. Also, it’s really hard to do a Google search for ‘at’ so I’m not sure how to find that out… Perhaps my handy dandy ginormous Unix manual has something to say about this… Not really.

I figured it out! Thanks to this page I found. I can send arguments to the at command by calling it like this:

echo “command arg1 arg2 arg3″ | at -t time

I tested it out and it works. Now I can just change the Perl script to reflect this and we shall see what happens.

That fixed THAT problem. Finally. Although now there are more problems. Luckily, the at command sends mail to my user when something goes wrong. Based on the error messages I received, I forgot to include the full path to the downloaded html code. I changed that and everything finally works! Now I have to figure out why the emails are not being deleted when I set them to be.

I’m having trouble figuring this out.  It only deletes the e-mails if I put the Delete command before the IF statements.  However this makes it so the IF statements do not work at all.  I’m taking a break from this for the rest of the night.  Until tomorrow…