Foscam control via bootstrap

I just got a Foscam FI9821W V2 with pan/tilt control for cheap. Thought I’d try it out at the office. It’s was intriguing for a few reasons:

  • HD (whatever that means)
  • Pan Tilt controls.
  • “Night Vision Mode”

So okay.. I got it in the mail and fired it up. Seemed to work, but right away I noticed that their software totally sucks. You can do basic configuration via the browser, but you need IE to do pan/tilt control, and even in IE the picture is screwed up. I managed to get a good video stream over RTSP using VLC but since I run linux, I have to fire up a virtual machine running windows every time I want to control the camera.

There are a couple very basic Android apps that almost worked, but they were flaky – so I started looking around and found out the camera has an HTTP API you can use to control it. Here’s the docs:

Foscam HD Camera API

This is great, I can just bootstrap/jquery up my own interface.. so I did.. a single HTML file that I can basically control and call a couple preset positions I set with the POS IE interface.

This is my layout. You could make it much more complex and functional if you wanted.

This is my layout. You could make it much more complex and functional if you wanted.

First off, call a couple libs so I can build this out quickly:

<!DOCTYPE html>
<style type="text/css">
 body { 
    color: #fff;
 <script src=""></script>
 <link href="//" rel="stylesheet">
 <link rel="stylesheet" href="">

All API commands require a user/pass, so I build an ‘operator’ user in the camera’s setup, and then set the user/pw in javascript along with the camera’s URL. I opened a port in my router, and I use’s DDNS service so I can refer to the camera by URL.  You’ll need to get this working your own way, or by IP if you’re just going to use the local network.  Notice the ‘?callback=?’ at the end of the URL. This tells jQuery that it should do a JSONP request, and not normal AJAX. This is because for me at least, the camera is on a seperate URL than my web page, and AJAX won’t work normally without setting up some extra security stuff. JSONP will make a call to any URL, so I had to go this route. For details check this page out.

var url="https://<camera url/ip>/CGIProxy.fcgi?callback=?";
var user="user";
var pw = "pass";

Then I know I’m going to be making a lot of the same calls using jQuery, so I setup a quick function for sending commands:

function command(settings)
	settings['usr'] = user;
	settings['pwd'] = pw;
	jQuery.getJSON(url, settings).done(function(data) {

One thing to note, is that getJSON never calls the ‘done’ code. I think this is because it’s expecting a JSONP style response, and the camera doesn’t give it. Doesn’t really matter though since I’m not reading from the camera, just telling it stuff to do.  But basically I can call this, and it automatically adds my user/pw to whatever command I need, and away I go.

Since the ptzGotoPresetPoint command was used a lot, I made a function for this too:

function moveTo(pos) {
		cmd: 'ptzGotoPresetPoint',
		name: pos

// So now I can just do:

Another thing I noticed, was that the move commands will start the camera moving, but not in increments. For example, if I issue ‘MoveUp’ to the camera, it’ll just start panning up, until it hits the limit of the axis. I wanted to be able to do this in small increments, so I made a function to move a bit, wait then stop.

function stopMov() {
	setTimeout(function() {
		cmd: 'ptzStopRun'
	}, 150); // stop after 150 miliseconds. This seemed about right. You can change this. 

So my actual events from the buttons look like this example for move up:

jQuery('#up').on('click', function() {
		cmd: 'ptzMoveUp'

The actual video is RTSP which isn’t supported well by browsers, so I just used the snapshot command in an image tag. I use a bit of Javascript to refresh this periodically:

function qrefresh() {
	refresh(); // do the actual refresh
	// now schedule another refresh based on the value from our textfield. 
	setTimeout(function () { 
	}, jQuery('#refresh').val() * 1000); 
// start it going
setTimeout(function () { 
}, 5000);
// update the image based on a timestamp. 
function refresh() {
	d = new Date();
	jQuery("#image1").attr("src", url+"cmd=snapPicture2&usr="+user+"&pwd="+pw+"&t="+d.getTime());

Then I just built out a quick layout using bootstrap. This means it’ll still work on my phone if I need it to. You could do this pretty easily in regular HTML too.  Here’s the whole page in a Gist.

Let me know if anyone does something cool with this.


UPDATE: Here’s the format for the RTSP stream if anyone wants it:

rtsp://<hostname/IP address>:<port>/videoMain

Making Clementine work with Spotify

clementine-icon-256.pngI really like the KDE music player clementine. Tons of functionality, little fluff. It picked up the ball after Amarok decided to get bloated. Some people really like the new Amarok, I find it over-engineered.

I also like Spotify. There is a linux client that works pretty well, but I noticed with a closed source library you can also make it work with your Spotify playlists, which I use on my One+ One phone in the car all the time. Here’s how you do it. (BTW: This is on Kubuntu 14.04, 64bit)spotify.png
  1. Create the folder where the plugin will be placed.
    mkdir -p ~/.config/Clementine/spotifyblob/version14-64bit
  2. Download the plugin
    cd ~/.config/Clementine/spotifyblob/version14-64bit
  3. Make sure the executable bit is set on the blob
  4. The blob was looking for libspotify.12, so we create a symlink
  5. Go into the internet channels, and right-click on ‘Spotify’. Click ‘configure’
  6. Log into your account in the spotify settings. If the system doesn’t recognize the plugin, it will tell you here.

That’s it! Enjoy your playlists. Search doesn’t seem to be supported, but at least you have your stuff.


 Thanks to an anonymous user on pastebin for getting me going..

One Plus One Review

OnePlus_logo So I bought a One+ One phone. It’s a new phone company founded in 2013 by Pete Lau. I’ve owned an Samsung Note 2 for some time now, and I wanted to upgrade a little. The Note 2 after a couple years of being hacked, rooted, many ROM’s installed, and other abuse (including flying out the window of my Truck) was a great phone. I handed it down to my nephew, and it still works good in the hands of a teenager today running Android 4.4. But the One+ One offered a few things:

  • Shiny. New. Yeah – I’m a new phone junky. I’ve had sweet cell phones from before anyone knew what they were.  I even had a smartphone before anyone knew what they were. (Kyocera for the win) But yeah..
  • It has GLONASS which I wanted to try out on my adventures in the backcountry.
  • It’s friggin CHEAP – $350 or so for an unlocked unit with 64GB. Cheaper for the 16GB version.
  • Did I mention shiny?

So I skipped ahead in line (they had an invite only system for buyers) via Ebay, and bought one about 2 weeks ago. Here are the specs that I care about:07

  • Quad-core 2.5 GHz Krait 400 CPU
  • Adreno 330 GPU
  • 1080 x 1920 pixels, 5.5 inches (~401 ppi pixel density) display
  • 64GB of Flash, no SD Card slot.
  • 3GB of RAM (What?)
  • 13 Megapixel primary camera, 5 Megapixel selfie cam.
  • A-GPS, GLONASS geolocation
  • 3 Microphone active noise cancellation
  • LTE, WIFI, Bluetooth 4, NFC – Basically Wireless heaven
  • Cyanomod 11S, Android 4.4.2 – with the promise to update to Android L when it arrives.

032 Weeks Later

I like this phone! I know there’s a lot of gripes about their invite only system. Also many people have had some technical issues, but overall I’ve had an amazing experience with it. I really like Cyanogenmod and the camera is great. Performance is totally there. I was really surprised by the battery life. It has a 3200mAh battery, which my Note 2 would eat up in about 14 hours. This phone will last a solid 2 days if I stretch it. TWO DAYS. I’ve never had an android phone that would even approach that. If I’m really banging on it, it still lasts 24 hours plus. It’s really great! I’ve also really enjoyed the camera. It works way better than the 8MP one in the note, not sure I care about megapixels so much, but the clarity is really nice, and it’s fast. The included camera app is pretty decent. Performance wise, it’s better than my old Note 2. This is to be expected. It’s also note quite as snappy as iOS. This is also to be expected.  Overall it’s not a huge improvement, but better. This weekend I’m going out to the Mojave desert to experiment with the GLONASS + GPS stuff. I’ll update this post once I have a stronger opinion. In the city (LA) it seems faster than my experience with other Android devices, but hard to say, they’re all pretty fast at positioning. Build quality is really good. Not a single complaint. It fits nicely in my hand, feels very solid, more so than the Samsung, kind of reminding me of my old HTC that I loved. But bigger.


There’s some tricks that this phone does. That’s for sure. It’s built to compete with the newest generation of phones, but in the end it’s all about value. THIS PHONE IS UNDER $400. Think about that. The only phones on the market that can compete in features in speed at all are almost twice as much money. TWICE! I think the Note 4, which comes out soon will retail for almost $900, and this phone competes with it. Probably doesn’t beat it, but it’s close, and I think that’s pretty amazing.

Bottom Line

If you want an amazing phone for the price, this is your huckleberry. I don’t think there’s anything on the market that can compete value wise. Not even close. If there is, I’d love to know about it.

Opening KeePass securely and automatically in KDE

So I use KeePass a lot as my password manager. Why you should use a password manager is a little beyond this post, but it’s a great way to securely store individual passwords for every use you have, so you can use more secure passwords that you’ll never remember, and when one password is compromised, the other accounts you have remain secure.

Keepass works good in Ubuntu Linux using the Mono library, and it also works with Android, windows, which I need. There is a KeePassX project for a native port, but the normal version works well enough for me.

So when I logged into KDE4 I would have to type in my Kwallet password (kwallet is the password manager built into KDE – if anyone builds a plugin to read Keepass files, I will send you money) so I could connect to the WIFI, then I would have to type in the master password for KeePass, and then occasionally KOrganizer will ask for my gmail password to sync the calendar.

This sucks, so I wrote a quick little script to store my KeePass master password in Kwallet, and when KDE starts, retrieve it and start KeePass automatically from the file in my Dropbox folder.

# startup keepass with a password from KWallet
walletkey=$(/usr/bin/kwalletcli -f Passwords \
-e KeePass)

#open Keepass
mono /opt/KeePass2/KeePass.exe --lock &

#give keepass enough time to actually open, otherwise results are inconsistent
sleep 3

# Tell keypass to open your password database
mono /opt/KeePass2/KeePass.exe \ "/home/user/Dropbox/keepass/passwords.kdbx" \ -pw:$walletkey

Then save this script somewhere (I put it in /usr/local/bin/) and then go into Settings -> startup/shutdown and tag it as a script to start when you log into KDE.

…So now I just log in, type in my Kwallet password, and KeePass opens as well.


10 years with a Toyota Tacoma

Going ahead with my car review theme. I thought I would be remiss if I didn’t talk a little about my 2002 Taco.

It’s been my girlfriend for a while now, and it’s hard to over-state how much this vehicle kicks ass.

I could talk for a while about adventures and other such things that I’d like to relate, but let’s start with the facts.

2002 Toyota Tacoma

  • Engine: 3.4 liter V6 DOHC 190 horsepower. 5VZ-FE
  • 5 speed manual 4WD transmission with an electric differential lock.
  • Body Style: Xtra-cab
  • Lifted 2 inches using Icon coil overs in the front, and add a leafs in the rear. Bilstein rear shocks. (The Bilstein’s suck ass. Don’t buy them. The Icons are awesome)
  • 247,000 miles. No engine/drivetrain/electrical failures. Just changed the clutch for the first time about 6 months ago. I expect it’ll continue to run fine for another 100K.


Northern Nevada Backcountry

Northern Nevada Backcountry

This really means 2 things to me, on-road and off-road. It’s a truck, not a car, and on-road performance is affected as a result. The suspension is stiff (especially after the lift) and I’m sure if I tried I could roll it over in a turn. On road it has plenty of power though, and cruises comfortably at 80+ mph if I need to, and if need be, I can always drive over things to get where I’m going. (Bushes, center-dividers, cats, dogs, etc..)

Off road is where it starts to show it’s color (green by the way). This is no rock-crawling custom Jeep or, a super desert racer that can jump 30 feet in the air, but for what I do, it’s almost perfect.

1) Traction – it’s 4WD, has a lock (just rear) and I’ve never had an issue with traction. I drive mostly in the deserts of the southwest, so mud isn’t really an issue, but what mud and snow I’ve see hasn’t been an issue. I’ve driven many miles off-road through un-plowed roads with 12″ of snow and it’s dealt gracefully with it.

2) Clearance – out of the factory clearance is good. I would occasionally wish that I had a little more, and navigating tough spots was a little tougher than I wanted, so I put 2 inches in the suspension with new coil-overs in the front and add-a-leafs. Now it’s perfect. It’s not too high, not too low, and I don’t think I could improve on it much without hurting the rest of the package.

3) Storage – yeah, it’s a truck, and you can put stuff in the back. This is one of 2 things that made me buy a truck rather than a Jeep. I can carry enough supplies to last out in the boonies for quite a long time. Even with 2 people carrying crap. Try that in a Jeep. Sure there’s Jeep trailers, and racks, and stuff, but *yawn* sounds like a pain in the butt.

4) Size – It’s small. Not as short as a jeep (see Jeep envy below) but it is narrow and fits places well, and being small helps, a lot when you’re out cruising around.

5) Wheel base – This is a boon and a curse. I can drive comfortably on bumpy roads at very high speeds in comparison to some vehicles out there. This is good, since there’s some long lonely dirty roads out there, and sometimes you just want to get to the next spot. On the down side, I’ve seen jeeps drive around stuff it took me 3 minutes to navigate. *shrug*

Nevada Desert

Nevada Desert Mountains


 Old Age

235,000  miles later, it starts immediately, gets essentially the same mileage as when brand new, and is reliable and capable still. A few things are showing their age and seem to be symptomatic with these vehicles:

Rear axle leak: The rear axle seals started leaking onto my rear drum brakes at about 220,000 miles. Grease and brakes are kind of opposite tools, so you can imagine the result wasn’t great. It was noticeable that my emergency brake and stopping power kind of just quit.  In talking to others including the dealer it’s apparently fairly common with these trucks. If you have one, keep it in mind. Not too bad since at 220K miles, these were still the original set of factory brake pads.

Front Bumper: Over the course of hundreds of miles of bumpy roads, the bolts holding the front bumper wore through. If I had watched more closely, I could of tightened them and avoided the issue, but it wasn’t apparent until it broke.

Mass Air Flow sensor: The MAF sensor has gone out, and is throwing the CPU into an open loop condition. My power has gone down and you can smell that it’s not burning gas as efficiently any longer. This is my next thing to fix, I’m just not getting the horsepower any more. The O2 sensor is throwing errors too which I’m sure is also a problem.

Cats – The exhaust mesh of platinum and other goodness seems to have turned to dust. This is an issue since they’re pretty expensive to replace. I’m waiting for now since the truck runs fine, but at some point I’ll have to dump a grand or two into it I expect to get this fixed.

Update: I replaced the O2 sensor and the MAF, and the cat issue has gone away and the truck runs as good as ever. I’m even gettting better mileage. I think it’s running slightly leaner now for some reason, so I average 19-20 MPG, which is better than when I bought it. Go figure.


The High Sierras of California


As the current blue book value shows this 10 year old, 235,000 miles vehicle to still be worth over 1/3 of it’s showroom value, ($7,033 at ‘fair’ condition, their lowest rating) this vehicle is known to be one of the best at holding it’s value out there period.  I’ve had many amazing adventures with it, and it’s held up, gone over, and through some of the harshest conditions a vehicle will face and not complained one bit.  I’m pretty sad Toyota decided to update their proven rock-solid model, but even the new Tacoma design seems to be pretty nice.

This truck is hard to beat.

Death Valley Winter Storm

Death Valley Winter Storm

Lenovo T431 Ultrabook with Kubuntu 13.10

t431sA couple of months ago, I bought a flat black new Lenovo T431s Ultrabook. It came with a i7 quad core processor, 8 gigs of RAM, and a 256 gig SSD. A nice machine.

It also came with windows, which I don’t deal well with, so one of the first things I did was put Kubuntu 13.10 onto it, ditching the Windows 7 partition entirely.

It worked out of the box, mostly, but there were a few issues I had to sort out to really get it working. Now that I have, I thought I’d pass on the info, because I’m really pretty happy with it.


One of the first things I did after un-boxing it, was to play with the power controls. Being involved peripherally in the electric car industry, and writing battery charging software in the past, I’m acutely aware of battery life, charge cycles, etc.. there’s a lot of FUD out there, and I found it interesting that the power control utility in the system tray allowed you to restrict the battery from charging above a certain amount, or discharging below another.

So you can set it to only charge to 80% for example, and then discharge to only 20%. This of course limits you to 60% of your total charge, but I know that this can increase the effective charge cycles for lithium batteries significantly. So I tried setting it to 80% max. It worked. Cool.

Then I installed Kubuntu. I quickly noticed that the laptop would not charge past 49%. There was no control that I could find in Linux to modify the settings, and the older thinkpad battery controls through /sys/ filesystem didn’t work at all.

So I had to install another laptop drive I had laying around, install windows on it, and install the battery utility. Then I could change the settings there, and then switch back to my Kubuntu install and it worked.

I ended up switching the settings to 95% in windows, which gives me about 5 hours of battery life in Kubuntu (Wifi, 50% screen brightness, programming, surfing, etc..) which is pretty good for me.

Don’t forget that you’re hosed once you’re in Linux until someone writes a driver. (Update: See Comments below, Julian has written a patch for this. Thanks Julian!)


The touchpad default settings make it essentially useless in Kubuntu. With the touchpad utility in settings it gets a little better, but a lot of things still don’t work like coasting and the no-scroll areas. After reading a few other experiences, and tweaking on my own, I came up with this bash script which sets things fairly well:

synclient ClickPad=1    
synclient ClickFinger1=1
synclient ClickFinger2=3
synclient ClickFinger3=2
synclient EmulateMidbuttonTime=0
synclient PalmDetect=1  
synclient PalmMinWidth=5 
synclient PalmMinZ=40   
synclient HorizHysteresis=50
synclient VertHysteresis=50    
synclient HorizTwoFingerScroll=1 
synclient HorizScrollDelta=2000
synclient VertTwoFingerScroll=1
synclient VertScrollDelta=-111 
synclient CoastingSpeed=20   
synclient CoastingFriction=10
synclient CornerCoasting=0
synclient MaxSpeed=40
synclient MinSpeed=.1    
synclient AccelFactor=.05    
synclient AreaBottomEdge=3700
synclient TapButton1=1
synclient TapButton2=3
synclient TapButton3=2  
synclient MaxTapTime=250
synclient RTCornerButton=2
synclient RBCornerButton=2
synclient LTCornerButton=1     
synclient LBCornerButton=1     
synclient RightButtonAreaLeft=3914
synclient RightButtonAreaRight=0
synclient RightButtonAreaTop=3918
synclient RightButtonAreaBottom=0
synclient MiddleButtonAreaLeft=3100
synclient MiddleButtonAreaRight=3873
synclient MiddleButtonAreaTop=3918
synclient MiddleButtonAreaBottom=0

More details on what these actually do are here:

Update: Desktop Switching Gesture

I also configured XbindKeys to recognize the left/right scroll buttons (when you tip the mouse wheel on some mice) to switch virtual desktop left and right. Then combined with horizontal scrolling for the touchpad above, I can do two-finger swipe gestures left and right to switch desktops like on a Mac, which is pretty handy when dealing with smaller screens.

Here’s my ~/.xbindkeysrc

# Bind "left" mouse button to desktop left
"xte 'keydown Super_L' 'key Right' 'keyup Super_L'"
# Bind "forward" mouse button to Ctrl+F9
"xte 'keydown Super_L' 'key Left' 'keyup Super_L'"

Then in KDE shortcuts I bound the windows-Left Arrow and windows-Right Arrow to switch desktops. As long as you turn up the HorizScrollDelta pretty high so you’re not switching desktops ever time you get the coffee jitters, it seems to work okay.

Fingerprint Reader

This can be configured using the fprint library and the handy fingerprint-gui package in Ubuntu. Nothing installed out of the box, but easy to get working. Works great, and allows sudo access via the fingerprint reader. It will not work with KDM logins, but supposedly should work with lightDM logins although I haven’t gotten it to work.

Essentially it seems to tie into PAM, so whenever a sudo request comes up, it will pop up a little window, or a message in the shell to use the reader if you want. You can still enter a password if you like. Pretty slick, but honestly I don’t use it that much.

Power Saving

The old school thinkpad power control drivers don’t work. There’s lots of tips here: but I’ve noticed it’s hit and miss on a few because this ultrabook is a big redesign, so a lot of the old thinkpad tricks just don’t apply.

What did really help was running thermald. This will jockey the CPU to keep heat down, and power ~= heat. So if your system is cool, you’re saving battery life. This worked much better than the standard approach of using CPU frequency scaling, so now I only have this running instead of frequency tweaks.

Other Notes

Overall works really well. Multiple screen support in KDE is pretty good, the displayport works well, so I can get several big screens going if I want. KDE doesn’t seem to want to remember taskbar settings per-screen, so if your external monitor has a taskbar, and you unplug it, that taskbar gets tossed onto your laptop screen, so there’s always a manual process of moving taskbars around if you switch monitor configuration a lot.

It’s recommended to change some default options if you run an SSD, so I did in /etc/fstab:

UUID=d03ab1 /               ext4    noatime,nodiratime,discard,errors=remount-ro 0       1

This seems to work a little faster (probably due to the noatime/nodiratime setting) although I didnt’ benchmark it, so it could be me dreaming. The discard settings helps the drive keep free blocks from slowing things down over time, and the rest is normal.

Love the speed of the SSD.

Hope the helps someone. If you have any additional tips, let me know. I’m still playing with the touchpad settings to get the top buttons to work optimally. If you’ve sussed this out, please let me know.

Mazda 3 – review after a year and a half

NRMA Motoring and Services NRMA New Cars

NRMA Motoring and Services
NRMA New Cars

In February 2012 I purchased a Mazda 3 kind of on accident. The local dealer had them, and I was looking for a used car at the time that got better mileage than my Toyota Tacoma (which at 250K miles just had it’s first new clutch.. gotta love Toyota trucks..)

They had just come out with their new SkyActiv system, which essentially just runs the engine at very high compression to get more efficiency out of it, and tweaks the transmission, although I’m still not sure what’s different about the transmission other than it totally sucks. (see below) It was the right price, and 40MPG+ sounded pretty good, so I got it, figuring I’d actually get about 30MPG.

At first

The smell. Seriously, when I was thinking new car smell, that cancer causing stew of plastic, glue and paint that we so love – I really didn’t think of Cosmoline, the stuff they put on guns when they’re in storage for long periods of time.

No, I didn’t, but that’s what I got. By the time I got home the chemical waft that was coming off the car made my eyes water and my nose wrinkle. I called the dealer, and just got their ‘oh – that. It’s cosmoline from the engine. It’ll burn off..’

I think it was doing just that and taking my nose with it. After a week or two it did go away though. Just saying that first week was tough.


The 2 liter engine puts out 155 horses, and feels pretty peppy. If I put my foot into it, it actually goes – ignoring the transmission which seems to take 10 minutes, six phone calls and an SMS message to shift into a lower gear. Once it shifts I never feel like I’m asking for favors on the freeway. Handling is nice too, it corners pretty well with just a little under-steer if you push it, but again, I wasn’t expecting a sports car.

Braking is AWESOME. It has anti-lock brakes, and 4 wheel disk brakes which I know is more marketing than anything (read about how much more work your front brakes do sometime) – but it seems to stop immediately. From any speed. 80 MPH? No problem, hit the brakes, in 3.2 inches you’ll be at a complete stop. No worries. It’s magical.

As a guy with trucks in various states of repair over the years I’m used to planning months in advance when I need to stop. Slamming on the brakes is just a way to make a lot of smoke and noise, it has nothing to do with stopping. This car is night and day different. The BMW owners out there may roll their eyes, but for me this was an amazing thing.

They claimed it would get 40MPG, and I actually, surprisingly get more than that. I think I’m averaging overall 43MPG right now, including my around-town driving. I’m guessing on the highway I get about 45-50MPG, and around town 35ish, but I’m kind of a lead-foot. If I drove slower I’d get better mileage around town.


MAZDA_SH-VPTS_DIESEL_1This SkyActiv engine is a trip. When you start it on a cold morning, it sounds TERRIBLE. I thought it was broken at first, but for a minute or so until it warms up, it sounds clacky and clunky and then it starts to purr. I’m sure this is the compression, because at the 12:1 ratio it runs at with gasoline, it borders on diesel compression. It’s horsepower/torque starts to really cut in at about 2700 RPM, and smoothly drives up through 5000 RPM if needed, above that there’s a rev limiter, which is probably good. Like I mentioned 155 horses is enough power, I’d like more, but my trade-off was efficiency or I’d of bought the Mazda-Speed edition.

As I mentioned the mileage isn’t in the 50-60 range of a Hybrid, but close. Considering the price, and features, additional power, and the fact it doesn’t look like a smashed shoebox on wheels, I’ll take this over a Prius any day.


WHAT THE HELL IS WRONG WITH THE TRANSMISSION?!? – I mean it’s not broken. It’s a 6 speed automatic with manual override through all 6 gears. If you’re just cruising around it’s fine, it shifts, is quiet, and seems to do it’s job, but when you need to react to something, jump into traffic, change speed quickly, etc – it just sits there in whatever gear your in and stares at you. I’ve taken to putting it in manual mode when I’m preparing to make a move because there’s no other way to make it upshift correctly. Here’s what happens:

  • 0 seconds: I decide to accelerate into the faster lane to my left.
  • 1 seconds: I push on the accelerator, and start to make the lane change.
  • 2 seconds: No acceleration. The engine sounds like it’s trying, but the transmission doesn’t shift.
  • 3 seconds: I’m starting to get mad. The transmission suddenly decouples, shifts down TWO gears to 3rd, and the engine revs to 4-5K, which is at the top of the line, so I have no headroom to actually accelerate. Lots of noise, nothing happens.
  • 4 seconds: I feel like an ass because I’m still going 45 mph in the fast lane, and other drivers are piling up behind me.
  • 5 seconds: The transmission shifts into 4th and suddenly I’m in the right place to speed up.

You see the problem. And yes, although I prefer manual transmissions mostly, I have owned automatics before and they’ve never behaved like this. I keep meaning to ask Mazda in case there’s some special turbo-boost button or something I need to press, or if perhaps I need to send an email to my car before changing lanes so that it can prepare properly.


2010-Mazda-MAZDA3-Sedan-i-SV-4dr-Sedan-Interior-2Nice layout, the seat isn’t the most comfortable I’ve had, but it works, although when driving a lot it hurts my back more than my pickup did. Go figure. The shifter is in the right place and the one conflict I’ve run into is the dash 12V outlet. If you have an accessory plugged in, it hits the shifter if it’s too big.

My one complaint is the steering wheel is laid out in a T formation. Which means my normal relaxed hand at the bottom hold on things that I’ve done for the past umteen years with my Toyotas, is impossible, so I just cannot get a comfortable hours long grip on the wheel, I have to use muscle energy or two hands to balance the wheel. Dumb. I guess it’s a learned behavior to some degree, but I can’t figure out how to do it comfortably.


The best stock stereo I’ve had, ever. I think this is fairly common in the newer cars though, they finally figured out that drivers like a decent stereo. Includes hookups for XM, and also came with Bluetooth phone/audio integration. Bluetooth audio sucks period, but the convenience is there for sure. It also has a 3.5mm jack for AUX in if you want, and a separate 12V plug in the center console for keeping your phone charged, while the dash one remains available for guests.

My one complaint is that the biggest knob in the center of the audio controls is the track/frequency selector, which completely throws me to this day. It’s a giant knob, it should be volume. That’s what the big ass knob is for, to TURN IT UP. Instead I have to hunt for one of two smaller knobs the same size and shape which controls volume or use the steering control which is a button. Lame. Get your UI team on that Mazda, stat.

Sum it up man.

Overall: I love this car. I wasn’t looking for something sporty, and this is no sports car, but it can actually corner (keep in mind I had been driving a 4WD truck) and it stops on a dime, it’s easy to control and low to the ground. It looks nice, has a decent back seat, and is a reasonably comfortable drive. The stock stereo sounds great, and the Bluetooth system works pretty well with my Samsung Note 2.  It drives heavy, and does what you tell it to do (mostly) and I can say I’m pretty happy with my experience.

Pros: Great mileage, comfortable and steady handling. Good price. Dealer oil changes are a rip off.

Cons: The steering wheel is the wrong shape, and the transmission is slow in automatic mode. It’s even kind of slow in manual mode. I can shift an MT with a clutch about a billion times faster.

Put it in a box!

After buying the budget RTL-SDR I decided that I needed to go lower. The Nooelect upconvertor was just a bare board though, and the adapters and cables started to piss me off almost immediately.

USB->RTL->upconvertor->antenna, plus another USB to power the upconvertor. Just didn’t seem right. Also it was obvious running the setup anywhere near my computer resulted in tons of wideband noise being picked up.

So I bought a Hammond project box and stuffed it all in there.


As you can see, instead of using connectors, I pulled the RTL USB connector off, as well as the SMA connectors on the upconvertor board and wired it up directly. Instead of an SMA antenna input, I switched to BNC which matches more of my stuff, and wired a panel mount to the upconverter board.



The USB connection was the uglyest:


I originally intended to solder directly to the leads on the RTL USB connector, but that didn’t work out very well, so I pulled the connector off completely. You’ll also see a small toroidal choke that I ran the cable through which was recommended to limit the harmonics from the digital signal I assume. I put it inside to be clean, but I’m wondering if it would work better if I kept it outside the case. I can use a clamp on choke outside as well I suppose.


Since the RTL board didn’t have any mounting holes I just used half of the clamshell case to cradle it, and mounted that to the case with a single standoff.



Overall I think it looks okay, and is much more functional. I’ll post some screenshots of spectrum once I test it connected to an antenna.


Hammond Box: 1550B I think. 


BNC Panel Mount:

USB Pinout:





Recently I ran across a neat hack. If you buy one of the low priced HDTV tuners that plug into your USB port, there are drivers that can use the internal sampler which runs at above 2.4Ghz to sample RF. Boom, software controlled radio.

The best part is that these only cost on the order of about $20, so you can start scanning the airwaves with a few different software packages:


SDR# – This is a C# program and runs great in windows, but you can run it using Mono in Linux (and perhaps Mac?)


Gqrx receiving NOAA-15 weather satellite


GQRX is powered by gnuradio, and provides a good interface in Linux. Gnuradio is very powerful with routing features, many filters, and decoding possiblities, but if you’re not used to the Linux environment, it can be a little intimidating.

Because the sampler chip only will go down to about 50Mhz, I purchased a $50 upconverter from Nooelec, which provides an IF mode 100Mhz higher than the receive frequency. Simply put, it boosts everything by 100Mhz. So now I can listen to AM radio for example, that was 820Khz, far too low for the dongle to receive  at 100,820Khz. Something well within the band of the dongle. This makes CB, Shortwave, and other HF and VHF bands available as well. Shortwave is very interesting. Lots of extreme paranoia emanating from Nashville these days.

The other thing that’s lots of fun is decoding the digital transmissions you’ll find. PSK, FSK, RTTY and even pager transmissions can be decoded.

Since the bandwidth is so huge, I purchased a discone antenna which works well so far. Soon I’m going to combine the dongle and upconvertor into a single box, which makes it easier and may improve performance as well.

FTC tournament

On the 8th, I volunteered at a robotics competition put on by FTC out in Palm Springs.. was pretty neat. The kids were great, and the robots were really creative. Here’s some video:

I think it’s awesome that people spend as much time that they do helping our youth become creative problem solvers and critical thinkers. I wish it happened more.