Sunday, June 14, 2009

Setting up mt-daapd with Avahi on Xubuntu and Ubuntu

I have all of my music on my media server, and it is being shared by Firefly and Avahi so I can easily listen to it on any computer with Rythmbox or iTunes. Firefly is the media server. Avahi is also called Bonjour by Apple or Zeroconf or Autodiscover. It is the service that advertises Firefly to iTunes. It also advertises printers to Mac computers.

There are some pretty good explanations on the internet how to initially set up Firefly, but most of them miss an important part at the end so the next time you reboot, iTunes can still autodiscover the shared music library. I'll briefly go over the first steps in case they disappear off the net


Avahi is probably already installed and autostarts on your Ubuntu machine
Install firefly
sudo apt-get install mt-daapd

Install ID3 tag reading package
sudo apt-get install libid3tag0

Start firefly
sudo /etc/init.d/mt-daapd start

Update startup scripts so firefly restarts
sudo update-rc.d mt-daapd defaults

Go to firefly config page (or config file) and tell it your music directory
http://localhost:3689 or sudo nano /etc/mt-daapd.conf

Restart firefly
sudo /etc/init.d/mt-daapd restart

Now we need to configure Avahi to serve Firefly correctly after reboots. For some reason it will work right after installation without this. But the next reboot it would quit working.

sudo nano /etc/avahi/services/mt-daapd.service

Paste into that file

I give up, posting code into Blogger with less than symbols is broken and a huge pain in the butt. Check the link above for the code.

Restart Avahi
# /etc/init.d/avahi-daemon restart

That's it. You should now be able to see your shared music library on iTunes. And it should survive a reboot.

Pioneer DEH-P7100BT Car Stereo Review

I just put a Pioneer DEH-P7100BT stereo in my car. It is their top of the line single din stereo with integrated Bluetooth and iPod control. It is dumb that companies are still making mid and top of the line stereos requiring $100 adapters for those features. Personally I think companies should get rid of the CD player and add integrated BT, iPod, more USB/memory card inputs, and HD radio to their stereos. They still charge an arm and a leg for HD, but it costs maybe $2 in additional chips. I also installed a PAC-Audio SWI-PS OEM steering wheel remote adapter.

I considered this Pioneer, one older and cheaper Pioneer model, and a Kenwood model. The Kenwood had pretty poor reviews for BT sound quality and pairing robustness. I chose the new high end Pioneer because I liked the 2nd USB input, the multi line display. iTunes tagging and telephone voice control also sounded intriguing.

The Pioneer is a solid piece of hardware. It could be a really enjoyable stereo with some firmware updates to resolve interface errors. As it stands, the user experience is pretty dodgy. I would probably buy the cheaper Pioneer model, instead of this one absent improvements, if I could do it again. I hope Pioneer recognizes these problems, and releases a firmware update I can apply to my unit.


The big problems -

The tune and seek buttons are the same. You press the button quickly to go to the next possible channel (up or down by 0.2 mhz exactly), or press and release after the beep to go to the next receivable channel, or continue to hold to quickly scan through the stations. The problem is if you don't release the button in less than a tenth of a second after the beep, the radio may scan past the next receivable station (especially if it is within 0.2 - 0.6 mhz of the current station), and land on the receivable station several away from where you currently were. The radio should have a debounce in the button so if you release within 0.3 seconds, the radio will back up to the receivable station immediately after where you were, even if it has already scanned past it. As much as I don't like Sony, I've seen this feature in their products and I LOVE it.

The display has some moving and static "screensavers" it shows. I'm not a big fan of the moving ones (but to each his own). What I find disgraceful, is even the 2 simple static screensavers, and few elaborate static screensavers, reverse their contrast every so many seconds. There is no way to have a completely static display, and no way to stop the contrast changes. It is visually annoying, and the dark text on light background is way too bright at night. I want a simple display frozen at light text on dark background. It is funny because occasionally the stereo will forget to change contrast, but if you press a button it will wake up and start doing it again. You can turn "reverse mode" off. It is on page 51 of the owner's manual. I had read the owner's manual 3 times before posting this information. Stupidly the manual never uses the obvious word "display contrast" and instead calls it "screen indication". So I thought this setting meant if you were in the middle of the menu, it would start backing out of the menu after 20 seconds of no activity. Chalk this one up to incredibly poor owner's manual writing.

