Police Scanner and GNURadio

November 9th, 2008

Keeping and eye on the police has never been so much fun! Recently, my friend John lent me his USRP, allowing me to play with GNURadio. From wikipedia:

The Universal Software Radio Peripheral (USRP) is a high-speed USB-based board for making software radios.

USRP

GNURadio is a free software, software radio. Essentially, the USRP allows you to tune or transmit any radio signal, given the correct tuner/transmitter attachment. Currently it is anything in the 0-5.9Ghz range. The USRP John lent me came with a FM/TV tuner — meaning I can listen to anything between 80Mhz and 800Mhz.

What exists between 80Mhz and 800Mhz? Lots of stuff! For example, normal FM radio is between ~87Mhz - 108Mhz, all of which can be demodulated using GNURadio. Also, analog TV transmits in that range, allowing you to watch or listen to any of that on your computer.

But! It gets even more interesting. For instance, San Jose International Flight Control exists around 124Mhz (although, I have not heard much there…). Or, you can even listen to Police Central at 460.4Mhz. Listening to the police has been pretty fun. So far, Sam and I heard about a stabbing at a local restaurant, and plenty of phone number / license plate checks.

Anyway, so far I have not done much hacking on the device — there are a lot of example applications to do the FM demodulation. The one thing I did figure out was now to remove the FM static when the channel is not in use. It took me awhile to figure out, mainly because I did not know the correct terminology. Turns out, the term is “squelch“, and gnuradio implements a block to do this. All I had to do was create a squelch handling block, put it as part of the rest of the processing chain. Looks something like this (inside the usrp_wfm_rcv.py example program):

squelch = gr.simple_squelch_cc(0, 5e-3)

Then add the squelch to the rest of the connect chain:

self.connect(self.u, squelch, chan_filt...

This thing is super cool — and I’m excited to see what else I can make it do.


Hungry Scientist in the NYT

October 29th, 2008

Check it out! Pat’s book was on the front page of the dining section in the New York Times today! I went down to Borders to get a copy, and while I was there did a little clean up of the “Reference” section…

Before:
hungry1

After:
hungry2


Net Nightly News 2008-10-24

October 24th, 2008

This is a hack I’m working on … trying to grab the daily news from the web and make an episode.


Videobooth shell script

October 23rd, 2008

Just a quick note to point out my, now open sourced, videostrip generator.

My dream goal would be able to generate these using a webapp and then let the site grow. I originally implemented a flash recorder, but now my flash trial has expired and I am unable to continue messing with it. Guess that means it is time to start hacking on a firefox-addon/ogv/icecast stack to replace the existing flash-plugin/flv/flash-server stack! It’s 2008, why is flash still the only solution for streaming video out to the web??


Makers Faire timelapse, using CHDK and mencoder

October 22nd, 2008

Last weekend I went to Austin, TX, for the Makers Faire. There, Pat, David, and I make a crap load of custom ice cream scoops. The process involved filling a dixie cup with whatever ingredients you wanted, including fun stuff like chayanne pepper and BBQ sauce (some people made normal ice cream, too), and then instantly freezing it with liquid nitrogen. The kids loved it!

Just as a note, this was a promotion for Pat’s just published book, the Hungry Scientist Handbook. The book is meant for foodie/geeky types — I’d definitely check it out if you self identify with either of those groups.

Anyway, I made a timelapse of the setup. Here, you can see us getting ready and serving for about half a day (then my battery died).

After discovering CHDK, I’ve started messing with timelapses. Here is how I created the above timelapse:

  • Installed CHDK on my Camera
  • Added this script to my CHDK/SCRIPTS directory
  • Set it to take a picture every 15 seconds, and run it until the battery runs out
  • Copied all the resulting photos off my SD card into a folder on my computer
  • Ran the following command (requires mplayer): mencoder "mf://*.JPG" -vf scale=640:480 -o timelapse.avi -of lavf -ovc lavc -lavcopts vcodec=mjpeg -lavfopts format=avi
  • And tada! You now have timelapse.avi.


Videobooth project

October 14th, 2008

I’ve been casually hacking on a videobooth project that will generate videostrips (analogous to photobooth and printing photo strips). Here are the full results of the free culture conference, where I got to test the system out last weekend. Check it out at, videobooth.me/fc2008/.


Free Culture Conference in Berkeley, Oct 11th & 12th

September 26th, 2008

Mozilla’s own John Lilly will be teaming up with Prof. Lawrence Lessig and Prof. Pam Samuelson to key-note (yep, 3 different keynotes) at the first ever Free Culture Conference. If you’re available October 11th and/or 12th, I would highly recommend you check it out!

fc

Should be a great conference. I’m particularly excited to meet up with other Free Culture activists.

See you there!


Eye-fi Video Support using CHDK

September 11th, 2008

Yesterday I demoed this to the team at Eye-fi, and they said I was the first person to show them video sent over wireless from a consumer camera (+eye-fi). One of the first implementations of wireless video on consumer cameras, I’m pretty stoked! It means you can use your cheap Canon camera to auto post data to youtube, or some other video sharing service.

If you are not familiar with Eye-fi, it is a special SD card that allows you to upload photos over wireless as you take them. It does not, however, upload videos as you take them. This is because it only looks for valid JPGs. I was able to achieve video uploading by creating a spoofed JPG with CHDK that embedded the video. Eye-fi uploaded the JPG, then the AVI was decoded client side.

To use this, you will need to make sure your camera is supported by CHDK (see table on the homepage). I’ve posted the patch over on the CHDK forums. You can get a built firmware for my camera (SD700IS) here.


10 years of Hampster Dance + 10 years of Mozilla

August 22nd, 2008

As a parting contribution to Mozilla, I offer you this!

http://foxkehdance.com/

Thanks to Robert Hrdinsky (his idea!) and Ulili Onovakpuri for making this happen.

God speed, Hampton.


Polvi.next

August 7th, 2008

In a weird mix of sorrow and excitement, I’d like to announce that I have chosen August 22nd as my last day with the Mozilla Corporation. While you may not have to deal with me in the office anymore, you’ll still have to deal with me in the community! :)

running fox

Shipping Firefox 3, 2, and 1.5 have created some of my best memories to date. I’m excited to see what is in store next (of which, I’m still sorting out).

Again, thank you for all the good times — I couldn’t have asked for a more seriously amazing experience!!