Flashing the firmware in an IKEA BEKANT to add position memory
As I started to work from home at the beginning of the pandemic, I got an IKEA BEKANT sit/stand desk. It’s been great for my posture and managing the fatigue of being at a desk for a long time every day. My main frustration has always been that it doesn’t have a memory — you can only hold the up or down buttons to move it and so trying to get it to the same position is annoying enough to avoid doing it.
Fortunately, someone reverse engineered the firmware and published a replacement which can be flashed on the existing hardware.
The BEKANT controller is a PIC microcontroller, so you’ll need a PICkit programmer to flash it. I got one of these, which was about £20 a few months before doing it. You’ll also need the Microchip environment, MPLAB X.
Preparing the controller
First, I set the desk to the right sitting height. If it went wrong, it was much better to have it lower. You’re going to want to do something like:
- Power down the desk,
- Unscrew the controller from underneath,
- Open up the back

It’s quite difficult to open the back. It’s glued down and made me have some grumpy thoughts about right to repair. I first tried to use a knife to get some space, but this didn’t work too well. From seeing photographs of others doing this, I realised there was space unused in the case where I should be safe to drill into. I drilled three holes into the corner and then used some pliers and snips to break it open.
You’ll see something that looks like this.

Configuring MPLAB
- Open the MPLAB IPE,
- Configure for the PICkit 3.5
- Settings → Advanced Mode (the default password is
microchip
), - Set the device to
PIC16LF1938
and click “Apply”, - Under “Power”, select “Power target circuit from PICkit3” and set the voltage level to “3.25”,
- Under “Production”, select “Allow Export Hex”,
- Then logout from Advanced mode
- Settings → Advanced Mode (the default password is
Connecting the programmer
You’re going to need to set the pins correctly, this diagram from the docs should be enough to figure it out:


Then, Click “Connect” in the main UI, and the programmer will attempt to connect to the chip.

I had some problems in ensuring there was a good connection. Leaning my finger on the connector was good enough to solve that.

Reading off the current firmware
Next, read off the existing firmware in case it goes horribly wrong.

You can find the firmware from mine here.
Flashing the new firmware
- Fetch the firmware from the releases page,
- Load the firmware (“Hex File” → “Browse),
- Program it: Click “Program”,
- Verify it: Click “Verify”
It should program and then verify successfully.

Testing
To test it out, I first followed the advice in the docs and cleared enough space for safety and then wired everything up in a way I could quick disconnect it if things went wrong.
Then I followed the rest of the guide which involved testing out the default buttons, followed by the memory the firmware has by default. Everything worked out great! I can now press Up whilst pressing Down to move to the higher position and Down whilst pressing Up to move down. The original commands all work too.
All that was left to do was to mount the control unit back to the desk (this time without the top cover).