You can set the daytime brightness of the display "undimmed" (with the headlights off). But you can't set the nighttime brightness of the display dimmed, and the amount it automatically dims is not near enough. It should either dim the display much more when you turn on the headlights, or you should preferably be able to set both the daytime and nighttime brightness. You can do this too, and this one was my fault. What can I say? Trying to take in a whole manual in 2 days, especially one where the device isn't intuitive can lead to forgetfulness. Again it is stupid, but you have to turn the ignition on, headlights off, and stereo off to get to the menu to set the daytime brightness. Alternatively you have to turn the ignition on, headlights on, and stereo off to get to the menu to set the nighttime brightness. This is no longer a big problem, but it would be even cooler if you could set the daytime setting with negative contrast (dark text on light background) and nighttime setting with positive contrast (light text on dark background).

When you seek or scan to a channel that also happens to be a preset station, the radio never identifies it as a preset. This is pretty annoying when trying to set your preset stations. Also when you are setting a preset station, the preset number will flash twice, then the new station will appear next to the preset number. If you release the button while the preset number is still flashing but before the new station number appears, instead of setting the new preset, the radio will tune to the current preset. This is incredibly counter-intuitive and annoying. There is no reason to tune to a preset from the preset setting screen. As soon as activity begins on the screen, releasing the button should set the new preset.

The display flow is a disaster. First the preset number is tiny and in the top right corner. It should be bigger. The station number is bigger, but it should be bigger still. The station number is ONLY shown for a few seconds in the bottom right of the screen. That 8 digit area is reused as a scrolling RDS display until all data is received. If the radio station is kind enough to embed their station number in the RDS data, you might get a second chance to see the station number. Otherwise the radio never again shows you the station number unless you go into another function and back out. After all RDS data is received, the band and song name is reposted in 2 lines in the bottom left.

How should it flow? First the preset number and radio station number should ALWAYS remain visible in 2 lines on the right side of the display (preset line smaller). Second, RDS data should be posted as received sequentially in 2 (potentially smaller) lines in the bottom left of the display. This may mean the data is in the wrong position. After all data is received, the RDS data could be reposted in the correct format in the same place.


The small problems -

The radio tune/seek button (rather than the preset seek) is also the song skip button for CD and iPod control. This is apparently a problem with every brand that shares the Pioneer remote control protocol. This means if you have a remote control on your steering wheel, you can skip songs but you can't go to the next preset station. Instead you go to the next station you probably don't want.

In CD mode, preset seek may seek through the song (though that is counter intuitive), so you might not want to change anything in CD mode. But in iPod mode, preset seek does nothing. Instead in iPod mode, both tune/seek and preset seek should skip songs. To get around the annoyance factor, I set my steering wheel station up button to be seek up/song up, and my steering wheel station down button to be preset down.

When the Bluetooth unit imports your phone book, if you have multiple phone numbers for one contact, it imports them all with the title "default". So you can't use the voice dialing to chose the right number to call. And to dial the correct number on the display, you have to remember the acutal phone number you want to call for that contact and not just the phone number name. This is a silly problem I hope Parrot and Pioneer quickly fix and issue a firmware update. If they don't it pretty much negates the whole "feature" of the software upgradeable Bluetooth unit.

The stereo should be smart enough to skip inputs (Aux 1, Aux 2, USB 1, USB 2, BT) if a device is not connected, but automatically offer the option if something is connected. Currently you can manually disable Aux 1 & 2 & BT, but not USB 1 & 2. This is 2009 and the stereo should do better.

