Archive for the ‘Embedded’ Category

Install Linux on an Android-Based Lenovo Yoga Book (YB1X90F)

Friday, April 28th, 2017

Having a Linux distribution installed on an Android netbook can be the best of both worlds. Leveraging the Linux kernel already running on any Android device, a Linux userspace will be native and fast and come with many tools power users will appreciate. Here are some ways to get the most out of the Linux on Android experience.


I just want to PXE-boot my PC with some image on a Debian-based server.

Monday, August 22nd, 2016

This should be the least-hassle method of booting a PC over the network from a Debian-based server using the Intel PXE interface.

I set this up to PXE-boot memtest86+, but anything that can be loaded via the PXELINUX loader (such as a Linux kernel) can be added to the menu and booted this way. Building the menu via PXELINUX avoids the byzantine and reportedly bug-ridden PXE menu facility.

Repair Black Box ServSwitch EC Series KVM IP Switch

Sunday, July 31st, 2016


I repaired a broken Black Box KV9316A 16-port KVM-over-IP switch through replacing electrolytic capacitors and an internal battery. The short story is that a manufacturer of several internal logic boards used cheap “TRec” electrolytic capacitors which failed with high ESR, and the manufacturer of the power supply unit used a cheap “SWC” electrolytic capacitor which failed open, causing a voltage drop under load. The long story follows.


My Samsung Galaxy S5 smartphone charges too slow, how can I make it faster?

Thursday, July 28th, 2016

I noticed lately that as a heavy smartphone user, the charging rate of my Galaxy S5 running the Android v6 Marshmallow firmware was barely outpacing drain rate.  Sometimes even an overnight charge would not be enough to bring it back to a full charge.  After installing the free app Ampere, I realized that regardless of what the phone was connected to (wall charger, USB2, USB3 ports), it was charging at only the 500mA rate that is the maximum allowed for computer USB 1.1/2.0 ports.  So I did some investigation and this is how I found that I was able to increase the rate to 2.0A on both my Galaxy S5 and my wife’s Google Nexus 5, dramatically reducing charge time over most of the battery’s capacity range.


My Nexus 5 has an erratic touch screen that jumps all over the place

Sunday, January 17th, 2016

Symptom: The Nexus 5 Android smartphone occasionally registers touchscreen clicks in the wrong place or when a click was not requested.  Turning the screen off and back on in a normal touchscreen recalibration maneuver does not prevent it from recurring.

Solution: Unplug the Nexus 5 from the USB charging cable while using it, or use a ferrite core USB charger cable (the kind with a round “wart” on the cable). Don’t replace your touch screen, as some users have mistakenly done!

Long answer: An erratic touchpad that seems to jump all over the screen is a problem with electromagnetic interference when the Nexus 5 is connected to a USB charger. There is a long Google bug thread here. The problem will not be fixed.

How do I charge a completely dead battery in my Creative Zen Xtra MP3 player?

Tuesday, August 3rd, 2010

One unfortunate circumstance that every Zen Xtra owner has run into is a discharged battery, either due to use or non-use, that the unit refuses to recharge. This usually manifests itself as an endless EAX screen reboot loop even when plugged into DC charger power. If you only have one battery, there is no way to recover from this firmware aberration; you must buy a battery that is charged off the shelf.

But once you have bought a new battery, how can you recover use of your old battery and use it to make sure your unit never goes dead again?

Fortron/FSP Mini-ITX power supply repair

Sunday, February 28th, 2010

My little Mini-ITX system froze and would only sometimes power back on, only to freeze shortly thereafter. The problem was two 1000uF 10V capacitors in the PSU which had developed bulging tops and ESR greater than 1 ohm. Replacing these capacitors brought the system back to life. It would not be a surprise to see more capacitors fail in these power supplies due to the small space the Mini-ITX form factor requires several very hot power transistors to be crammed into.

Getting along with the VIA EPIA-M10000 Mini-ITX HTPC motherboard

Saturday, December 12th, 2009

I got this motherboard for free with a 933MHz Ezra-T C3 processor. It is still the cheapest option for a HTPC/MythTV box. Linux has low enough system overhead to make it usable and also has fairly well maintained open source drivers for the aging VIA hardware. But there are a few things you need to know.


Why does Linux only see 1GB of my 2GB SD Card?

Friday, August 31st, 2007

This mailing list post explains why.

A 2GB SD card reports a 1024 byte block size instead of the 512 byte block size that all smaller SD cards employ. However, I/O is performed in 512 byte blocks by the USB mass storage driver. The card reader is supposed to know about this and report a 512 byte block size, while multiplying the number of blocks reported by the card by 2, in order to report the correct card geometry to the operating system.

Older card readers do not know about this conversion, and may even assume that all SD cards have a 512 byte block size. Thus, a 512 byte block size is reported, along with the number of blocks reported by the card. This cuts the reported capacity of the card in half.

But the filesystem that exists on the card reports a 2GB size. On a system where the card physically only shows up as 1GB, this causes the FAT filesystem driver to read past the end of the card. This will produce read/write errors, and could even crash the filesystem driver if it is not equipped to deal with this case.

Windows reportedly employs one of two solutions to ensure that 2GB cards are correctly recognized.

The first solution is to assume that the card has a PC partition table on it (a mostly correct assumption for any card purchased retail). The Windows USB mass storage driver then examines the partition table to determine the number of blocks on the physical device, and ignores the number of blocks reported by the reader. A possible flaw with this scheme is that the Windows driver may not account for cases where a partition table has been erroneously or maliciously constructed, leading to an incorrect physical size being entered, and thus a device which cannot be correctly repartitioned or reformatted. It may also not account for the device being divided into several partitions. And of course this scheme won’t work for a card which is formatted without a partition table.

The other solution is to ignore the number of blocks reported by the reader, and to probe the size of the card by issuing test reads, probably in large increments at first and then smaller increments, until a read failure occurs. The read failure is assumed to occur because the read occurred past the end of the device. A possible flaw in this scheme is that a card with one or more defective sectors could cause the storage driver to believe it has found the end of the device, when in fact the read error occurs because of a bad sector.

At the moment, the solution for Linux and other operating systems which do not implement such hacks and which trust the card reader to report a useful block count and block size of the inserted card, is to buy a new card reader.

Boost C++ static libraries

Friday, March 30th, 2007

I was compiling a project with Visual Studio 2005 that requires the Boost libraries. Unfortunately I did not have them on my system, even though I had Boost itself installed in c:\boost_1_33_1. The VS2005 linker complains with the following error:

LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc80-mt-gd-1_33_1.lib'

There are two ways to resolve this.

The first is to compile the libraries yourself. Follow the instructions at this link: The instructions are for VS2003, but VS2005 can be used with a minor modification: change -sTOOLS=vc-7_1 to -sTOOLS=vc-8_0 when you get to that step.

You can also download precompiled Boost libraries from
These are not considered "official" Boost releases, but they are the closest thing to it.