Wednesday, November 15, 2006



Waste your cell phone minutes on AM radio!

Today's ghetto hack is probably one of the more ghetto hacks you'll find. It combines both the poor audio of AM radio along with the sometimes shotty quality of cell phones.
with a little bit of planning and some pretty standard free stuff we're going to use our cell phone to text our computer and have it call us back with our favorite radio station.

So you might be asking yourself why would I want to do this (like my friend Sylvia did tonight when I explained this set up to her) for me there are two very simple explanations. 1. my company pays for my cell phone and 2. sometimes I get tricked into going to the mall with my wife and I don't have my IPOD or any other means of keeping myself entertained.

What you'll need

An Email program that supports 'call application' function, I use Eudora since I have this set up on my server
Winamp
command line plug in for winamp I use CLEveR
the url of a radio station you want to hear, talk radio probably sounds best Mike's World Radio is a good resource
Skype

once you have all of the necessary software installed on your machine, I bet you probably had at least two of them already, we'll just need to do a little tweaking.
The basic premise of the hack is that we will send a predetermined message to our mail client , it will run a batch file which will run Skype and winamp. Here is how we'll set it up.


Because it takes Winamp a second to open and connect to a url we'll have it start first, this way it has a head start before Skype calls us. The command we'll use for Winamp, via CLEveR is
C:\Program Files\winamp\winamp.exe play http://69.45.64.76/D/814/19771/v0001/reflector:44512.asf you'll insert your url after the play command
It turns out that Skype can run via a command line or at least it can dial via a command line so we'll want to include this function in a batch file. The command is
C:\Program Files\skype\phone\skype.exe /callto:+14085551234 obviously you'll insert your cell phone number after the callto:+

so mix them together and it looks like this

@echo off
CD C:\Program Files
Skype\Phone\Skype.exe /callto:+16502698236

CD C:\Program Files
winamp\winamp.exe play http://69.45.64.76/D/814/19771/v0001/reflector:44512.asf



Again remember these are ghetto hacks, I have no programming knowledge so this little bit of batchery might be ugly to someone who knows that they're doing!
copy the text above and paste it into notepad, then save the file as a .bat file and put it somewhere you can find it later.

Next we'll want to set up a rule so our email client will recognize the command and run our batch file for us. The command I use is "Run KFI" since the url I have listed is for LA talk station KFI. Anytime the phrase appears in the subject line from my cell phone it will run our batch file.

Lastly and most ghetto, we need a way to get the audio out of winamp and into Skype. I used a male male headphone cable I had lying around. I simply ran one end of the cable from the headphone jack out on the sound card into the microphone in. You may want to tweak the EQ and audio level a little. I've found talk radio sounds best, but of course you could have any station you want. As a matter of fact you could set up as many stations as you want each with a different subject line and batch script.

Now we can text send the command to our email client, it will run the batch script, open winamp, play our url then open Skype and call our cellphone. It usually takes a minute or so for the call back, of course my computer is about 10 years old so you may get the call quicker than that.


Another maybe more practical use of this set up is to not use Winamp at all but set up a microphone instead, this way you could have your PC call you silently and basically bug your house.

Sunday, November 05, 2006

Picture of the moment







My Picture of the Moment

Jo's Picture of the Moment

I will add soonI will add soon



After finally giving in to my friend to start a Myspace account I started thinking of neat things I could do with the HTML that would justify my having one (aside from being a complete dork). The first thing I thought that would be really cool was to be able to send photos to it on the fly from my cell phone from where ever I was. Free upload sites have random URLs and I can't sent a photo directly from my phone.
I think there are phones now that will do this for you, but I am still in love with my Motorola E815 and wanted to find a way to use it to get the detailed events of my boring life posted as soon as humanly possible not to mention I love mental exercises!. After a few days of thinking, and a lot of coffee and cigarettes I came up with the following solution which works surprisingly well provided I have no programming skills whatsoever. My moto is with enough coffee, cigarettes and curiosity you can make anything work

What you'll need

