Leon’s Weblog

May 20, 2011

Designing an HTPC (part 2)

Filed under: Gadgets,Personal — leon @ 11:18 am

This is the second part of the article on designing an HTPC. In part one, I described the hardware components and assembly steps that I used to build the device. Without the proper software and media, however, all you have is a pretty box that consumes power. In this part, I will revisit some of the design requirements that were discussed in part one and review the software that will make the magic happen. Although many of the tools listed are available for both Windows and Linux systems, I will describe the Windows editions (simply because getting the drives setup for all the hardware selected in part one can be a pain under Linux). Also, while the built in Windows Media Center may have some of the desired functionality it is often not the best choice available. (more…)

May 13, 2011

My Roomba

Filed under: Gadgets — leon @ 1:46 pm

I have been using the Roomba 560 model for the past year and am generally pleased with its performance in my apartment. It took a few tweaks and adjustments at first but my Roomba and I have learned to get along quite nicely. The initial problems were solved by simply removing some obstacles on the floor and closing closet doors where the Roomba may enter and get stuck. The other solutions involved a bit more tinkering.

Cliff Sensors
I have a small dark area rug in the living room and the Roomba simply refused to clean it. It turns out that this is a common problem. The cliff sensors which are designed to prevent the vacuum from falling down the stairs are triggers by dark surfaces. I had to disable the sensors to fix this problem (this wasn’t a problem for me because I don’t have stairs). The options for disabling the sensors range from the elaborate but elegant solution of taking the sensor apart to turn it off to simply covering/taping up the 4 sensor externally with glossy white paper. I preferred the latter approach.

Lighthouses
After a few months, the lighthouses (virtual wall) stoped working properly. Sometimes a lighthouse would unexpectedly turn into a virtual wall (stopping the Roomba from going into some rooms) and other times the lighthouse wouldn’t turn on or block the Roomba at all. I tried resetting all the virtual walls by taking out their batteries and turning off the Roomba (holding down the “Spot” and “Dock” button for at least 15 seconds) but that didn’t fix it. It turns out, the virtual walls like having fresh batteries to operate properly…

Battery Life
After about 6 months, the Roomba started acting a bit sluggish. It would need to go back to the base to re-charge before finishing cleaning the entire apartment. At one point a full charge would only last it about 30 minutes of operation. None of the resetting tricks worked so I called iRobot and was told that this is a known problem for this series. They sent me a new battery and a kit to upgrade the Roomba’s battery charging logic to prevent the problem from occurring again. So far so good. I was also told by customer service that this problem tended to happen when the Roomba was not used often enough (so the battery would overcharge).

Error 9
After about a year, the Roomba finally had to go on disability. It would erratically stop working and announce the dreaded “Error 9.” Roomba support documentation mentions that this error indicates that one of the bumper sensors is stuck or dirty. Unfortunately it can also indicate that the sensor burned out (as it was in my case). Luckily this is a common enough problem that some DIY engineers took to fixing it and one of them was nice enough to post a guide. This is a $2 fix if you do it yourself.

Overall, I still think that maintaining the Roomba beats manually vacuuming and recommend it to anyone lazy enough to try.

December 5, 2010

Designing an HTPC

Filed under: Gadgets,Personal — leon @ 6:25 pm

I was hoping that 2010 would be the year of “Internet TV.” That, with the aid of set-top boxes. consumers would be able to integrate the functionality and content of a home office into the home theater. Several vendors proposed promising products including Google TV, Apple TV, Boxee Box, and Roku that would make this paradigm shift both easy and affordable. Unfortunately, the year is almost over and the promise was not to be. The promised products were released in time for the holiday season but are all plagued with limited functionality, lack of expandability, and proprietary content. For example, while the Boxee Box is great at streaming free Internet content from sites like YouTube, it has very limited functionality for organizing your personal media library and no storage space to keep it. Another daunting problem is that TV networks and on-line content providers like Hulu have blocked the devices’ access to their sites in anticipation of forming contracts similar to those that they have with Cable Networks. Ultimately it is the consumers that loose out on these long overdue features. This is why I decided to take matters into my own hands and build a Home Theater PC (HTPC) that would overcome the problems of the products available on the market today. (more…)

