Recently in Computing Category

Modifying the IKEA TRÅDFRI Shortcut Button

With the Zigbee remote-controlled lights and sockets I now needed a way to switch them that's more convenient than a mobile phone. There are various solutions available for this but the best looking one I could find is the IKEA TRÅDFRI Shortcut Button that can be used with any Zigbee coordinator. I can use these to switch lights on and off, play/pause music and turn speakers on/off.

White push button with a ceiling lamp pictogram that has been coloured in by hand

They work well but the battery management in the first version of the firmware isn't great and they regularly lose network pairing information for me when the battery runs out so I upgraded to the latest firmware (which is documented as fixing this issue).

One of the often requested features on these buttons has been the ability to set an action on a double press (as well as the original single press and long press gestures). The later firmware versions have added this feature.

Unfortunately to implement a double press requires delaying the reaction to a single press. Lights that would previously change instantly now take about half a second to do so which is visibly slow and irritating when you know that it used to be faster and doesn't have to be this way.

Trying to get IKEA to fix this is likely to be impossible and they don't provide any kind of email-based support that would allow complex technical issues to be communicated. Even if they could be persuaded that there was a need to make a change it could take months or years before they implemented it.

I don't want to wait that long before I can upgrade all of my push buttons to get better battery management, so I've decompiled the latest firmware and determined what to change to be able to disable the double press feature and remove the 400ms delay on single presses:

PCB from inside the IKEA TRÅDFRI Shortcut Button, with pins soldered onto the debug contacts at several different unusual directions and angles. Jumper wire cables are attached to most of the pins.

Full details on the firmware modifications and accessing the flash.

Zigbee multi-channel light controller

With a recent oven purchase I only had one device left that required the clock to be manually synchronised - a timer that I use to turn a light on in the morning. Having had to replace some remote controlled sockets with Zigbee variants I decided to do the same with the light timer so that it can be controlled by a computer that always has the correct time.

That worked ok but I wanted more integration with the light switch and since my living room lights could already be remotely switched by a different system I have consolidated both of them into a single light controller. There aren't any existing solutions for this that can handle multiple lights and multiple switches (you can have one relay/switch, or multiple relays plus multiple switches but Zigbee doesn't guarantee good integration in that scenario).

Using an ESP32-C6 I've made my own solution, the "Candle Dribbler" that satisfies my obscure requirements for how remotely controllable light switches should behave:

Left to right, low down on the wall: Opened double gang box with glowing red relays inside and 4 light switches on the front. Open single gang box with ESP32 microcontroller board hanging out of it. Open single gang box with cables hanging out.

Left to right, low down on the wall: Double gang fitting with 4 light switches labelled (FB M, LR C, LR L, LR R). Single gang box with ESP32-C6 inside behind a transparent plastic cover. Single gang socket with power supply.

Migrating Windows 10 from 512 byte to 4096 byte sectors

I've recently changed from a SATA SSD to NVMe SSD for my Windows PC and there's a format option for the NVMe SSD to use 4096 byte sectors for better performance.

The NTFS boot sector (at the start of the partition) contains references to the sector size of the disk. This is unnecessary information on more modern filesystems but NTFS is 28 years old. Changing the following little-endian values allows Windows to use the filesystem without needing to recreate it (instructions assume a 4K cluster size):

OffsetSizeNameModification
0x0B2 bytesBytes per sector0x0200 (512) → 0x1000 (4096)
0x0D1 byteSectors per cluster0x08 (8 * 512 = 4096) → 0x01 (1 * 4096 = 4096)
0x1C4 bytesHidden sectorsThe number of sectors preceding the partition
0x284 bytesTotal sectorsThe partition size in sectors

Modifying Logitech Z906 Speakers

Logitech Z906 Subwoofer and a Speaker

I bought these speakers before purchasing a standing desk because my existing speakers were attached by a fixed length cable. The cable had to be a certain length because the volume controls used capacitive touch all the way back to the amplifier/subwoofer.

Logitech Z906 Control Console

These speakers have a separate controller console attached using a cable with a DE-15 connector so it can be extended with any VGA extension cable.

I turn the power on/off remotely with a keyboard shortcut but the speakers always turn on in standby mode. Having reverse engineered the protocol between the console and amplifier I could bypass this but the console itself would still not turn on. If it's not turned on then the volume control knob won't do anything.

By decompiling the firmware on the microcontroller inside the console I was able to find and modify a parameter that would make it turn on automatically when powered on. I also found a hidden feature to disable the automatic standby that happens after 2 hours and the procedure for enabling this (hold the "level" button for 5 seconds until the level change light goes out).

Full details on the interface, protocol and firmware access.

Adafruit Proto Cape Kit for Beagle Bone

I bought one of Adafruit's Proto Cape Kit for my Beagle Bone Black so that I could put 3 relay circuits and pin headers on it. The double-sized PCB is supplied with separate pin headers that you have to solder on yourself.