The button layout and combinations isn't very logical, and it is easy to press left/right/up/down part of the rotating joystick when you were trying to press the center select. The buttons around the joystick are also partially hidden and hard for big fingers to press.

In bright sun, the display can be hard to see due to the shiny surface and bright (but not super bright) display. The radio also seems to pick up a little more static than my factory radio from 2001.

Enough
Well, that is enough for now. I'll add more to this post as I discover it.

Saturday, June 13, 2009

Sr. Kathleen died

I've had this sitting in my drafts for several years now and forgot about it -

On Saturday, February 11, 2006, St. Rose of Lima Catholic Church and Elementary School had a memorial mass for Sr. Mary Kathleen Mitchell, its principal from 1979-1989. Most people probably barely remember their principal from elementary school, but I think that would be different for the kids who attended St. Rose during her tenure.

I have a special affinity for her since she was good friends with my parents and a second mother figure to me. I saw her once while she was back in Houston for a visit in 1994; my mother talked to her on the phone a couple times after that. As with any time a special person in your life dies that you haven't seen in a while, I feel guilty about not making a better effort to stay in touch with her.

At the mass, I saw former classmate Rene Lozano, his mother and sister, Jane Fucheck (former 5th grade co-teacher, and Principal of Seton), Ms. Andrews (my former co-teacher, still teaching 2nd grade), and several other school employees I recognized but couldn't put a name to. I also saw 2 other people who were likely former students, but I didn't recognize them. There were about 60 people in a Church that can hold several hundred.

Both the memorial, and how empty the Church remained was sad. To me it didn't say few people cared she passed on; I would like to think many more would have come if they knew about the mass. Instead, I think it said something about the mobility, tenuous roots, and lack of continuity of communication in our communities today.

I would encourage any former St. Rose community members that can afford to - make a contribution in Sr. Kathleen's honor to St. Rose, the Sisters of St. Joseph of Carondelet, or the National MS Society.

Published Obituary


1946-2006 Sister Mary Kathleen Mitchell, 59, passed away January 27, 2006 at Nazareth Living Center, St. Louis, MO from congestive heart failure due to complications of Multiple Sclerosis. She was born April 27, 1946 in KCMO to John McGinley Mitchell and Mary Kathleen Mitchell (Aylward). She was preceded in death by her parents John McGinley Mitchell and Mary Kathleen Mitchell and her brother J. Michael Mitchell. She entered the Sisters of St. Joseph on September 12, 1964 and made her final profession October 14, 1972. She graduate from St. Teresa's Academy in 1964 and Fontbonne College University, St. Louis, MO in 1969 with a B.A. in English/Elementary School and a M.A. in 1979 in Reading Specialist from Clarke College, Dubuque, Iowa and was a teacher/administrator for 40 years. Her missions included St. Joseph Juniorate, St. Louis, MO in 1967, Fontbonne University, St. Louis, MO in 1968, Little Flower School, Mobile, Al in 1969, 1975 St. Joseph School/Parish, Marietta, GA, in 1975, St. Rose of Lima, Houston, TX, in 1979, Avila University, KCMO, in 1989, St. Mary On The Hill School, Augusta, GA, in 1990, In Transition in 1994, Holy Cross School, Champaign, IL, in 1995, St. Teresa's Academy, KCMO, in 1999 and Nazareth Living Center, in 2000. She is survived by her mother Mary Carol Mitchell, sisters Margaret M. Mitchell and Mary Jo Phelps (Mike) and brother Joseph W. Sterner (Marilynn) as well as aunts, uncles, nieces, nephews and cousins. Wake is 3-7 p.m. Sunday January 29, at Nazareth Living Center Chapel, 2 Nazareth Lane, St. Louis, MO 63129 with service at 3:30 p.m. A Mass of the Resurrection 10 a.m. Monday January 30, at the Nazareth Living Center Chapel. Burial immediately following the Mass of Resurrection at Nazareth Cemetery. Memorial contributions may be made to the Sisters of St. Joseph of Carondelet, St. Louis Province, 6400 Minnesota Avenue, St. Louis, MO 63111. She will be greatly missed by all of the teachers, students, parents of students and associates of her many years in education. She will be remembered with joy by her family and friends. Published in InfoKwik Kansas City News from 1/29/2006 - 2/3/2006.