webserver I use apache
If you don't already have a webserver I found a great tutorial on lifehacker that shows you how to set it up step by step. You can find the instructions here
http://www.lifehacker.com/
I am using an old PIII PC running Windows XP Pro overclocked a bit and sorely low on memory
Eudora (Sponser version works fine) and an email that supports pop forwarding, I use Gmail
An MMS enabled camera phone with the ability to change the photo's name
A Myspace or somewhere to post your photos to, I've even embed the HTML on my pc using active desktop so I can see the current pictures of my friends



Step one, get the pic off the phone and into the pc

One of the cool features of Eudora is how it handles attachments. When an email with an attachment is received by Eudora the attachment is detached and stored in any folder you want. Since my phone does not support any kind of FTP program but can send SMS and MMS, I thought this would be a perfect solution to getting info off of my phone and onto my pc

Install Eudora and specify which folder you want your attachments to be dumped to, the path can be set under options/attachments. I have my folder set to "photos", be sure this folder falls under the main directory in Apache or whatever webserver you're using. Next you'll need an email address to email the photos to. I use a Gmail account since it supports POP forwarding and has plenty of storage which acts as a back up of all of my photos. See the Gmail documentation for setting it up with Eudora.

By renaming the photo with a predetermined name before emailing it will make it easier to know what the url will be. I personally use a.jpg for all of my Picture of the Moment photos. But wait! when I send two files with the same name one is renamed!
The next major hurdle was what to do if I wanted to update the photo on the fly. If I sent another a.jpg to the server the file name would be changed since you obviously can
not have two of the same file names in the same directory. So to fix this little snag I wrote a simple batch script

copy/y "D:\my music\photos\a.jpg" "D:\my music\photos\newpix"


del/q "D:\my music\photos\a.jpg"

As I mentioned I have no programming skills at all, not even simple batch scripting so i am sure there is a better way to write this little file.
copy the above lines (subbing all of my file paths for your own) paste it into notepad and name it with a .bat exension and save it somewhere you can find it . Next we'll set up a rule in Eudora to run this batch script any time you send a photo. This rule can be when any email from your phone is recieved (by adding the email address of your phone to the "from" line) or if you want to put a specific word in the subject line it can watch for it also
What this does is take the file from the original folder "photos" and dumps it into a new folder "newpix" while overwriting any existing files named a.jpg. and deletes the original a.jpg from the photos folder. Now we'll know exactly where our new photo is located, in my case photos\newpix\a.jpg . You can use this url to encode your myspace or blog or anything else really

So here is how it works

I see a goofy dog with a sweater running across the the street and I snap a photo of it. I rename the photo "a" on my phone and email it to my Gmail account, Eudora
picks it up (i have it checking every minute, I told you I want this stuff up ASAP) and it detaches the attachment to my "photos" file, Eudora sees that the email came from my phone and runs the batch script to take the picture from "photos", it copies the pic to "newpix" while overwriting the prior picture and then deletes all pictures named a.jpg from the "photos" file. It now exists on my webserver. Now anyone viewing my myspace, yes all 6 of my friends including Tom, will see that goofy little dog too.

Photos that you do not necessarily want to exist as your "picture of the moment" can be sent with the existing files names and since the script will not recognize it unless it's named a.jpg will still exist in the original folder

it's easy to add a friends to your set up, by changing the bat file a little, and adding a new rule your friend can send photos named for instance b.jpg and it will work fine, I currently have two friends using my set up.

The picture of the moment is not limited to pictures either, my Moto will take about 15 seconds of video in 3g2 format which can be viewed via Quicktime, with a little tweaking to the html on your myspace (or wherever you intend to post) you can add video too. I personally like the idea of embedding text which can be done by sending a text attachment, however myspace will not accept an object tag so it can not be used there.
Also, I should mentioned this is tried and true with a verizon phone. I've also used Metro PCS and found that the photos is embeded. If you intend to try this with Metro you'll find your photo's in C:\Documents and Settings\yournamehere\Application Data\Qualcomm\Eudora\Embedded\. You'll need to edit the batch script accordingly