It provides access to all of the pins but only SYS_5V is provided as a set of power lines and not VDD_5V, so limited current is available. However, this doesn't matter too much given that there is very little space for components.

I had to really squash everything in and use a lot of wires because there was no chance of creating an optimal layout:

Visible power button

My new server case doesn't have a very visible power button and I don't want the reset button being pressed instead... some careful application of white correction fluid makes it easier to see:

Before (indented black power symbol) After (indented white power symbol)

Bluetooth

Three different eBay sellers have all sold me USB Bluetooth adapters (at costs varying from very-cheap to brand-name-premium) with duplicate addresses*. I'm currently waiting for the third one to stop ignoring the law (and me) so that I can return the most recent purchase.

I was ready to give up and decide it was now impossible to buy genuine Bluetooth devices that comply with the Bluetooth Specification when I tried purchasing some Belkin adapters from Amazon, and it turns out that despite the increased cost these actually have unique addresses.

* Bluetooth adapters with duplicate addresses means that if you happen to be using your adapter within range of someone else who got theirs from the same manufacturer's batch, you'll get conflicts accessing devices because there will be two devices on the network with the same address. Avoid Dynamode and cheap unbranded devices.

RS232

Every cheap "Serial to USB" adapter I can find uses a PL2303 chip with active low signaling, which isn't the same as a real PC serial port. Fortunately FTDI sell real adapters. The US232B has 9V high, -9V low outputs and its inputs are open low at 0V.

Scanners

I recently bought a scanner, although it's not new... because scanner manufacturers are completely ignoring non-Microsoft users. Newer hardware isn't supported in Linux because the scanner chips (provided by separate companies) are different and no one thought to provide drivers for other operating systems. Older hardware is supported but is no longer being sold, so instead of the original manufacturer making a profit from sales to new customers, people selling used hardware gain instead.

Even the older hardware isn't supported by the manufacturer itself, instead third-party developers contributing drivers to the SANE project provide the only way of using these devices. (Which is probably a good thing as actual manufacturer drivers are likely to be closed source).

Unfortunately newer models of scanner hardware doesn't actually provide anything new. Scanning a 300 DPI image at 4800 DPI only makes the resulting image data larger (and most likely makes it less usable as minute details of the paper/film grain will become visible). With no reason to buy such hardware and develop drivers for it, these will go unsupported until the used hardware is no longer available.

So I now have a Canon CanoScan LiDE 60. I'd link to it but there's no longer a page for it on Canon's website. As far as I can tell this is currently the only bus-powered high-speed USB scanner supported under Linux (except perhaps the LiDE 50). The (latest) drivers for it aren't available for 64-bit versions of Windows (just like my TV receiver cards... there is a pattern developing here).

Line art scans of documents can be compressed very well, which is useful for the mountain of old bits of paper that I should throw away...

Motorola doesn't provide any way to install new root certificates for Java (despite there being an interface to install them for SSL) and the only root certificates installed other than their own is the lucrative "Java Verified" monopoly certificate.

Fortunately it is possible to insert your own root certificates, such as the one provided by CAcert who issue free code signing certificates.

  1. Add the certificate to /ezxlocal/download/appwritecmsec/.policy/._policy.txt:
    CA Cert Signing Authority (anything)
    2
    1
    MIIHPTCCBS... (root certificate)
    0
    0
    0
    0
    This will make it appear in the list of Java Root Certificates under Security Settings. That's all it does. The following two files are actually used by the JVM.

  2. Add the certificate to /ezxlocal/download/java/.policy/._policy.txt:
    domain: C=;L=;O=Root CA;OU=http://www.cacert.org;CN=CA Cert Signing Authority
    2
    1
    AAAcHBwcHB... (copy this from the UTI certificate)
    MIIHPTCCBS... (root certificate)
    FrUyG9TH8+DmjvO90rA67rI5GNE= (unknown)
    1049027389 (start date)
    1995712189 (end date)
  3. Add the certificate to /usr/securesetup/.policy/_devdomain.txt:
    domain: CA Cert root certificate (anything)
    type: 2
    rootcert: MIIHPTCCBS... (root certificate)
    allowchangestatus: 0
  • Where the root certificate is specified, it's in DER format and Base64 encoded all on one line.
  • I copied the unknown part in the second policy file from the UTI certificate and it was automatically updated for me (including the domain DN).
  • Somehow /ezxlocal/download/java/.policy/._hmac.txt was not world readable, which is required to run the MIDlet from the menu.


Using signed MIDlets, I can finally set some of the permissions to "Never Ask" and avoid irritating prompts.

MIDlet certificate information

About this Archive

This page is an archive of recent entries in the Computing category.

California is the previous category.

Consumer Products is the next category.

Find recent content on the main index or look in the archives to find all content.

Content authored by myself is just my honest opinion.

  • Linux
  • Get Firefox!
  • Get Thunderbird!