Monday, June 08, 2009

Front suspension change on a 2001 Nissan Pathfinder

On a relatively level and firm surface, block the rear wheels, put on the parking brake, put it in gear, and break the front lug nuts loose. If you have a big enough jack, just jack the frame up until the wheels are off the ground then put jack stands under the frame on both sides. Refer to your owner's manual for the jack points. But you may have to make some up on your own too, use a little piece of wood for extra protection. Just don't use anything that looks like sheetmetal, or that it might bend easily.

The struts are self-limiting packages, and are completely safe to work with as long as you DON'T loosen the large nut in the center of the top strut mount. That one nut holds the strut on the bottom to the strut mount on the top (with the highly compressed spring in the center). If you were to unscrew that, the strut would shoot one way and the mount would shoot the other way for about 15 feet. I know, I intentionally did that when I replaced my Altima front struts.

It isn't unreasonably hard to disassemble and repackage the struts for a car with a McPherson strut compressor. I tried doing it with the much stiffer Pathfinder lift springs and it wasn't going to happen. I highly recommend getting your local auto mechanic with a hydraulic or screw press to assemble your new struts for you.

To remove the strut, ensure your wheels are completely off the ground and the IFS arms are hanging free with no tension, this ensures the strut package is not compressed at all. Remove the wheel, detach the ABS wire hanging on the strut, and brake line hanging on the strut. Unbolt the front anti-sway bar and swing it into the front of the wheel well. Remove the lower 2 strut bolts securing it to the steering knuckle. Secure the bottom of the brake rotor with something. Remove the 3 nuts securing the strut package to the engine compartment. If you are lucky, your whole suspension will just fall on whatever is supporting the brake rotor. But you may have to jiggle everything around until the strut package drops down. See my first post about lifting a Pathfinder for the contortions to work the strut package out.

Reverse the steps to reinstall your newly assembled strut package.

Rear suspension change on a 2001 Nissan Pathfinder

So I realized my previous post on installing a lift kit on a 2001 Nissan Pathfinder didn't get into the nuts and bolts on how to do this stuff. I'll do this one on removing the rear suspension components, and another on the front. Installing is just doing the reverse.

On a relatively level and firm surface, shift the truck into 4wd, block the front wheels, put it in gear, and break the rear lug nuts loose. It is preferable to remove the panhard rod, but it is not necessary to install the lift, and you will need a bearing type puller to remove it. I tried to hammer it off, and the truck would have none of it.

If you have a big enough jack, the easiest way to do this is just jack the frame up until the wheels are off the ground then put jack stands under the frame on both sides. Refer to your owner's manual for the jack points. But you may have to make some up on your own too, use a little piece of wood for extra protection. Just don't use anything that looks like sheetmetal, or that it might bend easily. The springs won't pop out on you. They will be held just in the spring perches by the strut travel limit. At that point, the springs shouldn't have any tension on them anyway. You should be able to grab the spring and jiggle it back and forth. If they seem to have tension still, stop and recheck everything.

