Friday, September 4, 2009

The Dual XHD7714

I've been riding with the stock Bose system in my RSX for years now.  I'm tired of it.  Most of my music is on my iPhone and my only 2 options to play music in the case was the use of a shitty tape-deck adapter or a shitty fm tuner.  Both of which, are shitty.

I heard that 94.9 The Sound still exists, on 9.49 HD2.  So - an HD radio the new car stereo must.

My iPhone has bluetooth capabilities, including streaming music.  So - a Bluetooth thingy the new car stereo must.

If you go to www.cruthfield.com - head towards Car Receivers, skip the car selection, select "Built in HD radio tuner".  I didn't want to have to purchase and external module unit.  That narrows the list to only 11 radios.  Seriously? 11?

Then - oh dear, I select Built-in Bluetooth.  That leaves 1 radio.  Only 1 freakin' radio.  The Dual XHD7714.  It has good reviews, and hell, it's only $180.  So I do my research, as best I can, get the appropriate equipment from clubrsx.com so the new unit can send to my factory amplifiers with little effort.  A few days later all the crap shows up and I spend an hour or two installing it - beautiful.  I have me a new car stereo.



Well, I will say this about it - it does everything it says that it does, poorly.

Where to start.  Okay, lets start with the installation.  My first major concern was the lack of the typical Orange cable.  The Orange Cable is typically there to let the stereo know when the headlights are turned on, this allows the radio to be nice and bright during the day time, and tone it's shit down at night.  Yeah - no Orange Cable.  I checked the manual, there is a Dimmer setting in the menu on the unit - Dim, Medium, and Bright.  Default is Bright.  Dim is good for at night, but it's a pain to change it all the time so I just leave it on Dim.  I can't read the stereo during the daytime while wearing sunglasses.  Oh well - it's not *that* big of a deal.

The HD radio.  Ya know, I can't really complain about this - it sounds good - reception isn't too terrible either - so - +1 for the HD radio.  I get to have my 94.9 The Sound back. YaY!

The iPod cable.  The front of the unit has a headphone aux jack, and a usb jack.  They provided a cable which combines both of these and has a regular iPod connector on the end.  Kick ass, I get to listen to my tunes and charge my phone simultaneously.  Except if you use this on an iPhone - the iPod application part of the phone goes into "Dock Mode" and does not allow you to control anything.  All controls are from the head unit - which - compared to the interface on the phone, suck ballz.

Auxiliary cable.  Using just a regular mini-headphone->mini-headphone cable to go from the iPhone to the head unit works just as expected.  You have to turn the volume on the phone to 1 knotch below maximum to get decent volume with no distortion.  This is expected.  Sounds great - it's Aux - Aux is a really hard thing to fuck up.

Bluetooth stereo audio streaming.  I can leave the phone in my pocket and listen to music wirelessly?  Kick ass.  Except - not so much.  Yes, you hear music, bad music.  I haven't tested this with a laptop yet, but I'm pretty sure this is more the phone's fault than the stereo's.  See - the Audio over Bluetooth specification is called A2DP.  During an A2DP session the sending device determines bitrate and quality of the stream, not the receiving.  From what i've read the iPhone is an asshole and picks a very lower bitrate quality so the audio is very distorted and crappy sounding.  The unit should also be able to change tracks and get song info and whatnot over bluetooth as well.  It wants, it really really wants to - too bad the iPhone doesn't support it. Bleh.  So - until I try this out with either a different phone (non-iPhone) or a laptop - I'm going to assume for now that it sounds great.  I'll get back to you on that.

Handsfree bluetooh calling.  I found that unit has a freakin' microphone built right into the faceplate.  Nice.  Too bad the person on the other side of call can't understand a word out of your mouth.  The sound that little microphone picks up is very tinny and garbly.  I've used bluetooth handsfree headsets with my phone in the past with great success.  But the speaker phone - only use in case of emergencies.  However, there is a plus side to this.  If you leave the unit paired with your phone, it lets you know when it's ringing and displays the phone number on the screen.  Then just pick up the phone and answer it like normal.  Even during things like HD Radio - it will kill the radio and make a very distinct beeping over the car stereos.  Got the phone on the passenger seat, got he music cranked up, no way you could hear the phone right?  Well, this fixes that.  +1

Over all, when it comes to the XHD7714 from Dual, you get what you pay for.  $180 for this unit I still think was worth it.  Hopefully this was a test run unit for a more major manufacturer who can see the flaws and fix them in a newer (pricier) unit.  I like it - I enjoy my experience in my car greater than before, and that's all one can really ask for.

Wednesday, September 2, 2009

Another reason bash kicks ass