March 30, 2010

Streaming media library to PS3 with MediaTomb

Filed under: Personal,Software Dev — leon @ 2:13 am

One of the goals that I had for my media center was to have the ability to directly play music and movies from my Linux Server. The PS3 provided half of this functionality by supporting wireless streaming and connections to UPnP A/V servers. MediaTomb filled the gap by enabling my Linux Server to stream my entire media library. Below are the details of my configuration and solutions to some of the issues that I encountered. (more…)

December 23, 2009

T-Mobile’s Touch Pro 2

Filed under: Gadgets — leon @ 10:50 am

Touch Pro 2It’s been several years since I got a new phone. My old Eten M700 was starting to look a bit dated and the battery would only last for several minutes of talk time. T-Mobile’s Touch Pro 2 looked like the perfect replacement since I was already a customer. The TP2 immediately felt like a huge upgrade with a large bright screen, a battery that lasted several days with casual usage, and a 3G Internet connection. Also, unlike with earlier Windows Mobile phones, not much tweaking was required to get started.

Trouble With Time
For me, the biggest annoyance on the phone is that the time constantly got reset (see forum thread). This happened occasionally when the phone would automatically connect to the Internet to check mail or weather etc… This problem appears to be local specific and is caused by the T-Mobile network. Turning the phone’s data connection off/on would reset the time properly but this wasn’t a good solution for me (if you are checking the phone to get the time, how do you know if it is wrong). What worked for me was disabling all automatic clock updates by going to phone settings–>time zones.

Google Sync
Around this time Google had just released Sync which simulated a Microsoft Exchange server and enabled push e-mail and synchronization of contacts between Gmail and Windows Mobile devices. I found that this service worked well for e-mail but was not usable to synchronization of contacts. Every time a changed contact entry was synchronized, the system incremented the contact’s birthday by one day. It appears that this issue has very recently been resolved.

Screen Protector
The screen protector that came with the phone got scratched up pretty quickly. I also didn’t install it carefully enough so I ended up with a few air pockets that did go away after several months. I got the ClearProtector as a replacement. At first, I didn’t like the replacement. This protector was much softer that the one that came with the phone so I wasn’t sure if it would last. Also, applying the protector required wetting the clear plastic to activate the adhesive (I thought that was a bit unorthodox since we are putting moisture on a electronic device). The worst part about it was the amount of bubbles (several large spots and many tiny dots) that resulted when I first applied the protector. However, after a few days of use, I started to appreciate this design. Because the protector was softer it gave the phone a better tactile feel. Also, the material was permeable, so after a few days, all the bubbles disappeared and the screen became crystal clear. The best part is that, after a month of use, there are no visible scratches on the protector either.

Car Navigation
There is some concern on web forums that the latest versions of TomTom don’t work on the TP2. All I can say is that it works for me just fine (and it would have been a deal breaker if it didn’t).

Useful Links
You may find the following links useful for setting up the phone:

Update 1/25/2010: I just updated the phone to Windows Mobile 6.5. The update is available free from T-mobile.

  • The biggest improvement for me was that the phone no longer forces locking the screen based on MS Exchange Server policy. The new eye-candy is nice but I appreciate WinMo 6.5′s added configuration options and back-end features for working with MS Exchange etc… much more.
  • I did notice the same memory-leak/performance issue as a number of other users (memory usage jumps to over 80% after a few hours of usage. Setting the registry key HKLM/Software/HTC/ResProxy/ShareMemSize to 0 as discussed in this thread seems to have addressed the problem.
  • I’m indifferent about WinMo 6.5′s honeycomb start menu; however, I don’t like the amount of junk application that T-mobile put there with this ROM. I deleted the extra application shortcuts from /Windows/StartMenu/Programs using Resco File Explorer. Note that most of these shortcuts were marked as system files and hidden by default so you have to enable viewing system files in the File Browser’s options to be able to do this.
  • GPS still works (Google Maps, TomTom but not Bing) but the phone seems to have a weaker GPS reception than before the update.

December 22, 2009

Designing a Bare-Bones Media Center

Filed under: Gadgets,Personal — leon @ 12:35 am

Media CenterDesigning an entertainment center from scratch can be a daunting tasks, especially if you care about quality and aren’t looking to spend more than 5K. Here are some of the considerations that I’ve made when designing the media center in my new home.

Display
The TV is the heart of the entertainment center. There are many specifications that you can consider when choosing the display but the most important one is whether you like the image quality. At this point, most LCD’s look very similar on paper (1080p HDTV, HDMI, 120Hz etc…) and posted specifications such as contrast ratios can be questionable at best (especially when comparing different manufacturers). New technologies such as OLED displays exist but I don’t think they have matured yet for mass market consumption. Besides, being on the cutting edge can quickly put you over budget. I went with a Sharp Aquos LCD TV. Getting a projector was another consideration but the image quality just isn’t the same.

Mounting a flat screen on the wall is nice convenience. When choosing a wall mount, make sure that it can support the size/weight of your TV and that it has a solid construction (especially if it pivots). The mounts with dual-arm constructions tend to feel much more rigid so I think they are worth the extra price.
(more…)

November 21, 2009

Setting up a Canon MX860 Printer on a 64-Bit Linux System

Filed under: Gadgets — leon @ 4:41 pm

Canon MX860 I bought the MX860 printer because I knew it had Linux support but getting it setup was a bit harder than I had anticipated. The fist step was getting the proper drivers (since the CD that came with the printer only had Windows and MacOS drivers). Luckily the Linux drivers were available on the Canon Europe page at the following link.

The drivers are available in 3 formats: RPM package, Deb package, and the source code. After several failed attempts at getting the source code to compile, I tried installing the RPM package. Unfortunately, I run a 64-bit system and the packages were compiled for a 32-bit. The drivers essentially provide two CUPS backends: cnijnet and ncijusb. However, these files were placed in /usr/lib/cups/backend instead of in /usr/lib64/cups/backend where I needed them. Copying the files to the proper location allowed CUPS to see the drivers and I was pleasantly surprised that this actually worked. Similarly the RPM installed a CUPS filter pstocanonij into /usr/lib/cups/filter instead of into /usr/lib64/cups/filter so this file needs to be copied as well. Just make sure to restart the CUPS server using the following command before continuing to the next step: /etc/init.d/cups restart

Before playing with the CUPS configuration, I wanted to test that the drivers were installed properly and could find the printer on the network. To do this just run /usr/lib/cups/backend/cnijnet from the command prompt and it should return the device URI for the printer. If this works, just open to the CUPS config page in your browser of choice at http://localhost:631/ and add the new printer. The Canon MX860 series Ver.3.10 driver should be available in the pick-list. If the test page does not come out, check your firewall settings. You may also find other discussions on setting up the MX860 in Linux useful. Good luck.

October 28, 2009

PHP Authentication Over Unsecured Internet Connection

Filed under: Software Dev — leon @ 7:50 pm

When I wrote my earlier article on Managing Users in a PHP Web Application, I neglected to mention that the authentication mechanism is only acceptable when users are connected over a secure connected (HTTPS) or are on a trusted network (such as a corporate intranet). We went through great lengths ensuring that the passwords are stored securely in the database and that the site is not susceptible to SQL injection or XSS techniques. However, when the login form is submitted over an unsecured internet connection the password is sent back to the server in plain text. Anyone lurking on the network can easily get the login credentials using a network sniffer such as Wireshark. The solution to this problem is to hash the password using MD5 on the client side prior to submitting the login page. This is similar to how we hashed the password stored in the database to prevent people with access to the table from viewing users’ passwords.

The following article goes over the technique of securing client-side passwords using a JavaScript implementation of MD5. The key to take away from the article (besides the JavaScript code for MD5) is that the user’s password is hashed and submitted in hashed form only. In my case, I simply replace the clear text password with the hashed version prior to submitting the login form. This is the only change required to the login form code implemented in the previous article.

<input onclick="document.form.txtPW.value=MD5(document.form.txtPW.value)" name="Login" type="submit" value="Login" />

Note that this solution will only work if the client has JavaScript enabled on their browser. You can use FireBug’s network panel to verify that the clear-text password is not transmitted.

October 19, 2009

Transferring Linux Server to a 1&1 Shared Host

Filed under: Personal,Software Dev — leon @ 1:40 am

Recently, I was forced to relocate my Linux server so I decided to try out 1&1′s Shared Web Hosting package. This option was a lot cheaper then paying collocation fees at a server farm and provided a solution that is a bit easier to maintain. The challenge was setting up the environment to have the same functionality that I used to have on the LAMP server in 1&1′s restricted environment. I’ll describe some of the challenges and solutions bellow. This is a follow-up to an earlier guide that I wrote on Configuring a 1&1 Shared Host. (more…)

November 30, 2008

Distributing Bookmarks over a Secure RSS Feed

Filed under: Software Dev — leon @ 1:17 am

Background
The goal was to create a simple and secure way to distribute and synchronize bookmarks across multiple desktops, different browsers, and different operating systems anywhere in the world. I run Linux as my primary desktop and Konqueror as the default browser (which I used to collect hundreds of links). I have tried using services like Del.icio.us and various Firefox plugins but none were ideal. Services require settings up an account on a public server which present some privacy concerns. Even if the account is private, the host will use your data for marketing and social networking. Why would you want someone knowing what stores you shop at and which financial institutions you use (even if they claim to be anonymous)? Plugins have their own problems by limiting users to a particular browser and requiring importing/exporting the Bookmarks on each browser.

The solution involves distributing the Bookmarks over a secure RSS feed and using Firefox’s Live Bookmarks feature to display the feed. Since Firefox displays the RSS feeds directly in the Bookmarks menu, the list of links looks like it was there all along. Fortunately, other browsers are starting to implement similar functionality and the Bookmarks can even be published on online RSS readers.

Security
I wanted to keep my Bookmarks private so security was a concern. The RSS Feed can be distributed over a secured connection (HTTPS) and password protected using Basic Access Authentication. Until recently, secured RSS feeds were not universally supported by RSS readers; but, as of Firefox 3, this setup works as it should. Firefox even tracks login credentials so you will not be prompted to login each time that the Live Bookmarks folder is opened.

Implementation
I implemented the RSS feed using PHP and an Apache Web Server. There are plenty of guides for publishing RSS feeds using PHP so I won’t get into the details here. Settings up a secure web server and Basic Authentication is fairly straight forward in Apache. I guess this solution is less then ideal if you don’t already have a working Web server with PHP support.

The brunt of the work involved reading the configuration file containing the bookmarks from Konqueror into a PHP array and outputting it in Atom 2.0 format.

Limitations
It would have been great if different channels in a single RSS feed showed up in their own sub-folder. Unfortunately Firefox does not support having sub-folders as part of a Live Bookmarks feed. Firefox only loads the first “channel” section of the XML file, ignoring the rest.

To compensate for this shortcoming, I prefixed each link with the desired folder name(s) such that each link was a canonical path. Another solution is to pass query string parameters to the the script that generates the RSS feed to indicate which Bookmarks folder to load. With this approach, you can even implement a dynamic search of your bookmarks.

Next Page »