Sunday, February 3, 2019

How I fixed a 17-year old HP scanner...

Fixed! I've had this HP LaserJet 3330 multi-function printer (3300mfp) since 2002, but one day it started making a clicking/grinding noise, which is a common issue in this printer. The key to fixing is taking apart the entire unit and cleaning the mirrors and lens on the scanner unit (see YouTube video)


What exactly is the issue? It turns out that the scanner during startup tries to find its home position at the edge. When the scanner lid is closed, the light will reflect down onto mirrors. There are 5 of these mirrors that eventually bounce the light towards a CCD sensor:

I had done this mirror cleaning a few years ago and it worked miraculously. However, this time around the problem started happening again but the mirrors seemed fairly clean. What I didn't realize and what the repair videos don't mention is that I also had to clean the lens.  You can clean the front easily but to get to the back of the lens, the board on the back of the scanner unit has to be removed. This article seems to suggest you can get access to the scanner unit without taking the entire printer apart, but if you need access to the board, there are really no shortcuts.


There were small glue residue on the screws, so I had to use a power screwdriver to remove them. You can see in the pictures how the lens is fogged up:


After cleaning with a Q-Tip and alcohol, this lens starts to become cleaner:


Upon putting everything back, I noticed the printer continued to show "warming up bulb" on startup. I think the problem could be traced to some of the residue from the glue when I removed the board causing issues on the board. I managed to scrape away the residue and use painter's tape to lift it off the board. 

To verify whether the circuit board that I had just removed was at issue, I also started using a voltmeter and testing the ground and power (Vcc) pins of each of the integrated chips on the board while the board was plugged in while leaving the gray scanner lid off. There are a few commodity parts, which includes the CCD sensor (UPD8861), an inverter (74vhc04), a Schmitt trigger, and a voltage regulator that outputs 12 volts.

It suddenly worked! And I didn't have to buy a new unit (51000104-0000 on Ebay).

Note: I did try to reset the printer's memory by holding down "*" and # on power-up.  But I stopped doing it after it didn't seem to help.

Other notes from the HP forum here.

Wednesday, November 21, 2018

Seeing ints instead of booleans from your memcache?

The latest PyLibMc has changed the way in which booleans are stored from strings to integers to avoid conflicts in which python-memcached manages them. The end result? If you were noticing that your cache is returning ints instead of True/False, this change in PyLibMC cached this issue!

https://github.com/lericson/pylibmc/issues/242

If you have API responses that are returning invalid values, you'll need to wrap the value in bool() to fix the issue!

Friday, November 24, 2017

Testing SSL on Erlang

ssl:start().
{ok, ListenSocket} = ssl:listen(8443, [{certfile, "server.pem"}, {keyfile, "server.key"}, {cacertfile, "server.chain"}, {reuseaddr, true}]).
{ok, Socket} = ssl:transport_accept(ListenSocket).
ok = ssl:ssl_accept(Socket).

Wednesday, March 9, 2016

Project Fi and B010 error codes


  • If you purchase a Google phone, make sure to buy it under the @gmail.com account that will activate the Fi service.  Otherwise, you will end up seeing B010 error codes when trying to activate!

    Otherwise, you will have to call Project Fi specialists and have the "asset id" transferred to the account owner that intends to activate service.  You need to have both parties on the phone to have this info transferred.  This lesson took 3 weeks to resolve after calling multiple times to their 24x7 support line!
  • Google Fi leverages the Google Voice infrastructure.  You have to decide upfront whether to port your existing Google Voice line or port your cell phone.  If you decide to test out Project Fi and wish to bring your own phone line over later, you must cancel the service and then order another SIM card.  Google currently has no way of letting you to try before committing.  


Thursday, April 23, 2015

Redcarpet

Redcarpet is a Ruby library for rendering markup language.   When updating a CodePath Wiki guide entry, which hosts these documents outside of GitHub, I noticed that the list items not to be including the image tags that I used in a separate line:

1. Inside the Google Play Store for your project, navigate to `Settings` -> `API Access`:

    <img src="http://imgur.com/0n7ihzM.png"/>

I would see:

<ol>
<li>Inside the Google Play Store for your project, navigate to...
</ol>

<p><img src='http://imgur.com/0n7ihzM.png'/&amp></p&amp>


But if I added 4 spaces to the image tag, the problem went away:

1. Inside the Google Play Store for your project, navigate to `Settings` -> `API Access`:

        <img src="http://imgur.com/0n7ihzM.png"/>
 
Turns out that a change was made in Redcarpet v3.1.0 that changes the parsing behavior so that at least 4 spaces are needed for the line to be considered part of the list item.  It also is very likely that GitHub must be using an older version of this library, since this problem doesn't appear on native GitHub Wiki pages.   If GitHub should ever decide to upgrade to this new library, they're likely to cause their Wiki collection to experience similar problems!

https://github.com/vmg/redcarpet/commit/b7d5e017385a8ae35a594ff9535d31bd081ce973

Monday, March 30, 2015

Brain surgery on a Nexus 5

A few days ago, my Nexus 5's display started turning colors.  A few minutes later, it stopped showing.

Rather than buying a new phone, I decided to see if it could be repaired with some surgery.  I bought a $70 replacement frame and digitizer and $5 in tools.  The video walkthrough seemed pretty straightforward right?



Little did I realize that I would have to move everything from the old unit to the new frame, including the two power buttons, the battery (the video warns about puncturing and inhaling the toxic chemicals), the front and back camera, antenna board, and the main CPU.   Not to mention the microphone pieces (watch very carefully the video about the additional part you must bring over too!)

You don't really need a dryer gun since the adhesive is pretty easy to remove.  The tricky part is getting the shell of the phone off -- they are connected with small snap-ins that can break if you're not careful. Once I managed to get a few of these snap-ins loose, I could use a flathead screwdriver to remove the rest around the edge.  The video also shows what you need to do if you don't have a replacement digitizer like the part that I ordered -- I skipped over that step.

3 hours later, after making sure every single part was moved over (again, check the microphone and the part that sits below it!) it's working great. At first I thought I had failed because only the screen turned on. The battery had apparently drained so upon plugging in, I was able to see the Android Lollipop screen.  My only major issue is that I may have damaged on of the two antenna ports on the board, but the phone operates fine with just a single one plugged into it.  I plan to solder the other cable onto the socket just in case.

Nonetheless, I hope I just saved myself $400 on a new Nexus phone!