Now I didn't have a tall enough jack, so the alternate PITA method is to jack the truck up by the axle as far as you can, put jackstands under the frame, then lower the jack until the axle is hanging free and the wheels are off the ground. I always put a 2nd jack under the frame with a little tension on it in case the jackstands fold. I've actually had a jackstand fold up on me (fortunately I wasn't under the car). There was a slight incline where we were working, we had to take the parking brake off to remove the integrated rear brake rotor and parking brake drum on an Infiniti car (man that seemed like a stupid design), and our chocks didn't hold. A 2nd jack might give you enough time to get out from under the truck if it were falling.

Remove your first wheel and shock. That stuff is pretty straightforward. Now you are ready to remove the spring. If the panhard rod were removed, you could lower the axle until the spring just fell out. Since I left it on you need a few tricks to get the spring out. First I used the McPherson strut compressors to compress the spring a little bit to get it to slide over the lower spring perch. This is the only slightly dangerous part (aside from working under a jacked up truck). Be sure the strut compressor is installed good and use the spring safety hooks if available on the compressor. You don't want to be near that thing if it gave way.

I also put a jack underneath the axle on the other side and jacked it up just a little, which caused the wheel I was working on to droop just a little more. As you are doing this, mind the rear brake line, differential vent, and any other wiring to the axle like ABS sensors, you don't want to tear them. The spring slid out with minor effort.

Now just put everything back together with your new springs and shocks.

Thursday, June 04, 2009

Installing an aftermarket stereo in a 2001 Pathfinder

Note: if you are really interested in this, you may want to bookmark it and come back in a week or 2 as I finish the install and flesh it out more.

I have a 2001 Nissan Pathfinder that I finally decided I wanted built in iPod control and Bluetooth. My brother recommended Kenwood, and I really liked his from about 6 years ago. After seeing the Kenwood KDC-742U was getting pretty bad reviews on Amazon, I decided to go with Pioneer. The DEH-P7000BT got great reviews, but the brand new DEH-P7100BT had some cool new features like a dot matrix display; so I decided to take a risk on it.

My Pathfinder has steering wheel controls and the crappy Bose system. Yes it sounds good when it works, but Bose stuff tends to break and is horrendously expensive to repair when it does, because every speaker has its own amplifier. OEM crap and Bose crap is expensive alone, so mixing the 2 is asking to be robbed.

Making the Bose speakers / amps happy

My speakers were still working, so I was going to keep them for $ savings. Of course Bose amps and speakers are finicky. The speakers are really low impedance 1-2 ohms, so you can't just bypass the amps and drive the speakers with an aftermarket headunit or you'll burn it out. If you wire your aftermarket speaker wires to the Bose amp inputs you will get horrible results.

If you wire your stereo with sub-4 volt RCA preamp outputs directly to the Bose inputs it is pretty much guaranteed the results will suck. It seems some people have wired their stereo with 4 volt RCA outputs directly to the Bose amps and it has worked well. The foolproof way to wire it up is to wire the stereo preamp outputs to an integration adapter with adjustable gain, and the adapter to the Bose inputs. I'm using an old Scosche FAI-3 integration adapter. They don't sell it anymore, but they sell a SLC-4 which is the same thing.

A final problem about 4 Bose amps and an electric antenna. Aftermarket stereos these days tend to have 1 lead designed to signal an amp to turn on or an electric antenna to extend. When you have just those 2 things, it generally has enough power to get the job done. But if you have 4 amps and possibly an antenna it is usually just too much. The answer is to install a relay that has enough power to turn all 4 or 5 devices on.

Some parts you'll need -

Metra 70-7551 Nissan 1995-2007 with RCA outputs or 70-7550 with bare wires
Metra xxxxx Nissan 1987-1994 with bare wires
Metra 40-NI10 Nissan antenna adapter to aftermarket stereo

Adapter for OEM steering wheel control of aftermarket stereo

PAC Audio makes adapters to control your new aftermarket stereo with your OEM steering wheel controls. Most car manufacturers have one wire that goes to the steering wheel remote control. Each button contains a resistor with a different ohm rating. The stereo detects the resistance on that single wire to determine which function is being requested.

So of course PAC adapters expect this, and of course Nissan (along with Harley) do something different. They've got one wire for each remote control button. That's pretty wasteful in the automotive industry, but whatever. For a PAC Audio adapter to work with a Nissan, you've got to connect a different resistor between 46 ohms and 2k ohms to each of the remote control button wires, then connect all of those resistors to the white wire on the PAC unit. Doing this right in the wires as they recommend is asking for a fatigue break, so I am going to mount them on a PCB and use stranded wire coming on and off the board.

One note of caution if you try to test the wires coming from the remote control buttons. They aren't just simple switches. With the ignition off, if you press a button, you will find the resistance changes slightly on all 5 wires. This confused the hell out of me until I decided to try it with the key in ACC. When I did that, the resistance changed a lot on only the wire connected to that button and not at all on the other 4 wires. So the remote control has some kind of probably solid state relay inside it that must be powered to work.

So, I decided to put the amp turn-on relay and steering wheel resistor network in a single little box. I used the following parts -
Radio Shack - Expensive but immediately available
275-233 SPST 12VDC Reed Relay with 0.5A@125VAC contacts
276-159 Dual General Purpose IC PC Board
270-408 Enclosed 2 AA Battery Holder
22 gauge stranded wire

I gutted the battery holder, enlarged the hole with the wires exiting and made a new hole on the other side so I could get a total of 10 wires out of it. I scored the PCB so it would fit, then I soldered the relay, resistors and wires to the PCB board. Finally I buttoned it all up and got ready to wire it in.

Proper crimping
The wire crimpers sold at auto stores do a horrible job. They don't make a reliable and solid connection. You should use a ratcheting style terminal crimper. They can be found on eBay for about $30, but are generally $100 if you go to a good electrical hardware shop. You can learn a lot about proper crimping here -
http://www.pbase.com/mainecruising/wire_termination

Tuesday, June 02, 2009

ASUS is acting bizarre - what the heck is going on there?

I used to prefer ASUS motherboards price permitting, and I'd generally only buy their graphics cards. They seemed to make more reliable hardware, with better documentation, and decent support (compared to the other Taiwanese manufacturers.) I was looking forward to buying an eeePC in the not distant future. But something bizarre is happening inside ASUS corporate, and I don't want to facilitate their bizarre behavior.

At Computex Taipei, chairman of Asustek, Jonney Shih apologizes Qualcomm chose to show an Asus derived product. ""I think you may have seen the devices on Qualcomm's booth but actually, I think this is a company decision so far we would not like to show this device. That's what I can tell you so far. I would like to apologize for that."

It was an eeePC running a Qualcomm ARM processor and Google's Android operating system. Reports were that it looked great, really polished and ready for production. Yet Jonathan Tsang, vice chairman of Asustek, said the Eee PC with Android is not ready yet because the technology is "not mature."

http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9133813


From what I have heard, the only thing "not mature" was the Asus customized version of Xandros Linux they tried putting on eeePCs. I've read reports people had to dump it because updates would kill the operating system. Some people put XP on it and were reasonably satisfied, but it slowed the machine down and ate a lot of disk space. Those who put the Linux distribution eeebuntu on it have been happy and said it really lets the machine shine.

Gordon Kerr Asus Austrailian Consumer Market Product Manager told a reporter Linux is likely to be phased out of the Asus eeePC product line, and “If you want the full functionality of a notebook you are going to go with Windows.”

http://www.computerworld.com.au/article/304693/has_asus_all_given_up_linux


That's a pretty amazing claim, and about 180 degrees from the historical perception of Linux, and the realities of what netbooks are purchased for. Netbooks don't have all that much "functionality" to start with. They are meant to surf the web and open/edit Office documents during travel, both of which Linux on netbooks does quite well without the licensing fees and bloat of Windows. Linux is much more flexible than Windows, but you need to be more computer savvy to get that better functionality out of Linux. A lot of this has to do with the multiple types of better support companies provide Windows. Windows, while resourse intensive, and being occasionally known to eat itself, is more familiar to the basic computer user, given it is on 88% of consumer and personal business computers.

Is Microsoft putting the screws to Asus behind the curtains? Or is Asus not sophisticated enough to recognize good business and technical opportunities and plan well enough to capitalize on them? With all this going down, I'm not sure I want to support Asus in their strange and disappointing behavior towards Linux.