Okay, so - BASH kicks ass.  I just discovered (thanks to my buddy Aaron) a new keyboard shortcut.  I often find myself writing, at times, rather lengthy One-Liners.  Sometimes involving if statements and nested loops.  Trying to write this out on a single line is very doable, but, sometimes it needs a little better formatting.  So - create a script, then run it, and then delete it right?  Yes, and bash will do that part for you.

Press:  CTRL+X, then CTRL+E - suddenly you will find yourself in the magical world of your favorite editor, in my case, Vim.  Write your program - you do not need to place a #!/usr/bin/env bash at the top.  Just start writing.  Then write, and exit - as soon as the editor program exits, your script is run.  Basically what is happening is bash is opening a temporary file (like /tmp/bash-fc-147738968), marking it executable, running it on close of the editor, and then deleting it when done.

Using the pipe + ssh to mirror a disk

I have a few odd jobs here and there.  One of which is being a remote freelance admin for a business' 2 co-located servers.  They run a few virtual machines using Xen.  They are in different places and have no shared storage.  I was asked to move one of the virtual machines from box A to box B.  The disks for the VM's are LVM partitions.

I created the new lvm partitions on Box-B with the same size as on the old server.  I shut down the virtual machine - and ran a variation of the following command.

box-a #> dd if=/dev/vg1/disk1 | gzip | ssh root@box-b "| gunzip | dd of=/dev/vg1/disk1"
Did you know that you can pipe standard i/o through ssh like this?  Lets break this down.

'dd' is a program for the direct copy and writing of data.  'if' is the 'input file' and 'of' is the 'output file'.  If no output file is specified it defaults to Standard Out, same for no input file, it defaults to reading from Standard In.  The block device is read, piped through gzip to compress it, then piped to ssh.  The quoted section after the ssh is what command to run on the remote host.  If a command is preceded by a pipe then ssh will take anything it gets from standard in, and direct it out to there.  In this case - 'gunzip' - to decompress the stream, then to 'dd' which then writes to the block device on the remote system.  The gzip/gunzip wasn't necessary but it sped things up since my bottleneck was the wan between the 2 hosts.  20 or 30 minutes later it was done.  I periodically did a 'killall -USR1 dd' in a different shell so dd would print it's progress.  Once this was completed I transferred the Xen configuration file to the new machine, made changes to it's IP and booted the VM.

Wednesday, August 26, 2009

New laptop

I just got my new laptop on Monday.

Asus G51VX-X1A

It came with Windows Vista 64 Home Premium.  Since I play a lot of games like TF2 and WoW, I'm leaving Windows on there.

So, why not a desktop machine?  I don't do a lot of travel, but I do love to sit at my regular coffee shop / bar and have a drink while writing something.

So, why this laptop?  My old desktop was a beast when I built it 5 years ago.  Dual Xeon 3.4ghz with 4gigs of ECC Registered and buffered memory.  I basically took server hardware and stuck it in a tower.  This box was loud, heavy, power hungry, and when push came to shove - not meant to play games on.  Consumer grade processors are actually faster because they allow for variation and less precision in calculations, consumer grade memory is faster because every access doesn't require a parity check.  But I will say this, that computer was by far the most stable desktop I've ever owned.  I am very interested in para-virtualization operating systems and the cpu in that box doesn't do Intel's VT-X.  It wasn't invented yet.  This laptop has a P8700 chip in, which handles VT-X - also, the motherboard is capable of VT-D hardware virtualization.  It's portable, quiet, and will do everything I would want out of a desktop.  I loaded up TF2 with all the settings on max, 1920x1080 with vertical sync enabled.  40 to 60 fps in a level with 32 players.  Now that's a f'ing gaming machine.

I've already setup dual booting with Ubuntu 9.04.  I've been out of the Linux Desktop world for a few years and have been concentrating on enterprise server environments.  My Ubuntu experience thus far has been fairly refreshing.  I was already very familiar with Debian and it's package management system (apt) so Ubuntu made perfect sense.  Only weird thing was the | key wasn't working properly - it was instead making < and > instead of \ and |.  I temporarily fixed it by adding a custom .xmodmap to my user profile.

echo "keycode 94 = backslash bar" > ~/.xmodmap; xmodmap < ~/.xmodmap
Fixed - at least for my user.  I'll modify the system level keymap later when I get some time..  I've been lazy.

On a side note, that little issue was the inspiration behind the title of this blog.  In my world - the | (pipe) key is probably the most important key on the keyboard.  I have done some pretty crazy things with the mild redirection of input and output from command line. 

The | is your friend.
The cake is a lie.

First Post

This journal is intended most for technical discoveries, techniques, habits, good practices, and personal experiences. Linux techniques will likely be the common theme here, but I may branch out into other realms. For now, this is Chuck's blog about Linux.