Category Archives: hacking

Extend the lifetime of Brother MFC ink cartridges

To let your printer think the ink level is still sufficient for its services, you can trick the “light sensor” with black electrician’s tape on the ink cartridge:

Mask the supposedly empty ink tank with black tape to trick the tiny round ink level sensor.

Done, the error message should fade away and you’re able to use the printer again.

Note: In my case there was still quite some ink the cartridge to allow “ok” prints. You should replace the empty cartridge soon to prevent a clogged print head, though.  

Use Apple’s USB SuperDrive with Linux

I’m really surprised and disappointed that Apple prevents us from using their USB SuperDrive with non Apple devices.

How to outsmart Apple’s firmware

Fortunately, with a little hack, we can awake the drive from its deep slumber. It’s required to send a “magic” byte sequence after the drive was connected. Thanks to “A Random Hacker” for figuring this out.

You have several options for making this work. In this post I’d like to unveil two of them.

Unlock with SCSI Generic (sg) driver

For communicating with the SCSI device directly we need the Linux SCSI Generic (sg) driver packages.

Lookup the device, it should be sr0 or sr1 by default depending on how many USB disc drives are currently attached. Check the output of following command to get a list off all device paths:

After you’ve the SuperDrive identified, we’ll send the magic sequence to the device.

Try to insert a disc, the drive should be awake now and start initialising the disc. For now the last step is necessary each time the drive is unplugged, so let’s automate it!

Custom udev rule

We’ll make us of the udev device manager. It runs as a deamon and receives events each time a device is initialised or removed. Furthermore, it features an extensible rule set for easy customising. Please check out this very good guide for further instructions.

Let’s write such a custom rule.

Add following rule definition.

This will do the “magic” each time a SuperDrive device is connected. To test the rule, disconnect the drive and connect it again, the drive should be unlocked, already.

Unlock with Superdrive-Enabler

Superdrive-Enabler is a little app that sends the magic byte sequence to a device.

Superdrive-Enabler for Raspberry Pi

I precompiled a binary for the Raspberry Pi in cases where you can’t or don’t want to install “sg3-utils”. Make sure that SuperDrive is connected via an active USB hub to the Pi. Copy the executable binary to your Raspberry with SMB or WGET.

Other distributions

Easily compile the superdrive-enabler source.

Custom udev rule

Let’s write a custom rule in a new *.rules file or separated by a line break in an existing rules file.

Add following rule definition.

This will trigger the “superdriveEnabler” app with the device path as parameter (e.g /dev/sr0) each time a SuperDrive device is connected. Reconnect the drive again and enjoy your CD/DVD collection with XBMC or any other media player!

Fan control for Lenovo S10-3T

The Lenovo S10-3T is a very smart device but when it comes to noise, it is very annoying. So I decided to modify a fan control profile written in C# for Notebook Hardware Control (NHC), which was originally programmed for the Lenovo S10 netbook.

It required also some changes to make the file compatible with the newest release of NHC version 2.4.3 (32 Bit only).

click here to download the S10-3T ACPI profile and copy the files to the NHC acpi directory. (tested with s10-3T bios version: 62)

key functions

This function reads the actual cpu temperature from the field “RTMP” and stores it into the variable _tmp. This is needed to check the actual cpu temp.

This function does all the magic, it overwrites the current cpu temperature with a fake temperature value (temperature_fan_on). This makes the ACPI-controller believe that the CPU is still running cool so it won’t turn the fan on. The field RTMP gets refreshed automatically, so it’s essential to rewrite this fake value every 50 ms.

parameter description

In the following, I’m going to give a brief introduction to the available parameters.

CPU FAN ON Threshold

If this value is reached, the fan starts spinning

CPU FAN OFF Threshold:

If this value is reached, the fan starts idling.

Temperature Value for CPU FAN ON:

If the fan gets triggered, it will start spinning with a speed matching this temperature value. The higher this value was set, the faster and louder the fan will spin till it reaches the CPU FAN OFF Threshold value.

Temperature Value for CPU FAN OFF:

If the fan gets deactivated, it will start idling with a speed matching this temperature value. The lower this value was set, the slower and quieter the fan will idle till it reaches the CPU FAN ON Threshold value.

With the settings set as shown, it is possible to surf the web and doing office work without any disturbing fan noise.

Let me know it works for you! Credits to Carsten (the creator of the S10 ACPI profile)